# SDKs for every language — Hanzo AI

> Official SDKs for TypeScript, Python, Go, Rust, and Swift. Integrate Hanzo AI models, autonomous agents, and cloud APIs with type safety.

SDKs

# SDKs for every language

Two lines, not one. A full Cloud SDK generated from the OpenAPI document the API itself serves, so it is never behind the API — and a hand-written AI + Agents library for the work a generator cannot express. Real code lives in the per-language org; the umbrella hanzoai/sdk points at all of them.

[hanzoai/sdk](https://github.com/hanzoai/sdk)[API reference](https://docs.hanzo.ai/docs/openapi/)

POST https://api.hanzo.ai/v1/chat/completions

Python

TypeScript

cURL

Python

```
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)
```

TypeScript

```
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);
```

cURL

```
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!"}] }'
```

Paste and ship

Paste this into any agent. It reads the skill manifest and calls SDKs from there.

Agent promptCopy

```
Read https://hanzo.ai/skill.md and use Hanzo SDKs in my project.
```

## 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.

Code Examples

## Use the OpenAI SDK

POST /v1/chat/completions — identical request/response to OpenAI Chat Completions.

🐍Python

📘TypeScript

🔗cURL

Point the official OpenAI SDK at the Hanzo gateway.

Python

```
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)
```

Code Examples

## Use the Anthropic SDK

POST /v1/messages — the native Anthropic Messages API, x-api-key auth and content-block responses.

🐍Python

📘TypeScript

🔗cURL

Point the official Anthropic SDK at the Hanzo gateway.

Python

```
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)
```

SDKs & Libraries

## Official Cloud SDKs

Use our official SDKs to integrate Cloud into your application

### Hanzo Python SDK

PyPI

pip install hanzoai

[hanzoai](https://pypi.org/project/hanzoai/)[Docs](https://docs.hanzo.ai/docs/sdks/python)

### Hanzo Go SDK

Go Modules

go get github.com/hanzoai/go-sdk

[github.com/hanzoai/go-sdk](https://pkg.go.dev/github.com/hanzoai/go-sdk)[Docs](https://docs.hanzo.ai/docs/sdks/go)

### Hanzo TypeScript SDK

npm

npm install @hanzo/sdk

[@hanzo/sdk](https://www.npmjs.com/package/@hanzo/sdk)

### Hanzo Rust SDK

crates.io

cargo add hanzo

[hanzo](https://crates.io/crates/hanzo)[Docs](https://docs.hanzo.ai/docs/sdks/rust)

### Hanzo Swift SDK

SwiftPM

.package(url: "https://github.com/hanzo-swift/sdk")

[hanzo-swift/sdk](https://github.com/hanzo-swift)[Docs](https://docs.hanzo.ai/docs/sdks/swift)

### Hanzo Kotlin SDK

JitPack

implementation("com.github.hanzo-kt:sdk:v8.0.0")

[hanzo-kt/sdk](https://github.com/hanzo-kt/sdk)[Docs](https://docs.hanzo.ai/docs/sdks/kotlin)

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.

[### Python FlagshipGAhanzo-pypip install hanzoaisdkhanzo-py/sdkdocshanzoai/python-sdkaihanzo](https://github.com/hanzo-py)

[### Go GAhanzo-gogo get github.com/hanzoai/go-sdksdkhanzo-go/sdkdocshanzoai/go-sdk](https://github.com/hanzo-go)

[### TypeScript GAhanzo-jsnpm install @hanzo/sdksdkhanzo-js/sdkdocshanzoai/js-sdkai@hanzo/ai](https://github.com/hanzo-js)

[### Rust GAhanzo-rscargo add hanzosdkhanzo-rs/sdkdocshanzoai/rust-sdkaihanzo](https://github.com/hanzo-rs)

[### Swift GAhanzo-swift.package(url: "https://github.com/hanzo-swift/sdk")sdkhanzo-swift/sdkdocshanzoai/swift-sdk](https://github.com/hanzo-swift)

[### Kotlin GAhanzo-ktimplementation("com.github.hanzo-kt:sdk:v8.0.0")sdkhanzo-kt/sdkdocshanzoai/kotlin-sdk](https://github.com/hanzo-kt)

AI + Agents SDK

## The flagship AI library

Models, agents, tools, memory, and MCP — hand-crafted, not generated. Python leads; Rust and Node follow.

### Python

GA

hanzoai/python-sdk

pip install hanzo

Flagship — the most complete AI + agents library.

### Node

GA

hanzo-js/ai

npm install @hanzo/ai

Models, agents, tools, memory, and MCP for TypeScript.

### Rust

GA

hanzo-rs/sdk

cargo add hanzo

The 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](https://hanzo.ai/lz4/v4)[hanzo.ai/openai](https://hanzo.ai/openai)[hanzo.ai/openrouter](https://hanzo.ai/openrouter)[hanzo.ai/sdk](https://hanzo.ai/sdk)[hanzo.ai/sendgrid](https://hanzo.ai/sendgrid)[hanzo.ai/age](https://hanzo.ai/age)[hanzo.ai/agent](https://hanzo.ai/agent)[hanzo.ai/base-ha](https://hanzo.ai/base-ha)[hanzo.ai/builder](https://hanzo.ai/builder)[hanzo.ai/cd](https://hanzo.ai/cd)[hanzo.ai/cek](https://hanzo.ai/cek)[hanzo.ai/ci](https://hanzo.ai/ci)[hanzo.ai/cpy3](https://hanzo.ai/cpy3)[hanzo.ai/csqlite](https://hanzo.ai/csqlite)[hanzo.ai/dashscope-go-sdk](https://hanzo.ai/dashscope-go-sdk)[hanzo.ai/dashscopego](https://hanzo.ai/dashscopego)[hanzo.ai/dbx](https://hanzo.ai/dbx)[hanzo.ai/egress](https://hanzo.ai/egress)[hanzo.ai/finance](https://hanzo.ai/finance)[hanzo.ai/flags](https://hanzo.ai/flags)[hanzo.ai/framework](https://hanzo.ai/framework)[hanzo.ai/gochimp3](https://hanzo.ai/gochimp3)[hanzo.ai/graph](https://hanzo.ai/graph)[hanzo.ai/grpc-web](https://hanzo.ai/grpc-web)[hanzo.ai/ingress-parser](https://hanzo.ai/ingress-parser)[hanzo.ai/insights-go](https://hanzo.ai/insights-go)[hanzo.ai/kafka](https://hanzo.ai/kafka)[hanzo.ai/kms-operator](https://hanzo.ai/kms-operator)[hanzo.ai/livekit](https://hanzo.ai/livekit)[hanzo.ai/log](https://hanzo.ai/log)[hanzo.ai/ltx](https://hanzo.ai/ltx)[hanzo.ai/namespace](https://hanzo.ai/namespace)[hanzo.ai/notify](https://hanzo.ai/notify)[hanzo.ai/o11y-foundry](https://hanzo.ai/o11y-foundry)[hanzo.ai/onnxgo](https://hanzo.ai/onnxgo)[hanzo.ai/orm](https://hanzo.ai/orm)[hanzo.ai/otel-collector](https://hanzo.ai/otel-collector)[hanzo.ai/pdf](https://hanzo.ai/pdf)[hanzo.ai/proto](https://hanzo.ai/proto)[hanzo.ai/pubsub-go](https://hanzo.ai/pubsub-go)[hanzo.ai/replicate](https://hanzo.ai/replicate)[hanzo.ai/search-go](https://hanzo.ai/search-go)[hanzo.ai/sqlcipher](https://hanzo.ai/sqlcipher)[hanzo.ai/sqlite](https://hanzo.ai/sqlite)[hanzo.ai/sqlite-vec](https://hanzo.ai/sqlite-vec)[hanzo.ai/tygoja](https://hanzo.ai/tygoja)[hanzo.ai/vfs](https://hanzo.ai/vfs)[hanzo.ai/xorm](https://hanzo.ai/xorm)[hanzo.ai/yaegi](https://hanzo.ai/yaegi)[hanzo.ai/zip](https://hanzo.ai/zip)

SDKs

[SDKs docs →](https://docs.hanzo.ai/docs/sdks)
