Hanzo for agents: free to start, pay as you go
Sign up free with a wallet. Get an API key free. A small free allowance to try it. Top up in USDC or USDT over the API to raise your limits and pay as you go. No human required.

Sign a one-time challenge from hanzo.id. A first-seen wallet gets its own account and organization.
One command installs the whole stack
The CLI, the coding agent, the MCP server and the inference engine are native Rust binaries. npm installs a small launcher; each binary downloads, checksum-verified, the first time it runs. Any OS, Windows included.
npm i -g hanzo # any OS; or: curl -fsSL https://hanzo.sh | sh hanzo auth login # a person approves once; headless agents use a key hanzo # a coding session in this repo (fetches the agent) hanzo mcp # the MCP server over stdio (fetched on first run) hanzo engine serve <model> # local inference (fetched on first run) # Register the MCP server with nothing installed first: claude mcp add --scope user hanzo -- npx -y hanzo mcp
The five steps, as one script
Every step is one request. This file makes them all, as it was run against production.
// No human required: sign up with a wallet, get a key, call the API, top up in USDC or USDT.
// A first-seen wallet gets its own Hanzo account and organization, with a small free allowance to try it.
// npm i @hanzo/ai viem · node agent.ts (Node 22.18+; set HANZO_WALLET_KEY to use your own wallet)
import { Hanzo } from '@hanzo/ai'
import { generatePrivateKey, privateKeyToAccount } from 'viem/accounts'
import { createHash, randomBytes } from 'node:crypto'
const ID = 'https://hanzo.id'
const API = 'https://api.hanzo.ai'
const CLIENT = 'hanzo-ai'
// Your agent's own wallet, or a fresh one. The key never leaves this process.
const account = privateKeyToAccount((process.env.HANZO_WALLET_KEY as `0x${string}`) ?? generatePrivateKey())
// 1. Sign up with a wallet: get a challenge, sign it, verify (POST /v1/iam/web3/verify), exchange for a token.
const nonce = await fetch(`${ID}/v1/iam/web3/nonce?chain=evm&address=${account.address}`).then((r) => r.json())
const message = [`${nonce.data.domain} wants you to sign in with your Ethereum account:`, account.address, '', ...(nonce.data.statement ? [nonce.data.statement, ''] : []), `URI: ${nonce.data.uri}`, `Version: ${nonce.data.version}`, `Nonce: ${nonce.data.nonce}`, `Issued At: ${nonce.data.issuedAt}`].join('\n')
const signature = await account.signMessage({ message })
// Verify the signed challenge: a first-seen wallet gets an account and an organization of its own.
const verifier = randomBytes(32).toString('base64url')
const challenge = createHash('sha256').update(verifier).digest('base64url')
const { data: code } = await fetch(`${ID}/v1/iam/web3/verify`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ clientId: CLIENT, chain: 'evm', scheme: 'secp256k1-eip191', address: account.address, message, signature, type: 'code', redirectUri: 'http://localhost:3000/callback', scope: 'openid profile email', codeChallenge: challenge, codeChallengeMethod: 'S256' }),
}).then((r) => r.json())
const token = await fetch(`${ID}/v1/iam/oauth/token`, {
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
body: new URLSearchParams({ grant_type: 'authorization_code', client_id: CLIENT, code, code_verifier: verifier, redirect_uri: 'http://localhost:3000/callback' }),
}).then((r) => r.json())
// 2. Get an API key (POST /v1/account/keys) that outlives the token. Shown once.
const hanzo = new Hanzo({ apiKey: token.access_token, baseURL: API })
const { key } = await hanzo.account.keys.create({ name: 'agent', type: 'secret' })
// 3. Use AI (POST /v1/chat/completions) with the Hanzo SDK — OpenAI-compatible, one line.
const client = new Hanzo({ apiKey: key, baseURL: API })
const chat = await client.chat.completions.create({
model: 'enso-auto',
messages: [{ role: 'user', content: 'Reply with the single word: ready' }],
})
console.log('chat', chat.choices[0]?.message?.content, 'free left today:', chat.headers?.get?.('x-ratelimit-remaining'))
// Or make a Kai decision — typed, calibrated, zero output tokens.
const decision = await client.decisions.create({
model: 'kai',
state: { ticket: 'The export button throws a 500 error since this morning.' },
questions: { team: { type: 'choice', instructions: 'Which team should handle this ticket?', criteria: { billing: 'charges, invoices, refunds', tech: 'bugs, errors, outages', other: 'anything else' } } },
})
console.log('decision', decision.answers, 'input tokens:', decision.usage.input_tokens, 'latency:', decision.latency_ms + 'ms')
// 4. Top up in USDC or Card (POST /v1/billing/crypto/deposit · GET /v1/billing/crypto/options · GET /v1/billing/tier).
const deposit = await client.billing.crypto.deposit({ chain: 'base', token: 'usdc', amountCents: 500 })
console.log('send to', deposit.depositAddress, 'then poll', `${API}/v1/billing/crypto/deposit/${deposit.id}`)
console.log('HANZO_API_KEY=' + key.slice(0, 12) + '… (store the whole key; it is shown once)')Keep the wallet key and the API key in your secret store: the wallet is the account, and the API key is shown once. A deposit address lasts 24 hours and is credited when the chain confirms; send only the token and chain it names.
Paste this into your agent
What Hanzo is, the base URL, how to discover the API and the headless path, in one block an agent keeps in its context.
Hanzo (https://hanzo.ai) is the AI operating system for business: one API for every model, Kai decisions and agents, with one key. Building business software since 2014. Techstars '17.
Sign up free with a wallet. Get an API key free. A small free allowance to try it. Top up in USDC or USDT over the API to raise your limits and pay as you go. No human required.
Base URL: https://api.hanzo.ai/v1 (chat completions in the OpenAI shape). Discover: GET https://api.hanzo.ai/v1 lists every capability, GET https://api.hanzo.ai/v1/<capability> its operations, and https://api.hanzo.ai/v1/openapi.json is the whole spec. No key needed for any of the three.
1. Sign up with a wallet: GET https://hanzo.id/v1/iam/web3/nonce?chain=evm&address=<address>, sign the CAIP-122 message it describes with EIP-191 personal_sign, POST https://hanzo.id/v1/iam/web3/verify (clientId "hanzo-ai", chain "evm", scheme "secp256k1-eip191", type "code" with a PKCE challenge), then exchange the code at https://hanzo.id/v1/iam/oauth/token. A first-seen wallet gets its own account and organization. A Solana wallet asks with chain=solana, writes "Solana account" in the message, and sends chain "solana", scheme "ed25519" and its signature as base64, never base58.
2. Get a key: POST https://api.hanzo.ai/v1/account/keys {"name":"agent","type":"secret"} with that token. The key is shown once.
3. Read your allowance: GET https://api.hanzo.ai/v1/billing/tier with the key says your plan, what it allows and what is left; GET https://api.hanzo.ai/v1/billing/plans lists every plan and price.
4. Top up: GET https://api.hanzo.ai/v1/billing/crypto/options, then POST https://api.hanzo.ai/v1/billing/crypto/deposit {"chain":"base","token":"usdc","amountCents":2000}. Send that token on that chain to the address it returns, and GET https://api.hanzo.ai/v1/billing/crypto/deposit/<id> until it says succeeded.
5. Call: POST https://api.hanzo.ai/v1/chat/completions {"model":"enso-auto","messages":[{"role":"user","content":"Hello"}]} with Authorization: Bearer <key>.
The whole path as one TypeScript file: https://hanzo.ai/agents#headless. Every request spelled out: https://docs.hanzo.ai/docs/agents. Talk to people at Hanzo: https://cal.com/hanzo.
Tools: `npm i -g hanzo` installs the whole native stack on any OS: `hanzo` (the CLI), `hanzo dev` (the coding agent), `hanzo mcp` (the MCP server over stdio) and `hanzo engine serve <model>` (local inference), each binary fetched on first use. To give yourself the MCP tools without installing anything: `npx -y hanzo mcp`.
Skills index: https://hanzoskills.com/llms.txt (install with `npx skills add https://hanzoskills.com/hanzo.md`). Hanzo Improvement Proposals: https://hips.hanzo.ai/llms.txt.