How can my code tell how close it is to a key's rate limit?
Keyed API responses carry headers that tell you where you stand:
| Header | Meaning |
|---|---|
X-RateLimit-Limit | The key's requests per minute |
X-RateLimit-Remaining | Requests left in the current window |
Retry-After | On a 429: seconds to wait before trying again |
Good handling#
- Slow down when
X-RateLimit-Remaininggets low. - On
429 rate_limited, wait theRetry-Afterseconds, then retry. Don't retry in a tight loop. - If you poll Agent API runs, wait at least 2 seconds between calls, or use the event stream instead.
Good to know#
- Each key has its own rate limit: 10, 30 (default), 60 or 120 requests per minute.
- Keys can expire after 30 days, 90 days (default), 1 year, or never.
Learn more#
Still need help?#
- General support: support@clatterlabs.com or team@clatterlabs.xyz
- Infrastructure questions, or permanent deletion of your data (your whole account or one service): infrastructure@clatterlabs.xyz
We usually reply within the first hour, and always within 24 hours. A full support team is with you.
Related articles
Still need help?
Tried the steps above and still stuck? Email us. We usually reply within the first hour, and always within 24 hours. A full support team is with you.
Infrastructure questions, or permanent deletion of your data
infrastructure@clatterlabs.xyzFor deleting your whole account or the data of one service.