> ## 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.

# Retry behavior

> Which errors to retry, which not, and why streams are never replayed.

## Retryable

| Status | Codes | How to retry |
| - | - | - |
| `429` | `rate_limited` | Wait for `Retry-After`, then retry. `insufficient_quota` shares the status but is a funding decision: do not retry it. |
| `502` | `provider_error` | Transient upstream failure. Retry with [backoff](/api/api-reference/errors-and-rate-limits/backoff). |
| `503` | `unavailable` | Transient. Retry with backoff. |

## Not retryable

| Status | Meaning |
| - | - |
| `400` | The request is wrong (`invalid_request`, `model_unavailable`). Fix it first. |
| `401` | The credential is wrong (`unauthorized`). Fix the key. |
| `403` | Not permitted (`forbidden`, `registered_free_unavailable`). |
| `404` | Wrong path (`unknown_route`). Fix the base URL. |
| `429` `insufficient_quota` | Out of balance or allowance. Add funds or wait for the reset. |

## Streams

The gateway never replays a live stream. A failure after bytes were written arrives as a terminal error chunk (`finish_reason: "error"`); retry with a new request from the client.

## Uncertain Outcomes

A failure after the provider may have started work is reported as uncertain. Those responses carry `nito_operation_id`, a durable ID to quote to support, not a status-lookup key. Do not blindly resend a request that may already have run.

## Related

* [Backoff](/api/api-reference/errors-and-rate-limits/backoff)
* [Rate limits](/api/api-reference/errors-and-rate-limits/rate-limits)
* [Status mapping](/api/api-reference/errors-and-rate-limits/status-mapping)


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