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

# Errors and retries

> Handle provider-compatible errors and retry temporary failures safely.

Errors follow the compatibility surface used by the request: OpenAI-shaped for
Chat Completions and Responses, and Anthropic-shaped for Messages.

| Status | Meaning                                               | Recommended action                                 |
| ------ | ----------------------------------------------------- | -------------------------------------------------- |
| `400`  | Invalid request or invalid provider key configuration | Correct the request or provider-key configuration. |
| `401`  | Missing or invalid Tokenless API key                  | Verify the credential and authentication header.   |
| `402`  | No available account credit                           | Add credit in the dashboard.                       |
| `429`  | Rate limited                                          | Retry with exponential backoff and jitter.         |
| `503`  | No upstream candidate currently available             | Retry with exponential backoff and jitter.         |
| `529`  | Temporarily overloaded                                | Respect `Retry-After`, then retry.                 |

Do not automatically retry malformed requests, authentication failures, or
invalid provider-key errors. For temporary failures, cap the number of retries
and include jitter to avoid synchronized retry spikes.

## Correlation

Capture the `X-Request-Id` response header whenever present. It is the most
useful identifier when investigating a request with Tokenless support.
