Skip to content

One unified API for resilient AI delivery

Router One is a unified LLM API gateway: keep your SDK, change the base URL and key, get eligible same-model fallback.

Switch without rewritingKeep your tools. Change the endpoint.

.env
OpenAI-compatible
https://api.router.one/v1
Anthropic-compatible
https://api.router.one
API key
sk-xxx

One set of endpoints, three protocols

POST

Chat Completions

/v1/chat/completions

OpenAI SDK
POST

Responses API

/v1/responses

Codex CLI
POST

Messages API

/v1/messages

Claude Code

Works with the clients you already use

  • OpenAI SDK
  • Anthropic SDK
  • Claude Code
  • Codex CLI
  • Cursor
  • Cline
  • Cherry Studio
  • LangChain
  • Vercel AI SDK
All client guides

Integrate

Change two settings. Keep shipping.

Router One is an OpenAI-compatible LLM API gateway: one endpoint at https://api.router.one/v1 for GPT, Claude, Gemini, Grok and more, with exact-model routing, same-model fallback and per-request cost traces. Point your application, Claude Code, or Codex at it without replacing the clients your team already knows.

Read the quickstart
main.pyPython
from openai import OpenAI client = OpenAI(    base_url="https://api.router.one/v1",    api_key="sk-xxx") response = client.chat.completions.create(    model="anthropic/claude-sonnet-4.6",    messages=[{"role": "user", "content": "Hello!"}])# Works with any OpenAI-compatible SDK
terminalShell
# Claude Code → Route through Router Oneexport ANTHROPIC_BASE_URL="https://api.router.one"export ANTHROPIC_AUTH_TOKEN="sk-xxx" # Two variables. ANTHROPIC_API_KEY is not required —# unset it if you exported it earlier.
~/.codex/config.tomlTOML
# Codex CLI → Route through Router Onemodel = "gpt-5.6-sol"model_provider = "router" [model_providers.router]name = "Router One"base_url = "https://api.router.one/v1"wire_api = "responses"env_key = "ROUTER_ONE_API_KEY" # Export ROUTER_ONE_API_KEY and that's it.

The two highlighted lines are the whole change: endpoint and key. The rest of your code stays as it is.

Status
200 OK
Endpoint
POST /v1/chat/completions
Request ID
demo_req_7f3a
Usage
512 input · 200 output tokens
Recorded cost
$0.0042
Illustrative example

Built for continuity

A failed route does not have to end the request

For retryable provider errors, Router One can try another eligible route serving the same requested model—and record the final result.

RequestPOST /v1/responses · model: example-chat-model

Request ID: demo_req_7f3aIllustrative example

Illustrative internal route sequence

  1. Request accepted

    The application asks for one exact example model.

    POST /v1/responses
  2. Route A selected

    Gateway policy selects an eligible provider route for that model.

    Retryable error
  3. Eligible fallback route succeeds

    After a retryable Route A error, Route B serves the same requested model; no cross-model substitution is implied.

    200 · Route B
  4. Final trace recorded

    Customer Logs records the model, request ID, usage, cost, recorded latency, and status.

    Trace recorded

Customer-visible final trace

Model
example-chat-model
Request ID
demo_req_7f3a
Input tokens
512
Output tokens
200
Latency
1,180 ms
Status
200

Illustrative cost ledger

Input512 tokens · $2.00 / 1M
$0.0010
Output200 tokens · $16.00 / 1M
$0.0032
Illustrative total$0.0042

Customer Logs shows the model, request ID, tokens, charge, recorded latency, status, and any sanitized error. Upstream supplier identities, service routes, and intermediate attempts remain internal; support can investigate using the request ID.

Source
Router One public routing and observability contracts
Contract reviewed
Window
One synthetic request
Limits
Synthetic values only—not production traffic, a benchmark, an SLA, or a price quote.

Billing & payment

AI billing on your terms

Choose pay-as-you-go flexibility or a predictable subscription, then fund it by card, local payment, or stablecoin.

Pay-as-you-go wallet

Pay only for what you use

Top up first, then pay the posted rate for actual token usage. Unspent wallet balance does not expire.

  • Per-token billing
  • Posted rates
  • Balance doesn't expire

Pro · Max · Ultra

Make monthly access predictable

Eligible models in a tier share monthly request quotas; wallet balance covers calls outside plan coverage.

  • Standard models
  • Mid-tier models
  • Premium models
  • Flagship models

Card or Alipay, one checkout

One hosted checkout takes major credit and debit cards plus Alipay, so an RMB top-up works without a US credit card.

  • Cards
  • Alipay
  • Automatic invoices

Fund with USDT / USDC

Stablecoin top-ups support cross-border teams, Web3 products, and card-limited workflows on published networks.

  • Tron
  • BSC
  • Ethereum
  • Polygon
  • Base
  • Arbitrum

Observability

Reconcile model-call usage and cost

Investigate requests by ID, reconcile recorded usage and charges, and contain runaway calls with key-level limits.

Request logsIllustrative exampleDashboard → Logs
Illustrative request log
TimeAPI keyModelStatusInput / output tokensCostLatencyRequest ID
14:02:18prod-backendexample-chat-model200512 / 200$0.00421,180 msdemo_req_7f3a
14:01:55staging-apiexample-fast-model2001,024 / 512$0.00142,060 msdemo_req_7f2e
14:01:40prod-backendexample-vision-model2008,600 / 900$0.00291,420 msdemo_req_7f2b
14:01:12batch-jobsexample-chat-model402——95 msdemo_req_7f29
14:00:47support-botexample-fast-model2003,200 / 640$0.00351,910 msdemo_req_7f24

402This key hit its spend cap: its wallet-paid requests return 402 while every other key keeps working.

  1. Debug from the request IDMatch the request ID, then inspect the model, tokens, wallet charge or plan quota used, recorded latency, status, and any sanitized error to investigate the result.See a request trace
  2. Connect request costs to your workloadsSave each workload name with its request IDs in your application logs, then reconcile the model, tokens, and wallet charge or plan quota used with Customer Logs. Separate keys let you set each workload’s spending cap.See workload cost tracking
  3. Limit one key without stopping the restEach key can carry its own spend cap on wallet charges and an optional expiry, so one key can be contained without stopping unrelated applications. Rate limits follow platform defaults and can be raised on request.Review key guardrails

FAQ

The three questions teams ask before switching

Confirm network access, data handling, and product boundaries before you send production traffic.

Need another answer? Read all FAQs

Can my mainland China team call Router One directly?

Mainland China teams can call Router One directly, without a VPN or proxy. The published China latency benchmark lists its measurement window, method and limitations; actual performance varies by region and network.

Do prompts or model responses land in Router One storage?

Router One does not retain prompt or model-response bodies from direct API calls. It records request metadata for billing, usage tracking, and troubleshooting. Playground saves conversation history so users can revisit and continue their chats. Retention scope and deletion requests are covered on the data-retention page.

What stays in my application?

Agent workflows, state, and tool execution stay in your application or orchestration framework. Router One handles each model call.

Your next model call can run through Router One

Keep your SDK, start with one API key, and expand model coverage when your product needs it.

OpenAI-compatible base URL

https://api.router.one/v1