SDKs
Official Hanzo SDKs for Python, TypeScript, Go, Rust, and C/C++.
Hanzo SDKs
Official client libraries for every major language. All SDKs are OpenAI-compatible — switch from OpenAI to Hanzo by changing one line.
Available SDKs
Python
hanzoai — Drop-in OpenAI replacement. Sync + async. PyPI.
TypeScript
hanzoai — Node.js, Deno, Bun, browsers. npm.
Go
go-sdk — Functional options, minimal deps. Go modules.
Rust
hanzo-ai — Async Tokio, post-quantum crypto, DID. crates.io.
C/C++
c-sdk — Native library for embedded and game engines. CMake.
IAM SDK
@hanzo/iam — TypeScript IAM client with React bindings.
Quick Install
pip install hanzoaiQuick Start
All SDKs follow the same pattern — create a client with your API key and call endpoints:
from hanzoai import Hanzo
client = Hanzo(api_key="hk-your-key")
response = client.chat.completions.create(
model="claude-sonnet-4-6",
messages=[{"role": "user", "content": "Hello"}]
)SDK Feature Matrix
| Feature | Python | TypeScript | Go | Rust | C/C++ |
|---|---|---|---|---|---|
| Chat completions | Y | Y | Y | Y | Y |
| Streaming | Y | Y | Y | Y | Y |
| Function calling | Y | Y | Y | Y | Y |
| Embeddings | Y | Y | Y | Y | Y |
| Image generation | Y | Y | Y | Y | Y |
| Audio | Y | Y | Y | Y | Y |
| File uploads | Y | Y | Y | Y | Y |
| Fine-tuning | Y | Y | Y | -- | -- |
| Batches | Y | Y | Y | -- | -- |
| Assistants/Threads | Y | Y | Y | -- | -- |
| Async/await | Y | Y | Y | Y | -- |
| Retries | Y | Y | Y | Y | Y |
| Typed responses | Y | Y | Y | Y | -- |
| MCP server | Y | Y | -- | Y | -- |
| Post-quantum crypto | -- | -- | -- | Y | -- |
API Coverage
All SDKs cover the same 187 API endpoints generated from a single OpenAPI specification. See the full API Reference for endpoint documentation.
Source Code
| SDK | Repository | Package |
|---|---|---|
| Python | hanzoai/python-sdk | PyPI |
| TypeScript | hanzoai/js-sdk | npm |
| Go | hanzoai/go-sdk | pkg.go.dev |
| Rust | hanzoai/rust-sdk | crates.io |
| C/C++ | hanzoai/c-sdk | CMake |
How is this guide?
Last updated on