Requests, tokens and sizes are limited per key or per account depending on your plan, checked on every request, and reported on every answer after the key check.
Free keys are counted per key, and the account's keys share a larger allowance. A Pro plan counts requests per account instead (see Pro API).
| Per minute | Per day | |
|---|---|---|
| Each key | 10 requests | 200 requests |
| Your account, all its keys together | 20 requests | 400 requests |
All of them apply at once, and whichever runs out first refuses the request. Every request counts, including ones refused as bad requests. The allowance refills steadily rather than resetting on the clock: after using all 10, one more is available about every 6 seconds.
Besides requests, each plan has:
| Tokens a day | Largest prompt | Longest reply | |
|---|---|---|---|
| Free | 400,000 (the whole account) | 12,000 tokens | 2,000 tokens |
| Pro, Standard | 4,000,000 (the whole account) | 64,000 tokens | 8,000 tokens |
Tokens a day are prompt plus reply as the model counts them, across all the account's keys, from 00:00 UTC. Once they're used, requests get 429 token_limit with Retry-After set to the time left until 00:00 UTC. The count is checked before each request, so the request that crosses the line is allowed. A prompt over the plan's size is 400 context_length_exceeded, never trimmed. See Pro API for the other plans.
Every answer after the key check, a 429 included, has:
| Header | Meaning |
|---|---|
| X-RateLimit-Limit | Requests a minute, for the key (free) or the account (Pro) |
| X-RateLimit-Remaining | Requests left in the minute allowance right now |
| X-RateLimit-Reset | Unix time (seconds) when the minute allowance is full again |
| X-RateLimit-Limit-Day | Requests a day, for the key (free) or the account (Pro) |
| X-RateLimit-Remaining-Day | Requests left in the day allowance right now |
A 401 has none of these: a caller without a valid key learns nothing about anyone's allowance. GET /models has none either, since it costs nothing against your limits. A plan with no request limits sends none.
Going over a limit returns 429 with a Retry-After header and retry_after_seconds in the body. They say the same thing:
{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded. Try again in 6 seconds.",
"retry_after_seconds": 6
}
}Wait that long before retrying. A key that keeps sending anyway is paused for longer and longer, up to an hour. The reference Discord bot catches the 429 and tells the channel how long to wait: see RateLimited in Discord Bot, and Examples for a retry loop.
Refusals show in the key's request log on the dashboard, at most once a minute. If you're refused with light traffic, check there: something else may be using the key.
There's also a cap on every key together (a separate one for Pro plans), which protects the service. When it's reached, requests get 503 capacity_exceeded (see Errors). Unlike a 429, it isn't about anything you did: back off and retry.
Addresses are limited too, before the key is looked at: a server sending too many requests, or too many invalid keys, is refused with 429 for a while.
The free tier is modest on purpose. If you have a real need for more, apply for the Pro API: tell us what it's for, and a person sets limits that fit. It's by application, not paid.