Getting Started
Create an account, get an API key, and make your first Hanzo API call in under five minutes.
Getting Started
This guide takes you from zero to your first API call. Total time: under five minutes.
Create Your Account
Go to hanzo.id and sign up with:
- Email + password -- the simplest path
- GitHub -- one-click OAuth, great for developers
- Google -- connect your workspace account
- Wallet -- sign in with an Ethereum-compatible wallet
Your Hanzo identity works everywhere: console, chat, platform, cloud, and all API services. One account, one login.
Open the Console
After signing up you will be redirected to console.hanzo.ai. This is your dashboard for managing projects, API keys, usage, and billing.
If you already have an account, go directly to console.hanzo.ai -- it will redirect through hanzo.id for authentication if you are not already logged in.
Create a Project
Projects are the top-level container for your work. Each project has its own API keys, usage limits, and billing scope.
- In the console sidebar, click Projects
- Click New Project
- Enter a name (e.g.
my-first-project) - Select your organization (if you belong to more than one)
- Click Create
All resources -- API keys, models, usage logs -- are scoped to the active project.
Generate an API Key
- Navigate to your project in the console
- Click API Keys in the sidebar
- Click Create Key
- Give the key a descriptive name (e.g.
dev-testing) - Copy the key immediately -- it will not be shown again
Your key will look like this:
hk-proj-abc123def456...The hk- prefix identifies it as a Hanzo API key. See API Keys for a full breakdown of key types and prefixes.
Make Your First API Call
All Hanzo services are available through api.hanzo.ai. The LLM gateway is at llm.hanzo.ai. Both accept the same hk-* API key.
curl
curl https://llm.hanzo.ai/v1/chat/completions \
-H "Authorization: Bearer hk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-5-20250929",
"messages": [{"role": "user", "content": "Hello from Hanzo!"}]
}'Python
Install the SDK:
pip install hanzoai
# or with the OpenAI-compatible client:
pip install openaiUsing the OpenAI-compatible interface (works with any OpenAI SDK):
from openai import OpenAI
client = OpenAI(
api_key="hk-your-api-key",
base_url="https://llm.hanzo.ai/v1",
)
response = client.chat.completions.create(
model="claude-sonnet-4-5-20250929",
messages=[{"role": "user", "content": "Hello from Hanzo!"}],
)
print(response.choices[0].message.content)TypeScript
Install the SDK:
npm install hanzoai
# or with the OpenAI-compatible client:
npm install openaiUsing the OpenAI-compatible interface:
import OpenAI from 'openai'
const client = new OpenAI({
apiKey: 'hk-your-api-key',
baseURL: 'https://llm.hanzo.ai/v1',
})
const completion = await client.chat.completions.create({
model: 'claude-sonnet-4-5-20250929',
messages: [{ role: 'user', content: 'Hello from Hanzo!' }],
})
console.log(completion.choices[0].message.content)Key Types at a Glance
| Prefix | Type | Purpose |
|---|---|---|
hk-* | API Key | Server-side API access. Scoped to a project. |
sk-* | Secret Key | Provider-level keys (e.g. upstream model providers). Never expose client-side. |
hz-* | Widget Key | Client-side keys for browser widgets. Restricted scopes, safe to embed. |
See API Keys for details on scopes, rotation, and production best practices.
What Next?
- Authentication -- How SSO, OIDC, and sessions work across Hanzo services
- Organizations -- Multi-org setup, team management, and resource scoping
- LLM Gateway -- Use 200+ models through one API
- API Reference -- OpenAPI docs for every endpoint
- SDKs -- Python, TypeScript, Go, Rust, and C client libraries
- MCP -- 260+ tools for AI models via the Model Context Protocol
How is this guide?
Last updated on