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

# Rate Limits

> Request rate limits per API key.

## Rate limit tiers

| Key Environment   | Requests per Minute | Burst |
| ----------------- | ------------------- | ----- |
| Test (`af_test_`) | 20                  | 40    |
| Live (`af_live_`) | 60                  | 120   |

## Rate limit headers

Every API response includes rate limit headers:

| Header                  | Description                            |
| ----------------------- | -------------------------------------- |
| `x-ratelimit-limit`     | Maximum requests in the current window |
| `x-ratelimit-remaining` | Remaining requests                     |
| `x-ratelimit-reset`     | Unix timestamp when the window resets  |

## Rate limit exceeded

When the rate limit is exceeded, the API returns:

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

HTTP status: `429`

## Best practices

* Implement exponential backoff for retries
* Respect the `x-ratelimit-reset` header
* Use the `idempotency-key` header for non-streaming requests to avoid double charges
* Use test keys (`af_test_`) during development
