Available limits
Find the current tier for each model on the models page or in itsrate_limit from GET /models. Available tiers and model assignments can change; use the live catalog and response headers for the limits that apply to your requests.
Text API
RPM is requests per minute. TPM is input and output tokens per minute. Checkrate_limit.name, rate_limit.requests_per_minute and rate_limit.tokens_per_minute on the selected text model.
Image API
RPM is requests per minute. RPD is requests per day. Image generation and editing do not use a token allowance. Checkrate_limit.name, rate_limit.requests_per_minute and rate_limit.requests_per_day on the selected image model.
The JSON fields are requests_per_minute, plus tokens_per_minute for text or requests_per_day for images.
How limits work
- All your keys share one text usage total and one image usage total. Creating more keys or switching models does not reset either total.
- The selected model’s tier sets the limits applied to that total.
- Authenticated requests count toward request limits, including requests rejected for invalid input. Requests blocked by an exhausted request limit do not add more requests to the counters.
- Minute limits reset each minute; image daily limits reset at midnight in Africa/Lagos.
GET /me under rate_limits. Only image generation and editing use the image allowance.
Text token reservations and switching models
Text token reservations and switching models
Before a text response starts, estimated input tokens and the maximum output are reserved. Unused tokens are released when the request finishes. Lower
max_tokens or max_completion_tokens if the reservation is too large.After using 600,000 text tokens, a model with a 5,000,000 TPM limit has 4,400,000 tokens left that minute. Switching to a model with a lower limit may be blocked until the minute resets.Rate limit headers
View response headers
View response headers
Response headers show the selected model’s limits and remaining allowance. The numbers below are illustrative examples, not guaranteed current limits. Text responses include request and token counters:Image responses include minute and daily request counters, without token-limit headers:
X-RateLimit-Reset is the seconds until the minute resets. X-RateLimit-Reset-Day is the seconds until the image daily limit resets. On a daily-limit rejection, X-RateLimit-Reset also reports the daily wait.Handling 429s
A429 response with rate_limit_exceeded means a request or token allowance was reached. Wait at least the seconds in Retry-After before retrying. The same rule applies to text and image requests.
Python retry example
Python retry example
A
429 with monthly_limit_exceeded means the key reached its monthly USD cap. Raise the cap on the keys page or wait until the next month.