API Documentation
Haze exposes a focused set of OpenAI-compatible endpoints plus Anthropic-native routing for Claude tooling. Use the examples below with the supported routes listed on this page.
http://43.224.34.216/v1Quick Start
- 1Register — Create your account at /register. Billing starts only after you add funds to your account.
- 2Get your API key — Navigate to Dashboard → API Keys and generate a new key. Keys start with sk-rr-.
- 3Set the base URL — Configure your client to use
http://43.224.34.216/v1as the base URL, then call/modelsto see the live model list.
OpenRouter-style quick call
The lowest-friction path mirrors OpenRouter: one base URL, one Bearer key, discover models first, then send a chat request. Optional attribution headers are forwarded when an OpenRouter upstream channel is selected.
curl http://43.224.34.216/v1/models \
-H "Authorization: Bearer sk-rr-your-key-here"curl http://43.224.34.216/v1/chat/completions \
-H "Authorization: Bearer sk-rr-your-key-here" \
-H "Content-Type: application/json" \
-H "HTTP-Referer: https://your-app.example" \
-H "X-OpenRouter-Title: Your App" \
-d '{
"model": "openai/gpt-5.2",
"messages": [{"role": "user", "content": "Hello from Haze"}]
}'Staging currently verifies hekiu through the Anthropic-native /v1/messages path. OpenRouter model IDs become live after an admin adds an active OpenRouter channel with matching models.
OpenAI SDK — Python
Install the official OpenAI Python library and point it at Haze.
pip install openaifrom openai import OpenAI
client = OpenAI(
api_key="sk-rr-your-key-here",
base_url="http://43.224.34.216/v1"
)
response = client.chat.completions.create(
model="openai/gpt-5.2",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)OpenAI SDK — Node.js
Works with the official openai npm package.
npm install openaiimport OpenAI from 'openai'
const client = new OpenAI({
apiKey: 'sk-rr-your-key-here',
baseURL: 'http://43.224.34.216/v1',
defaultHeaders: {
'HTTP-Referer': 'https://your-app.example',
'X-OpenRouter-Title': 'Your App',
},
})
const response = await client.chat.completions.create({
model: 'openai/gpt-5.2',
messages: [{ role: 'user', content: 'Hello!' }],
})
console.log(response.choices[0].message.content)Claude Code
Set environment variables before launching Claude Code. This routes all Claude API calls through Haze.
export ANTHROPIC_BASE_URL=http://43.224.34.216
export ANTHROPIC_API_KEY=sk-rr-your-key-here
claudeOr set them inline for a single session: ANTHROPIC_BASE_URL=... ANTHROPIC_API_KEY=... claude
Cursor
Configure Cursor to use Haze as an OpenAI-compatible backend for the supported endpoints on this page.
- 1Open Cursor → Settings (⌘,)
- 2Navigate to Models tab
- 3Under OpenAI API Base, enter:
http://43.224.34.216/v1 - 4Enter your Haze key (starts with
sk-rr-) in the API key field - 5Click Verify and save
Supported Models
| Model ID | Name | Provider | Notes |
|---|---|---|---|
| hekiu | Hekiu | Anthropic | Verified staging model for /v1/messages |
| openai/gpt-5.2 | GPT-5.2 via OpenRouter | OpenRouter | Works after an OpenRouter channel is configured |
| anthropic/claude-sonnet-4.5 | Claude Sonnet via OpenRouter | OpenRouter | OpenRouter-style provider/model id |
| gpt-4o | GPT-4o | OpenAI | Works after an OpenAI channel is configured |
| text-embedding-3-small | Text Embedding 3 Small | OpenAI | Embeddings route example |
| gemini-2.5-flash | Gemini 2.5 Flash | Gemini | Works after a Gemini OpenAI-compatible channel is configured |
This table shows common examples. The source of truth isGET /v1/modelsfor the active channels in this deployment.
Rate Limits & Errors
Haze returns standard HTTP status codes. Your per-key rate limits are configured in the dashboard.
Payment Required
Insufficient balance. Top up at /dashboard/billing.
Too Many Requests
Rate limit exceeded for this API key. Wait and retry.
Service Unavailable
No available upstream channel for the requested model.
Retry strategy
For 429 errors, implement exponential backoff starting at 1 second. The Retry-After header indicates the minimum wait time in seconds.
Ready to connect?
Create an account, add balance when you are ready, and connect with one of the supported SDK examples above.
Create account