Routing
Pick providers by price, start latency, or uptime, and fall back when a create fails.
How a create is routed
- Sandcovery lists the providers you hold a credential for.
- It drops each provider that cannot run your spec, that your API key does not allow, or that your preferences exclude.
- It ranks the rest by list price and by the last 15 minutes of provider health.
- It creates on the first candidate and, when fallbacks are on, moves to the next one after a failed create.
A create counts as failed on a capacity or quota error, a provider 5xx, or a timeout. The response and the activity log list every attempt.
Provider preferences
Set preferences in the provider object of a create request.
| Field | Meaning |
|---|---|
order | Providers to try first, in this order |
only | The only providers to use |
ignore | Providers to skip |
sort | Rank by price, latency, or uptime |
allow_fallbacks | Whether to try the next candidate after a failed create (default true) |
{
"size": "2x4",
"provider": {
"order": ["daytona", "e2b"],
"allow_fallbacks": true
}
}Routing suffixes
A standard size name takes a suffix that sets the ranking for that create.
| Suffix | Ranks candidates by |
|---|---|
:cheapest | List price |
:fastest | Measured start latency |
:most-reliable | Uptime over the last 15 minutes |
{ "size": "2x4:cheapest" }A size with no suffix uses default routing, which balances price, speed, and reliability and spreads concurrent load across providers.