Documentation
Get started in 5 minutes.
ArzaRouter speaks both the OpenAI /v1/chat/completions API and the Anthropic /v1/messages API. Point your existing SDK at us, paste your API key, and you're live — or configure Claude Code, Codex, OpenCode and more in one command.
Fastest path for coding agents
One command. Claude, Codex, OpenCode, Hermes, Cline…
Create an API key, then run the interactive helper. It validates your key against GET /v1/models, lets you pick agents and models (searchable), and writes the right config files for each tool on Windows, macOS and Linux.
Step 1
Get an API key
Create an account, open API Keys in the dashboard and click Create key. Keys look like
sk-infer-… and are shown once — the server only stores a hash, so a lost key cannot be recovered, only replaced.Step 2
Top up with USDC
Open Deposit in the dashboard. Your account has a unique Solana address; send USDC to it. Balance is credited once the transfer is confirmed on-chain. Send real USDC on Solana mainnet — funds sent to another network cannot be recovered.
Step 3
Make your first request
Prefer coding agents? Run the helper below instead of wiring env vars by hand.
Helper — configure your coding agents
one command, validates the key, writes each tool's config
# validates the key against GET /v1/models, then writes Claude Code / Codex /
# OpenCode / Cline / Hermes configs with a .arzarouter-backup of anything replaced
curl -fsSL https://arzarouter.arzastore.com/helper | node
# non-interactive
INFERHUB_KEY=sk-infer-... curl -fsSL https://arzarouter.arzastore.com/helper | nodeBase URLs
one key works for both surfaces
# OpenAI-compatible
export OPENAI_BASE_URL=https://arzarouter.arzastore.com/api/v1
export OPENAI_API_KEY=sk-infer-...
# Anthropic-compatible (the SDK appends /v1 itself, so use the root)
export ANTHROPIC_BASE_URL=https://arzarouter.arzastore.com/api
export ANTHROPIC_API_KEY=sk-infer-...
# Verify the key and list the models it can reach
curl -s https://arzarouter.arzastore.com/api/v1/models -H "Authorization: Bearer $OPENAI_API_KEY"OpenAI Python
chat completions, streaming, tool calls
from openai import OpenAI
client = OpenAI(
base_url="https://arzarouter.arzastore.com/api/v1",
api_key="sk-infer-...",
)
resp = client.chat.completions.create(
model="claude-sonnet-4.6",
messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)Anthropic Python / Claude Code
messages API, native Claude shape
from anthropic import Anthropic
# IMPORTANT: Anthropic clients append /v1 themselves.
# Use the API root, NOT ".../v1" (that becomes /v1/v1/messages).
client = Anthropic(
base_url="https://arzarouter.arzastore.com/api",
api_key="sk-infer-...",
)
resp = client.messages.create(
model="claude-opus-4.6",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.content[0].text)curl
both surfaces, same key
# OpenAI shape
curl https://arzarouter.arzastore.com/api/v1/chat/completions \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{"model":"claude-sonnet-4.6","messages":[{"role":"user","content":"Hello!"}]}'
# Anthropic shape
curl https://arzarouter.arzastore.com/api/v1/messages \
-H "x-api-key: $KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{"model":"claude-opus-4.6","max_tokens":1024,"messages":[{"role":"user","content":"Hello!"}]}'Step 4
Read the API reference
Every endpoint this deployment serves, with request bodies and responses.
GET
/v1/modelsList every model this key can address.
POST
/v1/chat/completionsOpenAI-compatible chat completions. Streaming and tool calling supported.
POST
/v1/messagesAnthropic-compatible messages API. Same key, native SSE event stream.
GET
/v1/combosEvery
combo/<slug> failover group and the upstreams it walks.GET
/v1/prices · /v1/pricingThe published rate card, per million tokens.
PUT
/v1/budgetsPer-model, per-key or account-wide max $/Mtok. Enforced before the call.
GET
/v1/usage · /v1/usage/by-modelMetered usage for the key or account.
GET
/v1/balance · /v1/meRemaining balance and account profile.
Full reference, including management endpoints: /docs/api.
Routing tips
Address models by exact ID. Use the strings from
GET /v1/models — they are case-sensitive and carry no provider prefix. claude-opus-4.6 works; claude/opus-4.6 returns 400 Unknown model. The live list is on the pricing page.Combos fail over.
combo/<slug> names a group the router walks in order; GET /v1/combos lists them. One model name, automatic failover, no manual re-roll.Bidding (optional). Cap what you'll pay per million tokens with
x-max-input-price and x-max-output-price. A model priced above your cap is refused with 402 before anything is spent. Omit the headers to skip the filter.Budgets. Set a max $/Mtok per model, per API key, or account-wide at
/v1/budgets. A per-request header may tighten a stored budget but never loosen it.Pool rotation, not retry storms. Every request rides the least-recently-used credential in the pool. A rate-limited or unhealthy one is cooled down and the call moves to the next, so one bad account never surfaces to you.
Streaming. Pass
stream=true. SSE is forwarded byte-for-byte for OpenAI; for Anthropic the full message_start → content_block_delta* → message_stop sequence is emitted.Minimum charge. Every billed request costs at least $0.00001, even when its tokens come to less. Failed requests and requests with no output cost $0.