Documentation
One key, two compatible wire protocols, 15 frontier models. Read the quickstart or explore the API reference.
API Reference
Every gateway endpoint follows a common contract: a JSON body, an API key in x-api-key or Authorization: Bearer, and a uniformly shaped error object when things go wrong. Paths below are absolute from the gateway origin — the OpenAI-compatible base URL already ends in /v1, so an OpenAI SDK appends only the remainder. Both base URLs are on the Introduction.
Inference — API key required
/v1/messages
Anthropic-compatible message call. max_tokens is required, and the base URL is the origin with no /v1.
/v1/messages/count_tokens
Size an Anthropic payload without running it — what Claude Code calls before sending.
/v1/chat/completions
OpenAI-compatible completion, streaming or full, across any routed model.
Catalog and account
/v1/models
The routable model registry and price per million tokens. No auth required, and it answers each SDK's own envelope — so client.models.list() works on either base URL.
/v1/me/keys
List the API keys on this account.
/v1/me/keys
Create a key. Every key can call every model on the gateway.
/v1/me/keys/:id
Delete a key — hard-deleted when it has no usage, otherwise revoked so logs still resolve its name.
/v1/me/balance
Current credit balance.
/v1/me/usage
Metered tokens, cost, and requests for a date range.
/v1/me/usage/series
The same usage rows as a time series, for charts.
/v1/me/transactions
Every ledger row on the account — credits, usage, top-ups.
The /v1/me/* routes accept either credential — an sk-gw-… API key or your console session token — because the dashboard and your own scripts both call them.
All inference endpoints are metered against your plan's allowance and its 4-hour and weekly spend windows. With no active plan — or an exhausted window — requests fail with a 402 until you buy or renew a plan on the Billing page.