Skip to content

One LLM API gateway for every model

An LLM API gateway is a single endpoint you route every model call through, instead of wiring each model provider into your app one by one. Router One is an OpenAI-compatible gateway for 30+ models — GPT, Claude, Gemini, and Grok — behind one base URL and one key. Direct model calls are a black box; routing through a gateway gives you a ledger (what every call cost), a trace (model, request ID, usage, and status), and control (per-key budgets). It is reachable globally and from Mainland China.

What the gateway does

One OpenAI-compatible endpoint

Point your existing OpenAI SDK at https://api.router.one/v1 and call 30+ models — GPT, Claude, Gemini, Grok — through the same Chat Completions interface. No per-model SDK, no rewrite.

Smart routing

Production traffic uses the model_name strategy, so a request is served by the model you name: its routes are tried in a gateway-managed order, and routes with a sustained upstream-error rate move to the back until they recover. Send model="auto" and the gateway picks a low, medium or high tier and serves the request from that tier's server-owned model list.

Automatic fallback

When a named-model request hits a retryable upstream error, the gateway may try the next healthy provider serving that same model. It does not silently switch to a different model.

Per-request traces

Customer Logs shows recorded calls with their model, request ID, tokens, settled cost, total time (plus time to first token on streamed requests that produced output), status, and any sanitized error. Upstream provider identities, routes, and internal attempts are not disclosed.

Keys with their own budgets

Create multiple API keys per account, each with its own maxSpend cap and expiry. Give each app or environment its own scoped key. Rate limits (rateLimit, tokenLimitTpm) run at platform defaults and can be raised on request.

Prepaid pay-as-you-go wallet

Top up a prepaid wallet and pay per token at the posted model-rate token line, with checkout-visible FX/channel fees kept separate. Fund it with a card or Alipay through one hosted checkout, or with USDT/USDC on six chains. Spend draws down as you go.

Native Claude Code & Codex

Claude Code talks to the Anthropic-compatible endpoint at https://api.router.one; OpenAI Codex CLI uses the OpenAI-compatible base URL. Claude Code needs two environment variables, ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN; Codex CLI takes a top-level model line (model = "gpt-5.6-sol", as the one-click install writes) and a three-line provider block in ~/.codex/config.toml (base_url, wire_api = "responses", env_key) plus the key it names.

Global + China reachable

The same gateway is reachable from global networks and from Mainland China, so one integration serves teams on both sides without a separate setup.

Ledger, trace, and control

The gateway sits between your app and the models so it can do three things a direct call can't. The ledger records what every request cost at posted rates, drawn from your prepaid wallet. Customer Logs records the model, request ID, tokens, settled cost, recorded latency, status, and any sanitized error. The control layer enforces per-key budgets and default rate limits before a request reaches a provider, so a runaway loop or a leaked key can't drain the wallet.

Switch with one base URL change

Router One speaks the OpenAI Chat Completions API, so most integrations move over by changing the base URL and key. Set the two environment variables and your existing code keeps working.

terminal
# Route every model call through the gateway
export OPENAI_BASE_URL=https://api.router.one/v1
export OPENAI_API_KEY=sk-your-router-one-key

FAQ

What is an LLM API gateway?

An LLM API gateway is one endpoint you route every model call through instead of integrating each provider separately. It gives you a unified interface for 30+ models, plus routing, fallback, cost and latency traces, and per-key budget controls in one place — a ledger, a trace, and a control layer over your model usage. For the longer explainer, see /blog/what-is-ai-api-gateway.

Is Router One OpenAI-compatible?

Router One is OpenAI-compatible: it implements the OpenAI Chat Completions API at https://api.router.one/v1, so any library or tool that works with OpenAI works by changing the base URL. Claude Code uses the Anthropic-compatible endpoint at https://api.router.one.

Which models can I call?

30+ models across the major families — GPT, Claude, Gemini, and Grok — all through the same unified endpoint. Browse the current catalog and per-model rates on the models page.

How does routing decide which model to use?

The default production strategy is model_name, which honors the model you name: only routes serving that model are tried, in a gateway-managed order, and routes with a sustained upstream-error rate are moved to the back until they recover. Send model="auto" to let the gateway classify the request into a low, medium or high tier and pick a model from that tier's server-owned list. The dashboard shows the model and request ID.

What happens when a provider goes down?

For retryable upstream errors (429, 5xx, timeouts), a named-model request may be retried on the next healthy provider serving that same model, and a route that keeps failing is moved to the back of the order until it recovers. Customer Logs shows model-call usage, settled cost, recorded latency, and status without disclosing upstream providers, service routes, or internal attempts.

How does billing work?

You top up a prepaid wallet and pay per token at the posted model-rate token line, with checkout-visible FX/channel fees kept separate. Top up with a card or Alipay through one hosted checkout, or with USDT/USDC on six chains. Each API key can carry its own spend cap so usage stays within budget. Or subscribe to a Pro, Max or Ultra plan: request-based monthly quotas shared by the eligible models in each tier; calls beyond the quota, and models outside plan coverage, bill to the wallet at posted pay-as-you-go rates. Plans and fees: /pricing.

Choose the next step for your gateway evaluation

Pick the task you're on: move an existing OpenAI client, see how routing and failover behave, follow request costs, compare the gateway with relay platforms or other gateways, set up your client, or build your own service on top.

MigrationMove an existing OpenAI clientUse the exact base URL and key swap, then confirm the SDK-compatible request contract before changing production traffic.Request contractCheck structured outputs through the gatewayWhat the gateway validates in response_format before a model is called, what it forwards as sent, and why enforcement stays with the model.RoutingUnderstand model and provider selectionSee how exact-model requests, same-model failover, demotion of failing routes and model="auto" tiers fit together.Cost controlTrack request and API-key spendFollow token usage and billed cost from an individual request into the API-key and account-level views.VerificationCheck request usage, latency, and costUse request traces to verify the model and request ID, token counts, latency, status, and billed cost.Usage detailsReconcile cache tokens with request costsRead the protocol-specific usage fields, separate cache reads from writes, and avoid counting the same input tokens twice.EvaluationCompare gateways against relay platformsFive concrete differences between a managed gateway and a stitched-together API relay: stability, traceability, and billing.ReliabilitySee what happens when a route failsHow retryable provider errors (5xx, timeouts) can be retried on another healthy route serving the same requested model — conditional, not a zero-downtime guarantee.Client setupConnect your client or SDKOpen the per-client integration guides to point an editor, CLI, or SDK at the gateway endpoint.FrameworkConfigure LlamaIndexPoint LlamaIndex's OpenAI-compatible LLM class at the gateway base URL and switch models by string.Model catalogCopy a current model ID and its rateThe live catalog lists every model ID the gateway serves, its per-1M-token rate, context window, capabilities, and the endpoints it answers on.QuickstartSend your first requestCreate a key, pick the right base URL (with or without /v1), and send a first request with curl, the OpenAI SDK or the Anthropic SDK.ResellersBuild your own LLM API service on a managed upstreamGive each downstream customer its own API key and maxSpend budget, then reconcile from per-key logs, usage and CSV exports.EvidenceCheck availability evidence before you switchPer-model 7- and 30-day success share on /models, active incident state on /status, and the SLA terms.
Compare with other gateways(7)

Route every model through one gateway.

Get your API key