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.

Base URL:http://43.224.34.216/v1

Quick Start

  1. 1
    RegisterCreate your account at /register. Billing starts only after you add funds to your account.
  2. 2
    Get your API keyNavigate to Dashboard → API Keys and generate a new key. Keys start with sk-rr-.
  3. 3
    Set the base URLConfigure your client to use http://43.224.34.216/v1 as the base URL, then call /models to 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.

Discover modelsbash
curl http://43.224.34.216/v1/models \
  -H "Authorization: Bearer sk-rr-your-key-here"
OpenRouter-style chatbash
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.

Terminalbash
pip install openai
example.pypython
from 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.

Terminalbash
npm install openai
example.tstypescript
import 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.

~/.zshrc or ~/.bashrcbash
export ANTHROPIC_BASE_URL=http://43.224.34.216
export ANTHROPIC_API_KEY=sk-rr-your-key-here
claude

Or 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.

  1. 1Open Cursor → Settings (⌘,)
  2. 2Navigate to Models tab
  3. 3Under OpenAI API Base, enter: http://43.224.34.216/v1
  4. 4Enter your Haze key (starts with sk-rr-) in the API key field
  5. 5Click Verify and save

Supported Models

Model IDNameProviderNotes
hekiuHekiuAnthropicVerified staging model for /v1/messages
openai/gpt-5.2GPT-5.2 via OpenRouterOpenRouterWorks after an OpenRouter channel is configured
anthropic/claude-sonnet-4.5Claude Sonnet via OpenRouterOpenRouterOpenRouter-style provider/model id
gpt-4oGPT-4oOpenAIWorks after an OpenAI channel is configured
text-embedding-3-smallText Embedding 3 SmallOpenAIEmbeddings route example
gemini-2.5-flashGemini 2.5 FlashGeminiWorks 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.

402

Payment Required

Insufficient balance. Top up at /dashboard/billing.

429

Too Many Requests

Rate limit exceeded for this API key. Wait and retry.

503

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