One API. Every language.
The Hanzo API is drop-in compatible with both the OpenAI SDK and the Anthropic SDK. Keep the client you already use — change one line, the base URL — and get one gateway to 50+ models plus every Hanzo product SDK.
- base_url
- https://api.hanzo.ai/v1
- endpoint
- /v1/chat/completions
- auth
- Authorization: Bearer hk-...
- base_url
- https://api.hanzo.ai
- endpoint
- /v1/messages
- auth
- x-api-key: hk-...
Use the OpenAI SDK
POST /v1/chat/completions — identical request/response to OpenAI Chat Completions.
Point the official OpenAI SDK at the Hanzo gateway.
from openai import OpenAI
client = OpenAI(
base_url="https://api.hanzo.ai/v1",
api_key="hk-...", # your Hanzo API key
)
resp = client.chat.completions.create(
model="zen5", # any model on the gateway
messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)Use the Anthropic SDK
POST /v1/messages — the native Anthropic Messages API, x-api-key auth and content-block responses.
Point the official Anthropic SDK at the Hanzo gateway.
from anthropic import Anthropic
client = Anthropic(
base_url="https://api.hanzo.ai",
api_key="hk-...", # sent as the x-api-key header
)
msg = client.messages.create(
model="zen5",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello!"}],
)
print(msg.content[0].text)Official Hanzo SDKs
Use our official SDKs to integrate Hanzo into your application
Every product has its own SDK
The unified AI API is one surface. Each Hanzo product also ships a dedicated SDK — identity, secrets, storage, agents, tasks, memory, tools, and UI — so you compose exactly what you need.
MCP
260+ Model Context Protocol tools for agents & editors.
IAM
OIDC / SSO — sign in with Hanzo ID (PKCE, server + browser).
KMS
Secrets & key management — read, seal, and sync org secrets.
S3
S3-compatible object storage — buckets, objects, presigned URLs.
Agents
Multi-agent SDK — build, orchestrate, and hand off between agents.
Tasks
Durable workflows & scheduling — retries, timers, signals.
Memory
Long-term memory — store, recall, and summarize across sessions.
UI
Headless React components — the @hanzo/ui design system.