Product · Automatic failover
One provider fails.The next one answers.
When a provider is rate-limited, down or slow, the request moves to the next one within the same call, in under 20 ms. No retry code, and failed requests are free.
How it works
Four things that happen in one call
- 01
Enter nearby
The request enters at the point closest to you.
- 02
Go to the fastest
Among the providers that are up, it goes to whichever responds fastest right now.
- 03
Move on errors
On a timeout or a 5xx, that provider is dropped for this call and the request moves to the next one, in under 20 ms.
- 04
Pay for success only
Failed requests are free. How many times it moved and who answered are in the call's record.
One call
Your code sees one normal response
- Sent first to
- anthropic/claude-sonnet
- fastest right now
- Result
- 503 Service Unavailable
- provider temporarily down
- Moved to
- openai/gpt
- moved in 20 ms
- Result
- 200 OK
- normal response
- Billing
- successful call only
- failed requests are free
Sample record; the numbers are for illustration.
Compare
Stop writing this layer yourself
- Every provider has its own error codes, retries and backoffNothing to write. The failing provider is replaced and your code gets a normal response.
- When the main model is down, switching means a code change and a deployIt switches within the same call. No code change, no deploy.
- One slow provider at peak slows everything downEach call goes to whichever is fastest right now.
FAQ
About automatic failover
When does a request move to the next provider?
When the provider times out or returns a server error such as a 5xx.
How long does switching take?
It happens within the same call, in under 20 ms.
Does switching cost more?
Failed requests are free; you pay only for the call that succeeded.
Can I see that a switch happened?
Yes. Every call has a record: where it went first, why it moved, and who answered.
Start
Try it with one key
Change one line and you're running. Failover is on by default.