SDKs
SDKs for every language
A full Cloud SDK generated from the OpenAPI document the API itself serves, and a hand-written AI + Agents library.
Code Examples
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)
Point the official OpenAI SDK at the Hanzo gateway.
POST https://api.hanzo.ai/v1/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)
The OpenAI JS SDK — just change baseURL.
import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://api.hanzo.ai/v1", apiKey: "hk-...", }); const resp = await client.chat.completions.create({ model: "zen5", messages: [{ role: "user", content: "Hello!" }], }); console.log(resp.choices[0].message.content);
OpenAI-style: Authorization: Bearer.
curl https://api.hanzo.ai/v1/chat/completions \ -H "Authorization: Bearer $HANZO_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "zen5", "messages": [{"role": "user", "content": "Hello!"}] }'
POST https://api.hanzo.ai/v1/messages
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)
The Anthropic JS SDK — just change baseURL.
import Anthropic from "@anthropic-ai/sdk"; const client = new Anthropic({ baseURL: "https://api.hanzo.ai", apiKey: "hk-...", }); const msg = await client.messages.create({ model: "zen5", max_tokens: 1024, messages: [{ role: "user", content: "Hello!" }], }); console.log(msg.content[0].text);
Anthropic-style: /v1/messages, x-api-key header.
curl https://api.hanzo.ai/v1/messages \ -H "x-api-key: $HANZO_API_KEY" \ -H "anthropic-version: 2023-06-01" \ -H "Content-Type: application/json" \ -d '{ "model": "zen5", "max_tokens": 1024, "messages": [{"role": "user", "content": "Hello!"}] }'
Full Cloud SDK
Generated from one document and never edited by hand, so every route is reachable the day it ships — models, agents, data, compute, network, security, platform and chain. Method and class names are the document's operation ids, which is what makes a client checkable against a release instead of against somebody's memory. Real code lives in hanzo-<lang>/sdk.
AI + Agents
The hand-crafted flagship: models, agents, tools, memory, and MCP. Python hanzo is the most complete; Node ships @hanzo/ai. Distinct from the generated cloud SDK — this is the "we love this language" library.
your application
Use our official SDKs to integrate Cloud into your application
pip install hanzoaiPaste and ship
Paste this into any agent. It reads the skill manifest and calls SDKs from there.
Read https://hanzo.ai/skill.md and use Hanzo SDKs in my project.SDKs & Libraries
Official Cloud SDKs
Use our official SDKs to integrate Cloud into your application
Hanzo Go SDK
Go Modules
go get github.com/hanzoai/go-sdkReal code lives in hanzo-go/sdk.
Hanzo TypeScript SDK
npm
npm install @hanzo/sdkReal code lives in hanzo-js/sdk; its AI + Agents library is @hanzo/ai.
Hanzo Swift SDK
SwiftPM
.package(url: "https://github.com/hanzo-swift/sdk")Real code lives in hanzo-swift/sdk.
Hanzo Kotlin SDK
JitPack
implementation("com.github.hanzo-kt:sdk:v8.0.0")Real code lives in hanzo-kt/sdk.
Per-language orgs
A home for every ecosystem
Each language has its own org holding the generated cloud SDK, an AI + agents library and the split-out packages. Every one of them ships the same six runnable examples — prove the key works, one completion, balance and usage, a store round-trip, create and run an agent, list the tools — so knowing one language's set is enough to navigate another's.
AI + Agents SDK
The flagship AI library
Models, agents, tools, memory, and MCP — hand-crafted, not generated. Python leads; Rust and Node follow.
Python
GAhanzoai/python-sdk
pip install hanzoFlagship — the most complete AI + agents library.
Node
GAhanzo-js/ai
npm install @hanzo/aiModels, agents, tools, memory, and MCP for TypeScript.
Rust
GAhanzo-rs/sdk
cargo add hanzoThe AI + agents crate for Rust — crypto, DID, MCP, agents, embeddings, feature-gated.
Go modules
Served at hanzo.ai
Each module has a page at its import path, with its source and its reference.
- hanzo.ai/lz4/v4
- hanzo.ai/openai
- hanzo.ai/openrouter
- hanzo.ai/sdk
- hanzo.ai/sendgrid
- hanzo.ai/age
- hanzo.ai/agent
- hanzo.ai/base-ha
- hanzo.ai/builder
- hanzo.ai/cd
- hanzo.ai/cek
- hanzo.ai/ci
- hanzo.ai/cpy3
- hanzo.ai/csqlite
- hanzo.ai/dashscope-go-sdk
- hanzo.ai/dashscopego
- hanzo.ai/dbx
- hanzo.ai/egress
- hanzo.ai/finance
- hanzo.ai/flags
- hanzo.ai/framework
- hanzo.ai/gochimp3
- hanzo.ai/graph
- hanzo.ai/grpc-web
- hanzo.ai/ingress-parser
- hanzo.ai/insights-go
- hanzo.ai/kafka
- hanzo.ai/kms-operator
- hanzo.ai/livekit
- hanzo.ai/log
- hanzo.ai/ltx
- hanzo.ai/namespace
- hanzo.ai/notify
- hanzo.ai/o11y-foundry
- hanzo.ai/onnxgo
- hanzo.ai/orm
- hanzo.ai/otel-collector
- hanzo.ai/pdf
- hanzo.ai/proto
- hanzo.ai/pubsub-go
- hanzo.ai/replicate
- hanzo.ai/search-go
- hanzo.ai/sqlcipher
- hanzo.ai/sqlite
- hanzo.ai/sqlite-vec
- hanzo.ai/tygoja
- hanzo.ai/vfs
- hanzo.ai/xorm
- hanzo.ai/yaegi
- hanzo.ai/zip