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

# Rate Limiting

> API rate limits and how to handle them.

Each API key is limited to **100 requests per minute**. The window resets every 60 seconds on the minute boundary. Rate limits are enforced per API key, so each key has its own independent counter.

Every response includes the following headers:

| Header                  | Description                              | Example      |
| ----------------------- | ---------------------------------------- | ------------ |
| `X-RateLimit-Limit`     | Maximum requests per window              | `100`        |
| `X-RateLimit-Remaining` | Requests remaining in the current window | `73`         |
| `X-RateLimit-Reset`     | Unix timestamp when the window resets    | `1640995260` |

When you exceed the limit, the API returns `429 Too Many Requests` with a `Retry-After` header indicating how many seconds to wait before retrying.

```json theme={null}
{
  "statusCode": 429,
  "message": "Rate limit exceeded",
  "retryAfter": 45
}
```

Use exponential backoff when handling 429 responses. Wait for the `Retry-After` duration, then retry with the same request. Spread requests evenly across the minute rather than bursting at the window start.

<Note>
  Use separate API keys for development and production environments. Contact support if you need a higher rate limit for your use case.
</Note>
