OpenAI-compatible API
A drop-in replacement for the OpenAI SDK. Change the base URL, keep your code.
RouterBase routes LLM and multimodal calls through one OpenAI-compatible API — with weighted multi-channel routing and automatic failover built in.
Open source · Self-hostable · OpenAI SDK drop-in
Point the OpenAI SDK at RouterBase and call whatever the catalog carries.
Channels are picked by weight. If the first one fails mid-request, the next takes over — you get one response either way.
Everything the gateway can route to today.

Anthropic's most capable Opus-tier model for the hardest reasoning and agentic work.
$5 / 1M in

Anthropic's balanced Sonnet-tier model — strong at coding, analysis and long documents.
$2 / 1M in

The lightest, cheapest Gemini 3.1 preview tier for simple high-throughput tasks.
$0.25 / 1M in

Google's fast, cost-efficient Gemini tier for high-volume chat and tool use.
$1.5 / 1M in

Preview of Google's Gemini 3 Flash generation. May change before general availability.
$0.5 / 1M in

Zhipu's GLM flagship — competitive general reasoning at a lower price point.
$1.4 / 1M in
Why RouterBase
The parts that are tedious to get right, already done.
A drop-in replacement for the OpenAI SDK. Change the base URL, keep your code.
Several upstreams per model, each with its own weight. Cold-standby channels sit at weight 0 until they're needed.
A failing channel is retried on the next one mid-request. Non-retryable errors stop immediately instead of amplifying cost.
Channels that keep failing are disabled automatically, then probed with a real minimal call — never a free endpoint that lies when a provider is out of credit.
Cost is estimated and held against your balance before the upstream call. A runaway script can't push the account negative.
Every attempt is logged with the channel it used and its attempt number — so you can see when a call was transferred.
Using RouterBase
From key to response in a couple of minutes.
Sign up and generate an sk-rb-… key from the dashboard.
The OpenAI SDK works as-is — just swap the base URL.
Same request shape you already use, streaming included.

A unified gateway that puts several upstream providers behind one OpenAI-compatible endpoint, with weighted routing and automatic failover between them.
Every model in the catalog, behind one key.
Browse modelsNo credit card required to create a key.