Router One Documentation
A concise guide from account setup to calling the OpenAI-compatible API gateway.
Get started
- 1
- 2
- 3
Send your first request
Use curl, the OpenAI SDK, or the Anthropic SDK with Authorization: Bearer <key>.
Quickstart
One-click setup (recommended)
One command installs the CLI, writes the gateway config, and verifies your key with a 1-token test request. Existing config files are backed up automatically.
The key is only inserted into the command locally in your browser; it is never uploaded.
curl -fsSL https://router.one/install/claude-code.sh | bash -s -- sk-your-api-keyConfig takes effect immediately — run claude to start.
$env:ROUTER_ONE_API_KEY = "sk-your-api-key"; irm https://router.one/install/claude-code.ps1 | iexConfig takes effect immediately — run claude to start.
Review the script before running: /install/claude-code.sh · /install/claude-code.ps1
curl -fsSL https://router.one/install/codex.sh | bash -s -- sk-your-api-keyNew terminals work right away; in the current one, run source ~/.zshrc (or your shell profile) first, then codex.
$env:ROUTER_ONE_API_KEY = "sk-your-api-key"; irm https://router.one/install/codex.ps1 | iexThe current session is ready — run codex to start.
Review the script before running: /install/codex.sh · /install/codex.ps1
Connect your client and verify the result
Client integrations
Find your coding tool, SDK, or chat app. Match its URL field and protocol, then follow the setup guide.
Connection troubleshooting
Work through URL, DNS, TLS, HTTP, and model-response checks when the first request fails.
Read your request logs
Understand request IDs, HTTP status, tokens, settlement, and latency. A 200 response alone does not confirm a completed stream.
Example request
curl https://api.router.one/v1/chat/completions \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "auto",
"messages": [{"role": "user", "content": "Hello"}]
}'What is Router One?
Router One is a unified LLM API gateway. It gives your application one OpenAI-compatible endpoint for model calls, smart routing, fallback, budgets, and request-level observability.
Core value
Use one API key and one base URL for common LLM tools and models. Router One handles provider differences, cost tracking, and routing behind the gateway.
Main API entry points:
OpenAI-compatible API / Codex CLI / OpenClaw / Hermes Agent:
https://api.router.one/v1
Claude Code / Anthropic-compatible endpoint:
https://api.router.oneAPI reference
Chat
/v1/chat/completionsCreate a chat completion — OpenAI Chat Completions compatible, streaming and non-streaming.
/v1/messagesCreate a message — Claude / Anthropic Messages compatible, for currently listed Claude models (the Claude Code path).
/v1/responsesCreate a response — OpenAI Responses API compatible, for currently listed GPT-family models (native path for Codex CLI).
Models
Account
Images
Videos
Guides
Quickstart
First request in five minutes — base URLs, curl, OpenAI SDK, Anthropic SDK, streaming.
CLI setup guide
One-click setup for Claude Code and Codex; manual steps for OpenClaw and Hermes Agent.
CC Switch setup guide
Connect Claude Code or Codex to Router One with a desktop app — no manual environment variables.
FAQ & troubleshooting
Base URLs, 401/402/429 debugging, CLI configuration, and per-request costs.
Model catalog
Compare model IDs, pricing, context windows, and capabilities.
Request logs
Filter by model and date, then inspect request IDs, HTTP status, tokens, settlement, and recorded latency.
Common error codes
| Code | Meaning | What to do |
|---|---|---|
401 | Invalid or missing API key | Check the Authorization header. |
402 | Insufficient balance or key spend cap reached | Top up, or raise the key's maxSpend — topping up does not lift a key cap. |
429 | Rate limit exceeded | Read Retry-After and back off; the code names the limit (RATE_LIMIT_EXCEEDED, TOKEN_QUOTA_EXCEEDED, SUBSCRIPTION_QUOTA_EXCEEDED). Contact support to raise limits. |
500 | Internal server error | Retry shortly; contact support if it persists. |