Routing
How the router picks a provider for every request, and how you choose which providers it may use.
Routing is automatic: you keep your stock Anthropic, OpenAI or Gemini SDK, and provider choices live in your dashboard, not in your code.
How a request is routed
- Candidates are the providers that carry your model and are working right now.
- Providers you switched off in your settings are dropped.
- What remains is ranked by price for both input and output tokens, cheapest first.
- The router tries them in that order. If one fails, the next serves.
The provider that serves the request prices it. If a request fails over to a pricier provider, you pay that provider's price.
Choosing providers
Open Dashboard → Settings → Providers and switch off any provider you don't want serving your requests. That set is the default for every key on the account.
A single key can override it. When you create or edit a key, give it its own set of providers instead of the account default. Changes apply from the next request, with no change to your code.
If your settings leave no provider that carries a model, requests for that model return 404 with a message pointing you to your provider settings. The refusal happens before any provider is contacted and writes no usage row. Nothing was served, so nothing is billed.
Reading prices
GET /v1/pricing lists each model's current price plus a providers array, cheapest first:
{ "id": "claude-sonnet-5", "billed": {"pricing_per_mtok": {"input": "1.98", "output": "9.9"}}, "providers": [ {"provider": "A6api", "billed_input_per_mtok": "1.98", "billed_output_per_mtok": "9.9", "fresh": true}, {"provider": "7API", "billed_input_per_mtok": "3.96", "billed_output_per_mtok": "19.8", "fresh": true} ]}billed_* is what you are charged. fresh: false carries no figures: that provider has no current price for the model, and the model's list price applies if it serves.