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, DeepSeek and 25+ 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-rk-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-rk-...") resp = client.chat.completions.create( model="claude-sonnet-4-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
Point Codex CLI at the OpenAI-compatible base URL and run it against any supported model.
Cursor, Cline & Aider
Editor and CLI coding agents that allow a custom OpenAI-compatible base URL connect the same way.
Routing, fallback, and traces come for free
The same OpenAI-compatible endpoint gives you smart routing and resilience without extra integration work.
- Set model to "auto" to route across configured candidates using latency, cost, and quality weights.
- On a provider 5xx or timeout, smart routing fails over to the next healthy same-family route when one is available.
- Every request returns a trace — model, provider, tokens, cost, latency, status, and the route or fallback decision — in a real-time dashboard.
FAQ
Is it truly OpenAI-compatible?
Yes. Router One implements the OpenAI Chat Completions API at https://api.router.one/v1. Libraries and tools built for OpenAI work by changing the base URL and key.
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, DeepSeek, 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 and tool calls work?
Router One follows the OpenAI Chat Completions contract, including streaming responses and tool/function calling, with support varying by underlying model. See the docs for the current per-feature details.
Related
Ready to point your OpenAI SDK at every model?
Get started free