One API. 151+ models.
Call Alibaba US (Qwen, DeepSeek β our largest catalog), OpenAI (GPT, o-series), AWS Bedrock (Claude, Llama, DeepSeek, Nova, Qwen), Azure Foundry, Google Vertex AI (Gemini), and Anthropic (Claude) live today through a single endpoint. Cost, latency, and weighted routing, deterministic A/B splits, configurable fallback chains β config, not redeploy.
Live routing trace
- Routing strategies
- 3
- Retries
- Configurable
- A/B splits
- Deterministic
- Fallback chains
- Opt-in
Cost, latency, weighted, per org
Per-org retry count + per-request override
Model + prompt variants, retry-safe
On error + on rate limit, cross-provider
Three strategies. One config field.
Pick the signal your workload cares about β cost, latency, or your own weighted split. The router does the rest, per org, no redeploy.
costprice per tokenPicks the cheapest capable model in your candidate set. Optimize the bill, not the benchmark.
latencyrecent success-weighted latencySteers each request to the candidate with the lowest recent success-weighted average latency for your org β a moving average over recent successful calls, weighted toward the newest.
weightedyour splitSplits traffic across the candidates in one Smart Router by the weight you give each. You call the router by the alias you named it.
A routing decision, end to end
Strategy match, primary provider, fallback chain, settle. A substitution is surfaced on the x-nr-model response header β the decision is made in process, with no extra network hop.
Routing decision flow
Request
POST /v1/chat/completions
Bearer sk-nrouter-..., model="gemini-2.5-flash"
Strategy match
cost Β· candidate set
Alias resolves to the cheapest capable model in your set.
Primary provider
Vertex AI Β· gemini-2.5-flash
429, 503, or 529 triggers the fallback chain.
Fallback chain
Anthropic β Bedrock β OpenAI
Ordered backup list per model; each link retried in turn.
Settled
cost + latency logged
Strategy, primary, fallback, retries: all in the request log.
Two-line migration from OpenAI
OpenAI-compatible
Change the base URL and the key. Thatβs it
The unmodified OpenAI SDK works against nRouter on every supported language. Streaming, tool use, JSON mode, embeddings, image generation β all proxied transparently.
- Python, Node.js, Go, Java, Ruby, PHP, cURL
- Base URL: https://api.nrouter.ai/v1
- Auth: Bearer sk-nrouter-...
- Drop-in for chat.completions, embeddings, and images
Two-line change
Full routing reference β strategies, fallbacks, retries, A/B
- Fallback chains
- Ordered backup list per model β on error and on rate limit. A 429, 503, or 529 triggers the next link, cross-provider (Vertex β Anthropic β Bedrock). Opt-in per org; the chain is configured, not coded.
- Retries + timeouts
- Per-org retry count (default 3) and request timeout, with a per-request override. Provider retry-after hints are honored on the retry.
- Deterministic A/B splits
- Split a model or prompt into variants and bucket traffic deterministically. The same authenticated virtual key stays on the same variant, so retries are consistent and results are attributable.
- Never depend on one model
- A Smart Router walks its candidates in order and skips any that no longer resolves to a served model, so one retired model does not take your alias down. If none of them is servable the call is refused, naming your alias β never quietly redirected to a model you did not choose.
- OpenAI-compatible surface
- Same chat.completions, embeddings, and images endpoints. Base URL https://api.nrouter.ai/v1, auth Bearer sk-nrouter-... Streaming, tool use, and JSON mode proxied transparently.
- Live model catalog
- Capabilities and fallback chains live in the catalog, not your repo. New models are added within hours of provider launch β public read-only catalog at /api/public/models.
Common routing questions
What latency does routing add?
Routing decisions are made in process, with no extra network hop between your call and the provider. We have not published a latency study, so we quote no measured overhead figure here; the dominant factor is always LLM inference time.
How many models are supported?
151+ models live now on Alibaba US, OpenAI, AWS Bedrock, Azure Foundry, Google Vertex AI & Anthropic; Alibaba US (Qwen, DeepSeek β our largest catalog), OpenAI (GPT, o-series), AWS Bedrock (Claude, Llama, DeepSeek, Nova, Qwen), Azure Foundry, Google Vertex AI (Gemini), and Anthropic (Claude) live today. We add new models within hours of provider launch. Check the model catalog for the full list.
Can I use custom routing strategies?
Yes. Create a Smart Router in your dashboard, give it a candidate set and a strategy β cost (cheapest capable candidate), latency (lowest recent success-weighted average latency), or weighted (your own split across those candidates) β then call it by the alias you gave it. The router resolves a candidate per request.
What happens when a provider goes down?
nRouter automatically retries with the configured fallback chain. If the primary model returns a 429, 503, or 529, we transparently retry on a backup model.
One key. One bill. Every model.
Replace your homegrown failover layer in an afternoon
Sign up, paste your virtual key, change the base URL. Cost / latency / weighted routing, A/B splits, and fallback chains are unlocked on every plan.