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

# Rate limits

> Handle API v1 rate-limit responses without assuming fixed quotas.

API v1 applies rate limits to every operation. Do not hard-code one quota for
all endpoints. Use the response from each request.

## Rate-limit responses

When a request exceeds a limit, the API returns `429`:

```json theme={null}
{
  "error": {
    "code": "rate_limited",
    "message": "Rate limit exceeded."
  }
}
```

The response includes `Retry-After` as an integer number of seconds. Wait at
least that long before sending the next attempt.

```text theme={null}
Retry-After: 30
```

Do not retry a `429` immediately or run concurrent retries for the same work.

## Limiter outages

If the rate limiter cannot make a decision, the API fails closed with `503`
and `rate_limiter_unavailable`. This response does not include `Retry-After`
because it is not a quota denial.

Keep the two cases separate in logs and retry logic:

* `429 rate_limited` means the request exceeded a limit.
* `503 rate_limiter_unavailable` means the limiter was unavailable.

See [Errors](/guides/errors) for the shared error envelope.
