> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trynito.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Uptime and Fallbacks

> What Nito handles, what your app adds, and the one thing never to do.

## What Nito Does

* **Failover within a model.** A logical model can have several physical backends. Nito filters by your requirements and routes around a backend in trouble.
* **A circuit breaker.** A provider that keeps failing is held out and probed again after a cooldown.

**The privacy level never silently downgrades.** A `:confidential` request that cannot be served as asked fails. Your fallback logic must never retry at a weaker level.

## App-Level Fallback

Only your app knows which alternate model is acceptable. On `502` (`provider_error`) or `503` (`unavailable`), fall back to an alternate you selected from `GET /v1/models` at startup, at the same privacy level.

```shellscript theme={"theme":{"light":"github-light","dark":"github-dark"}}
try MODEL_ID
  on 502 / 503 -> try <fallback-model-id>  (same privacy level)
```

## Retry With Backoff

* Retry `502` and `503`.
* On `429`, honor `Retry-After` as a floor. `429` also covers `insufficient_quota`, which retrying will not fix; check the `code` first.
* Never retry `400`, `401`, or `403`; they fail identically.

Exponential backoff with jitter, capped attempts.

```shellscript theme={"theme":{"light":"github-light","dark":"github-dark"}}
attempt 1 -> fail 503 -> wait base * 2^0 + jitter
attempt 2 -> fail 503 -> wait base * 2^1 + jitter
attempt 3 -> fail 503 -> give up, fall back or surface error
# any Retry-After header overrides the computed wait
```

## Together

1. Nito routes within the model and trips its breaker. Nothing to do.
2. Transient `502`/`503`: retry with backoff, honoring `Retry-After`.
3. Retries exhausted: fall back to an alternate model at the same privacy level.
4. Still failing: surface a clean error keyed by the request ID.

Full status handling: [Error Format](/api/api-reference/overview/error-format).

## Related

<CardGroup cols={3}>
  <Card title="How the API Works" icon="gears" href="/api/get-started/how-nito-works">
    The request lifecycle.
  </Card>

  <Card title="Error Format" icon="diamond-exclamation" href="/api/api-reference/overview/error-format">
    The error envelope.
  </Card>

  <Card title="Retry Behavior" icon="arrow-left-rotate" href="/api/api-reference/errors-and-rate-limits/retry-behavior">
    Safe to retry, or not.
  </Card>

  <Card title="Rate Limits" icon="list-radio" href="/api/api-reference/errors-and-rate-limits/rate-limits">
    The limit headers.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.