Skip to content
NewTry RouterPlus with free creditsTry playground →

LLM router for every provider

Name a model. The router picks a healthy provider for it from 16, fails over before the first token and tells you what it did.

  • 16Providers
  • 43Models
  • 24Models with a fallback provider
  • 0sBackoff between failover attempts
Providers
  • DeepInfra
  • Inference.net
  • StreamLake
  • Doubleword
  • Nebius
  • Phala
  • Novita AI
  • Chutes
  • Sail Research
  • Wafer
  • Morph
  • RunInfra
  • Munito AI
  • Particle AI
  • Mistral AI
  • Paper Instruments

Three rules the router keeps

  • The model you name is the model you get

    An unknown model is a 404 that names the id. The router never swaps in a different model.

  • Failover only before your answer starts

    Once the first token reaches you, the request stays with that provider. If it fails then, you get one error event and decide whether to retry.

  • Refusals are never rerouted

    A content-policy refusal comes back to you. The router does not shop the prompt around other providers.

How a request picks a provider

  1. Match the model

    Keep the providers that list the exact model id you asked for. No fuzzy matching and no silent substitute.

  2. Drop resting providers

    A provider cooling down after failures sits out until it recovers.

  3. Order the rest

    By each provider's live listed price, unless provider.order or your key's routing policy sets the order. The first to send output serves you.

Set the order yourself

OpenAI-compatible
curl https://api.routerplus.com/v1/chat/completions \
  -H "Authorization: Bearer $ROUTERPLUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "z-ai/glm-5.3-flash",
    "messages": [{ "role": "user", "content": "Hello" }],
    "provider": { "order": ["morphllm", "deepinfra-chat"] }
  }'

only limits the request to the providers you name, ignore skips them, and POST /v1/route shows the plan without sending the request. Routing docs

Steer the router

provider fieldEffect
orderTry these providers first, in this order. The rest stay as fallbacks.
onlyUse only these providers.
ignoreNever use these providers.
allow_fallbacksfalse keeps only the first route; if it is resting, you get a 503 with retry-after.
max_priceLeave out providers above a prompt or completion price per million tokens.
require_parameterstrue returns a 400 instead of dropping a field the provider does not take.

Per request in the body, or saved per org, workspace or key as a routing policy. Routing policies

Check the route

POST /v1/route · calls no provider, costs nothing
curl https://api.routerplus.com/v1/route \
  -H "Authorization: Bearer $ROUTERPLUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "model": "z-ai/glm-5.3-flash", "provider": { "order": ["morphllm"] } }'
HeaderTells you
x-tm-providerThe provider that served the request
x-tm-attemptsHow many providers were tried
x-tm-upstream-modelThe id the provider received, when it differs from yours
x-tm-dropped-paramsFields that were dropped, by name

GET /v1/generation?id= shows every attempt behind one request. Routing docs

FAQ

What is an LLM router?

A service between your code and the model providers that decides where each request goes. On RouterPlus you name the model, and the router picks a provider that serves it, fails over when one is down and reports the route it took.

How does RouterPlus choose a provider?

It keeps the providers that serve the exact model id, drops any resting after failures, and tries the rest in order of live listed price. provider.order puts the providers you name first; a routing policy on your key keeps its saved order.

Will the router switch me to a different model?

No. The router only chooses among providers of the model you asked for. An unknown model is a 404 that names the id, and a dedicated endpoint never routes to a different model.

What happens if a provider fails mid-answer?

Before any output reaches you, the router moves to the next provider with zero backoff. After output starts, it stays with that provider: you get the tokens produced plus one terminal error event, and the retry is your call.

How many models have a fallback provider?

24 models in the catalog are served by more than one provider, so the router has somewhere to fail over to. A request limited with only, or with allow_fallbacks set to false, gives that up.

Can I set routing for a whole team?

Yes. A routing policy saved for an organization, workspace or key sets the order and who pays. A request's provider object can narrow a saved policy but never adds routes to it.

Do I pay for failed attempts?

You pay for every settled attempt, including ones that failed over, because the provider billed for them. usage.cost on the response is the full request total and x-tm-attempts shows how many dispatches happened.

Route every request with one key