ArzaRouter

API reference

All endpoints below are relative to https://arzarouter.arzastore.com/api — that is, https://arzarouter.arzastore.com/api/v1/….

Authentication

Send your key as a bearer token on every authenticated request. Missing or malformed headers get 401 with an OpenAI-shaped error body.
Header
all authenticated endpoints
Authorization: Bearer sk-infer-...
Content-Type: application/json

Account and inference

MethodPathPurpose
POST/v1/chat/completionsOpenAI-compatible completion; supports stream and tools/tool_calls
POST/v1/responsesOpenAI Responses API — input in, output array out; translated onto the same upstream call
POST/v1/messagesAnthropic-compatible messages API
GET/v1/modelsModel IDs this key may call
GET/v1/meAccount profile and balance
GET/v1/balanceBalance, mirrored from the router meter
GET/v1/usageRecent usage records
GET/v1/usage/by-modelUsage grouped by model
POST/v1/keysCreate an API key (returned once)
GET/v1/keysList keys by prefix
DELETE/v1/keys/:idRevoke a key
POST/v1/providersAttach an upstream account
GET/v1/providersList attached upstreams
DELETE/v1/providers/:idRemove an upstream
POST/v1/depositsRegister a deposit
GET/v1/deposits/addressYour unique Solana deposit address
GET/v1/depositsDeposit history
GET/v1/budgetsYour spend caps ($/Mtok), with the listed price of each target
PUT/v1/budgetsCreate or update a cap (model, api_key_id, max_input_price, max_output_price)
DELETE/v1/budgets/:idRemove a cap

MCP server

One sk-infer- key also authenticates an MCP server, so an agent can read and change account state without bespoke HTTP glue. Two transports: SSE (/mcp/sse then POST /mcp/messages?sessionId=…) and streamable HTTP (POST /mcp).

MCP — Claude Code / Cursor
SSE transport
claude mcp add --transport sse arzarouter \
  https://arzarouter.arzastore.com/mcp/sse \
  --header "Authorization: Bearer sk-infer-..."

# then ask: "list my arzarouter models" / "what is my balance?"
ToolPurpose
list_modelsModel ids with published $/Mtok pricing
get_balanceCredit units, USDC equivalent, deposit rate
list_api_keysKeys by prefix (never the secret)
create_api_keyMint a key — secret returned once
list_budgetsSpend caps by account, key or model
set_budgetCreate or update a cap
usage_by_modelToken usage grouped by model
list_depositsDeposit history with status and signature
get_deposit_addressUnique Solana USDC deposit address
chat_completionRun one completion, billed and metered

Management API

The same resources are reachable under /api/<name>, matching the paths other ArzaRouter deployments document. One key authenticates both surfaces.

MethodPathPurpose
GET/api/keysList keys by prefix
POST/api/keysCreate a key (returned once)
GET/api/meProfile and balance
GET/api/usage/logsRecent usage records
GET/api/catalogModels with pricing, as this key sees them
GET/api/marketPool health counts and per-model availability
GET/api/budgetsYour spend caps
PUT/api/budgetsCreate or update a cap
GET/api/publisher/providersUpstream accounts attached to your user
POST/api/publisher/providersAttach an encrypted upstream key
GET/api/publisher/poolYour attached capacity (earnings null — payouts not enabled)
GET/api/deposit-addressYour unique Solana deposit address
GET/api/topupsDeposit history
POST/api/topupsRegister a deposit

Public feeds

No key required. Every number is read from this deployment's own ledger; a metric we do not measure is returned as null with a note, never as a zero.

MethodPathPurpose
GET/api/market-tickerSSE stream of per-model asks and last settled rate
GET/api/pricing/cache24h per-model prompt-cache window (cached tokens null)
GET/api/pricing/usage24h per-model requests and tokens
GET/api/status/modelsPer-model availability and latency (TTFT null)

Public (no key)

MethodPathPurpose
GET/v1/pricesPublished per-Mtok prices for every sellable model (no auth)
GET/v1/combosCombo failover groups — call any of them as combo/<slug> (no auth)
GET/v1/pricingPublished rate card (no auth)
GET/v1/statsAggregate platform usage (no auth)
GET/healthLiveness plus upstream reachability (no auth)

Serving model

ArzaRouter answers from its own upstream pool — it does not proxy another gateway. The catalog it can serve is what GET /v1/models returns, and each model carries the published price it is metered at. Requests are metered on ArzaRouter's own ledger: tokens in/out are weighted per model and deducted from your balance after each call.

A request that names a model outside the catalog is refused with 400 MODEL_UNKNOWN. Pool capacity is rotated automatically: a rate-limited or unhealthy credential is cooled down and the next one serves the call, so 429 from one upstream account is not surfaced to you unless every attempt fails.

Admin (pool operations)

These need the admin header x-inferhub-admin and are not part of the consumer API.

MethodPathPurpose
GET/admin/poolPool rows + health summary + catalog
POST/admin/pool/importImport credentials — {"dir":"/path"} or {"tokens":"…"}
POST/admin/pool/probeHealth-probe one row ({"id":N}) or a batch
PUT/admin/pool/modelsUpsert a catalog entry (model, upstream id, cost weights, active)

Errors

400 malformed request or unknown model · 401 missing or invalid key · 402 insufficient balance, BID_EXCEEDED (priced above your cap), or PRICE_UNKNOWN (a cap is set for a model with no published price) · 404 unknown route · 502 upstream unreachable. Bodies are JSON with an error object carrying message and type.

Getting-started walkthrough: /docs.