Clatter LabsHelp Center

How can my code tell how close it is to a key's rate limit?

ReferenceUpdated

Keyed API responses carry headers that tell you where you stand:

HeaderMeaning
X-RateLimit-LimitThe key's requests per minute
X-RateLimit-RemainingRequests left in the current window
Retry-AfterOn a 429: seconds to wait before trying again

Good handling#

  • Slow down when X-RateLimit-Remaining gets low.
  • On 429 rate_limited, wait the Retry-After seconds, 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?#

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.xyz
For deleting your whole account or the data of one service.