Hanzo

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 hanzo

hanzo is the CLI and the client in one install.

hanzo version

Log in

hanzo auth login

That 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 list

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 summary

Credits & 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 cloud

Bare 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?

On this page