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 Claude Opus 4.7 via RouterBase. Flagship Opus; prompt caching and tool calling.
$5 / 1M in

Anthropic Claude Opus 4.8 via RouterBase. Latest flagship Opus; 1M-token context, adaptive thinking, mid-conversation system messages, prompt caching.
$5 / 1M in

Anthropic Claude Sonnet 4.6 via RouterBase. Balanced cost/capability.
$3 / 1M in

Anthropic Claude Sonnet 5 via RouterBase. Sonnet-tier flagship; 1M-token context, prompt caching, OpenAI-compatible chat completions.
$2 / 1M in

DeepSeek V3.2 via RouterBase. OpenAI-compatible chat completions.
$0.27 / 1M in

DeepSeek V4 Pro via RouterBase. OpenAI-compatible chat completions.
$1.74 / 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.