Rate limits
The AI API allows 100 requests per minute per IP address. This covers /ai, /ai/stream and /ai/sanitize-context.
When you hit the limit
Requests over the limit fail with HTTP 429 and the message Rate limit exceeded. The limit resets at the start of the next one-minute window.
Headers
Responses can include these headers so you can pace requests:
| Header | Meaning |
|---|---|
X-RateLimit-Limit | Requests allowed per window. |
X-RateLimit-Remaining | Requests left in the current window. |
X-RateLimit-Reset | When the window resets, as Unix time in seconds. |
Calling from your server
The limit is per IP address, so all requests from one server share it. Spread heavy jobs out, and retry with a short delay after a 429.