# Routing and fallback

Which provider runs your job, and what happens when one fails.

Several providers can run most models. For each request OpenGrid prices every provider that can take your exact input, checks its recent health and speed, and builds a plan of up to three providers.

## Routing modes

| routing | Order |
|---|---|
| `balanced` | Healthy providers first, then the lowest price, then the quickest. The default. |
| `cheapest` | Lowest price first, whatever its recent health. A pricier provider runs only after the cheaper ones fail. |
| `fastest` | Quickest measured provider first, except one that is down. It can cost more. |

## Health

Health is the success rate over the last ten minutes, for the provider overall and for the model on that provider: under 95% is degraded, under 80% is down. Failures caused by a request's own input do not count against a provider.

## Fallback

Fallback moves a job to the next provider when one fails or does not finish within 15 minutes. By default a fallback provider is used only if it costs at most 50% more than the first; set `max_price_usd` to choose your own cap, or `fallback: false` for exactly one provider.

A request the model's provider refuses for its content or input is never sent to another provider.

Source: https://opengrid.one/docs/routing
