An OpenAI-compatible API for every model
Router One exposes an OpenAI-compatible endpoint at https://api.router.one/v1. Change one base URL, keep the OpenAI SDK you already use, and get instant access to Claude, GPT, Gemini, Grok and 30+ models through a single endpoint — with smart routing, automatic provider fallback, and a per-request cost trace for every call.
Drop in by changing one base URL
Router One speaks the OpenAI Chat Completions API. Point your client at the Router One base URL, swap in your Router One key, and the rest of your code is unchanged — no new SDK, no rewrite.
# Keep your OpenAI SDK — just point it at Router One export OPENAI_BASE_URL=https://api.router.one/v1 export OPENAI_API_KEY=sk-your-router-one-key
Call any model through the OpenAI SDK
Because the endpoint is OpenAI-compatible, the same SDK call reaches non-OpenAI models too. Set the model field to a Claude or Gemini model ID and the request routes through Router One — no separate client per provider.
from openai import OpenAI # Same OpenAI SDK, calling a Claude model client = OpenAI(base_url="https://api.router.one/v1", api_key="sk-...") resp = client.chat.completions.create( model="anthropic/claude-sonnet-5", messages=[{"role": "user", "content": "Hello from the OpenAI SDK"}], ) print(resp.choices[0].message.content)
Works with the tools you already use
Any client that accepts a custom OpenAI-compatible base URL works with Router One. Set the base URL and key, and keep your existing workflow.
OpenAI SDKs
The official Python and Node OpenAI libraries — set base_url / OPENAI_BASE_URL and your Router One key.
Claude Code
Router One also exposes an Anthropic-compatible endpoint at https://api.router.one so Claude Code works natively.
OpenAI Codex CLI
Add Router One as a provider in ~/.codex/config.toml (base_url https://api.router.one/v1, wire_api = "responses", env_key) and set the top-level model line to a model whose page lists POST /v1/responses — GPT, DeepSeek V4 and Grok chat models.
Cursor, Cline & Aider
Editor and CLI coding agents that allow a custom OpenAI-compatible base URL connect the same way.
TRAE
TRAE's custom-model form takes Router One in OpenAI Chat Completions format — base URL https://api.router.one/v1 — for every chat model.
Qoder
Qoder's bring-your-own-key models accept an OpenAI-compatible base URL, https://api.router.one/v1, over Chat Completions — or Responses for GPT, DeepSeek V4 and Grok chat models.
CodeBuddy
CodeBuddy reads custom models from models.json, which supports OpenAI-compatible APIs only — set url to the full https://api.router.one/v1/chat/completions.
Hermes Agent
Hermes Agent's hermes model wizard takes Router One as a Custom endpoint — API base URL https://api.router.one/v1 with Chat Completions for every chat model.
GitHub Copilot CLI
Copilot CLI's bring-your-own-key variables point it at https://api.router.one/v1; with COPILOT_PROVIDER_WIRE_API=completions it uses Chat Completions for every chat model.
Cherry Studio
Cherry Studio's custom provider takes the host root https://api.router.one for its OpenAI endpoint and appends /v1/chat/completions itself.
Chatbox
Chatbox's custom provider in OpenAI API Compatible mode takes the API host https://api.router.one/v1 for every chat model.
Routing, fallback, and traces come for free
The same OpenAI-compatible endpoint gives you smart routing and resilience without extra integration work.
- Production traffic uses model_name by default, so a request is served by the model you name. Set model to "auto" and the gateway picks a low, medium or high tier for the request and serves it from that tier's server-owned model list.
- On a retryable upstream error (429, 5xx, timeout), a named-model request may try the next healthy provider serving that same model; routes with a sustained upstream-error rate are moved to the back of the order until they recover.
- Customer Logs shows the model, request ID, tokens, settled cost, total time (plus time to first token on streamed requests that produced output), status, and any sanitized error for recorded calls. Upstream provider identities, routes, and internal attempts are not disclosed.
FAQ
Is it truly OpenAI-compatible?
Router One is a drop-in OpenAI-compatible API: it implements the OpenAI Chat Completions API at https://api.router.one/v1, and libraries and tools built for OpenAI work after changing the base URL and key. It also serves the Responses API at /v1/responses for GPT, DeepSeek V4 and Grok chat models (the path Codex CLI uses).
Do my existing OpenAI integrations work unchanged?
In most cases, yes. You change the base URL and API key; your request and response handling stays the same. The main difference is that you can now set the model field to models from other families.
Can I call Claude or Gemini through the OpenAI SDK?
Yes. Set the model field to a Claude, Gemini, Grok, or other supported model ID and the OpenAI SDK call routes through Router One to that model. Browse the full catalog on the models page.
What about the Anthropic-compatible endpoint for Claude Code?
Claude Code expects the Anthropic API shape, so Router One also exposes an Anthropic-compatible endpoint at https://api.router.one. Set ANTHROPIC_BASE_URL there and Claude Code works natively.
Do streaming, tool calls, and structured outputs work?
Router One follows the OpenAI Chat Completions contract: streaming responses, tool/function calling, and response_format (json_object, or json_schema with a named schema) all travel on the same request shape, with support varying by underlying model. The gateway checks the response_format envelope and forwards it to the model; schema enforcement is the model's. See the docs and the streaming, tool calling, and structured outputs guides for the current per-feature details.
Choose the next step for your OpenAI-compatible integration
Once the base URL is switched: confirm the request format, pick a current model ID, open the guide for your client or framework, add streaming or tool calling, and check the first call in a trace.
Framework and agent SDK setup guides(12)
Ready to point your OpenAI SDK at every model?
Get your API key