⚡ Zen LM

API Reference

Zen LM Cloud API -- OpenAI-compatible endpoints for all 14 Zen models

Zen LM Cloud API

Use all 14 Zen models via the Hanzo AI cloud API. Fully OpenAI-compatible -- works with every SDK, framework, and tool that supports the OpenAI API format.

Base URL

https://api.hanzo.ai/v1

Also available at https://api.zen.hanzo.ai/v1.

Authentication

All API requests require a HANZO_API_KEY (prefix: hk-) obtained from console.hanzo.ai.

Authorization: Bearer $HANZO_API_KEY

Free Credit

Every new account receives $5 free credit (expires in 30 days). A $1 minimum balance is required to use the API.

Quickstart

curl

curl https://api.hanzo.ai/v1/chat/completions \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "zen4",
    "messages": [{"role": "user", "content": "Hello, Zen."}]
  }'

Python

from hanzoai import Hanzo

client = Hanzo(api_key="hk-your-api-key")

response = client.chat.completions.create(
    model="zen4",
    messages=[{"role": "user", "content": "Hello, Zen."}],
)
print(response.choices[0].message.content)

TypeScript

import Hanzo from "hanzoai";

const client = new Hanzo({ apiKey: "hk-your-api-key" });

const response = await client.chat.completions.create({
  model: "zen4",
  messages: [{ role: "user", content: "Hello, Zen." }],
});
console.log(response.choices[0].message.content);

Endpoints

Supported SDKs

SDKInstallNotes
Python (hanzoai)pip install hanzoaiOfficial SDK — supports OpenAI + Claude-style endpoints
TypeScript (hanzoai)npm install hanzoaiOfficial SDK
Go (hanzoai)go get github.com/hanzoai/go-sdkOfficial SDK
Rust (hanzoai)cargo add hanzoaiOfficial SDK
Python (openai)pip install openaiCompatible — set base_url="https://api.hanzo.ai/v1"
LangChainpip install langchain-openaiCompatible — set base URL
LlamaIndexpip install llama-index-llms-openaiCompatible — set base URL

Rate Limits

TierRequests/minTokens/min
Free ($5 credit)60100K
Prepaid5001M

On this page