- Rate limit (per minute): the maximum number of requests per minute, per API key. Exceeding it returns
429 rate_limit_exceeded. - Quota (per billing period): the total number of requests your plan includes. Monthly quotas reset at the start of each billing period. When the quota is used up, the API returns
402 insufficient_credits.
Limits by plan
What counts against your quota
Retrying after a
429 is free.
When the quota runs out (402)
A used-up monthly or lifetime quota returns402, not 429:
402
When you exceed the rate limit (429)
429 is only used for the per-minute rate limit. The response includes these headers (they’re sent only on 429 responses):
The body also has top-level
limit, retry_after and reset_at fields:
429
Handling 429 in code
Wait the number of seconds inRetry-After, then retry:
Python
5xx errors and timeouts.