Billing and routing
LLM router
An LLM router is the part of an AI system that decides, request by request, which model or provider serves a call, by rules such as price, speed, success rate or task, and can retry elsewhere when one fails.
Also called Model routing, LLM routing, Fallback routing
Checked November 29, 2026
At a glance
- Decides
- Which model or provider serves each request
- Typical rules
- Price, speed, success rate, the task
- Fallback
- To the next choice, before the answer starts
- In Claude Code
opusplan: Opus to plan, Sonnet to do the work- On /model
- Picks among the named model's channels; up to 3 tries
Routing comes in two kinds. One picks the model: a cheap one for easy requests and a strong one for hard ones. Claude Code's opusplan setting is an example: it uses Opus in plan mode and switches to Sonnet for the work (Claude Code docs). The other keeps the model and picks who serves it, when the same model is on offer from several providers or channels at different prices and speeds.
Fallback
A router can also retry: when its first choice fails before answering, the request goes to the next one, and the app never sees the failure. Once an answer has started streaming, switching would mean starting the answer again, so a router falls back only before the first token.
Routing on /model
Routing here keeps the model you named and picks its channel. Most models have several channels, each with its own price, speed and success rate and tagged Stable or Best effort; a request tries up to 3 of them, and you pay the prices of the one that served it (Routing).
| Strategy | Best for | Per request |
|---|---|---|
| Smart (the default) | A low price, without slow or failing channels | smart · :auto |
| Price | The lowest cost | price · :floor |
| Speed | A fast first token | speed · :nitro |
| Throughput | The most tokens per second | throughput |
| Success | Reliability | success |
Smart (the default)
- Best for
- A low price, without slow or failing channels
- Per request
smart·:auto
Price
- Best for
- The lowest cost
- Per request
price·:floor
Speed
- Best for
- A fast first token
- Per request
speed·:nitro
Throughput
- Best for
- The most tokens per second
- Per request
throughput
Success
- Best for
- Reliability
- Per request
success
- Choose the strategy for one request with the
x-sm-routeheader, or with a suffix on the model id, such asclaude-opus-5-5:floor. The suffix:stabletries the stable channels first, then the best-effort ones. - Each key routes Cheapest first (the default), Stable first, or by My channels: only the channels you tick (Key settings).
- To use one channel only, send its name in
x-sm-channel; responses name the channel that served them in the same header. GET /v1/channelsshows every channel's prices, tags and last 24 hours, with no key needed.
curl https://api.slashmodel.com/v1/chat/completions \
-H "Authorization: Bearer $SLASHMODEL_API_KEY" \
-H "x-sm-route: speed" \
-H "Content-Type: application/json" \
-d '{"model": "gpt-6.1-sol", "messages": [{"role": "user", "content": "Hello!"}]}'Where it applies on /model
Questions
Does the router pick the model for me?
No. It chooses among the channels that serve the model you named, in the order your strategy sets. The model is the one in your request's model field.
Which strategy should I use?
Smart, the default, for most work. Price (:floor) for batch jobs where speed doesn't matter, speed (:nitro) for chat and agents, and success, or :stable, when reliability matters most.
Sources
The makers' own pages, each opened on November 29, 2026.