Skip to content

Rate limits

Requests are limited to 60 a minute per API key.

How the limit works

  • The limit is 60 a minute, counted over a sliding window, so room comes back gradually.
  • Each API key has its own window, while the monthly limit is shared across your account.
  • Every /v1 request with a valid key counts, including polls and usage checks.
  • A request rejected with invalid_api_key doesn't count. Neither does fetching the published API spec, which needs no key.

The headers

Responses to a request with a valid key carry these headers:

HeaderMeaning
RateLimit-LimitThe requests allowed in the window.
RateLimit-RemainingThe requests left in the window.
RateLimit-ResetSeconds until the window resets.
Retry-AfterSeconds to wait. Only present on a 429 with rate_limited.

When you go over

A request over the limit runs nothing, doesn't use your monthly limit, and gets a 429 with the code rate_limited:

JSON
{
  "error": {
    "code": "rate_limited",
    "message": "Rate limit exceeded",
    "request_id": "REQUEST_ID",
    "doc_url": "DOC_URL"
  }
}
  • Wait the number of seconds in Retry-After, then try again. If you get another 429, wait again.
  • Watch RateLimit-Remaining to slow down before you reach the limit.
  • Leave a few seconds between polls, or use Webhooks to be told when a job finishes.

POST /v1/batch can also return rate_limited when your account has too much queued work. See Batch.