Quickstart
Install the CLI, log in, and make your first call — then see that same call as an SDK method, raw HTTP and an MCP tool.
After this page you have a working credential and one call that answered.
Hanzo is one cloud behind one key. Every capability — inference, identity,
storage, money, agents — answers at https://api.hanzo.ai, and the CLI, the
SDKs and the MCP tools are all generated from the same description of it. So
there is nothing to wire up per service: get a key once and everything is
reachable.
Install
npm i -g hanzohanzo is the CLI and the client in one install.
curl -fsSL https://hanzo.sh | shInstalls into ~/.local/bin. https://hanzo.sh/cli installs the CLI alone.
brew install hanzoai/tap/hanzogit clone https://github.com/hanzoai/cli && cd cli && cargo install --path .hanzo versionLog in
hanzo auth loginThat opens a browser against hanzo.id, Hanzo's identity
provider, and stores the resulting credential locally. hanzo auth show prints
who you are; hanzo auth list shows every identity on this machine and
hanzo auth use switches between them.
There is no hanzo login. A bare word the CLI does not recognise starts a
coding session about that word, so hanzo login would open an agent and ask it
about logging in.
For a server, mint a key instead of logging a person in: console.hanzo.ai → API keys. A secret key resolves to you, so it belongs on a server and never in a browser — Authentication is the whole rule.
export HANZO_API_KEY=sk-...Your first call
The catalogue of models the gateway currently serves. It is a read, it needs nothing but the key, and it is the same operation on all four surfaces.
hanzo models listnpm i hanzoimport { Hanzo } from 'hanzo'
const hanzo = new Hanzo({ apiKey: process.env.HANZO_API_KEY })
const models = await hanzo.models.list()pip install hanzofrom hanzo import Hanzo
hanzo = Hanzo(api_key=os.environ["HANZO_API_KEY"])
models = hanzo.models.list()go get github.com/hanzoai/go-sdkclient := hanzo.NewClient(hanzo.WithAPIKey(os.Getenv("HANZO_API_KEY")))
models, err := client.Models.List(ctx)cargo add hanzolet hanzo = hanzo::Client::from_env()?;
let models = hanzo.models().list().await?;// Package.swift: .package(url: "https://github.com/hanzoai/swift-sdk", from: "1.0.0")
let hanzo = Hanzo(apiKey: ProcessInfo.processInfo.environment["HANZO_API_KEY"]!)
let models = try await hanzo.models.list()// build.gradle.kts: implementation("ai.hanzo:sdk:latest.release")
val hanzo = Hanzo(apiKey = System.getenv("HANZO_API_KEY"))
val models = hanzo.models.list()Every one of these is generated from the same description of the API, so the method names line up across languages. C++ is the one still landing.
curl https://api.hanzo.ai/v1/models \
-H "Authorization: Bearer $HANZO_API_KEY"curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'One door, one tool per capability. tools/call names the capability and the
operation; describe explains any operation's input.
Those are one API seen from four places, and the tabs above are the whole difference. Pick the one you will write in:
- CLI — every capability as a command group, one page each.
- SDKs — Python, TypeScript, Go, Rust, C++, Swift and Kotlin, generated from the same description the CLI and the tools are.
- MCP — one door an agent connects to; the tools are listed one per capability.
HTTP needs no page: it is https://api.hanzo.ai and the key you just exported.
Something that costs money
hanzo chat completions --model zen-1 --messages '[{"role":"user","content":"hello"}]'Then read what it drew down:
hanzo billing balance
hanzo usage summaryCredits & billing explains what a credit is and what happens at zero; Pricing is the rate for every model and tool.
Run the whole cloud yourself
The same binary that serves api.hanzo.ai runs on your machine:
hanzo up cloudBare hanzo up is the same thing — cloud is the default. Name one service to
run it alone: hanzo up iam, hanzo up kms, hanzo up gateway, hanzo up storage, hanzo up pubsub. See Run your own for what that
means and what it needs.
Where to go next
- Six flows, four surfaces — hello, chat, money, store, agent, tools. The whole product in miniature, each journey shown four ways.
- Concepts — orgs, projects, sandboxes, agents, memory and workflows. Read these once and the rest of the API explains itself.
- Capabilities — all of them, grouped. Each page says what the capability is, how to reach it from all four surfaces, and links its specification.
How is this guide?