Rate Limits & Quotas
Each API key can carry independent rate limits and a lifetime usage quota. Limits are configured per key on the API Keys page.
Rate limit windows#
A key may define a maximum number of requests for each of the following windows:
| Window | Description |
|---|---|
| Per second | Maximum requests within one second. |
| Per minute | Maximum requests within one calendar minute. |
| Per hour | Maximum requests within one calendar hour. |
| Per day | Maximum requests within one calendar day. |
Any window left unset is treated as unlimited. Limits are enforced
independently — exceeding any one of them returns 429 rate_limit_exceeded.
Total quota#
In addition to the time-based windows, a key can have a total quota — a lifetime
cap on the number of requests. Once a key’s used count reaches its total quota,
further requests return 429 rate_limit_exceeded. A key with no total quota set has
no lifetime cap.
Account balance#
Rate limits are separate from your account balance. Even within your limits, a
request fails with 402 insufficient_quota if your balance is depleted. See
Billing.
Handling 429 responses#
When you receive a 429:
- Back off and retry after a short delay (exponential backoff is recommended).
- Spread traffic across time to stay under the per-second/minute windows.
- Raise the relevant limits on the key, or use additional keys, if you need more throughput.
{
"error": {
"message": "Rate limit exceeded.",
"type": "rate_limit_exceeded",
"code": "rate_limit_exceeded",
"param": null
}
}