Gemini API error
Gemini 429 RESOURCE_EXHAUSTED: official rate-limit and quota guidance
On this page
TL;DR · The short answer
#Official documentation checked 27 November 2026. Google’s Gemini API rate-limits documentation says limits are usually measured as requests per minute (RPM), input tokens per minute (TPM) and requests per day (RPD). Exceeding any of them triggers a rate-limit error. Limits are applied per project, not per API key, and RPD quotas reset at midnight Pacific time. Spend-based limits, when they apply, return 429 RESOURCE_EXHAUSTED. The troubleshooting guide recommends exponential backoff with jitter for 429 RESOURCE_EXHAUSTED or 503 UNAVAILABLE, and not retrying 400, 402 or 403.
Key takeaways
#- The official rate-limits page uses this example: if your RPM limit is 20, making 21 requests in a minute errors even if you have not exceeded TPM or other limits.
- In addition to RPM and TPM, the same page documents spend-based rate limits on a rolling 10-minute window (whether they apply depends on billing history and account standing).
- The Gemini Interactions API errors page (a separate reference for that API’s {_code('error.code')} field) lists these HTTP 429 codes:
- The troubleshooting guide recommends exponential backoff for errors such as 429 RESOURCE_EXHAUSTED or 503 UNAVAILABLE : wait a short time before the first retry (for example 1 second), then increase the delay (for example 2s, 4s, 8s), add random jitter, retry only transient errors (it lists 429, 408 or 5xx), and set a maximum number of retries.
How rate limits work
#The official rate-limits page uses this example: if your RPM limit is 20, making 21 requests in a minute errors even if you have not exceeded TPM or other limits. Limits vary by model; some models also have images-per-minute or tokens-per-day limits, and some built-in tools have their own limits. Experimental and preview models are more restricted. Rate limits are tied to the project’s usage tier. Google says to view your active rate limits in Google AI Studio, and that specified rate limits are not guaranteed.
429 RESOURCE_EXHAUSTED
#In addition to RPM and TPM, the same page documents spend-based rate limits on a rolling 10-minute window (whether they apply depends on billing history and account standing). If you hit a spend-based rate limit, the API returns 429 RESOURCE_EXHAUSTED. Official steps: wait and retry after a short period; reduce the rate of expensive requests, for example by using smaller context windows or shorter outputs; if you consistently hit the limit during normal usage, request a rate-limit increase.
Interactions API 429 codes
#The Gemini Interactions API errors page (a separate reference for that API’s {_code('error.code')} field) lists these HTTP 429 codes:
rate_limit_exceeded— you have exceeded the per-minute or per-second request or token limit. Wait and retry with exponential backoff.quota_exceeded— you have exceeded your daily quota. Wait until the quota resets or request a quota increase.too_many_requests— you have made too many requests in a short period. Wait and retry with exponential backoff.
A depleted Prepay balance is not a 429 on that page: payment_required is HTTP 402, and the official action is to add credits or turn on auto-reload and not retry until credits are added.
Official retry guidance
#The troubleshooting guide recommends exponential backoff for errors such as 429 RESOURCE_EXHAUSTED or 503 UNAVAILABLE: wait a short time before the first retry (for example 1 second), then increase the delay (for example 2s, 4s, 8s), add random jitter, retry only transient errors (it lists 429, 408 or 5xx), and set a maximum number of retries. It says official client SDKs include automatic retry with exponential backoff by default for transient errors, and that the Python SDK retries transient errors up to four times with an initial delay of approximately 1 second and a maximum delay of 60 seconds.
Litmiq cannot raise a Gemini quota. After the API accepts requests, you can run an eval in Litmiq with your own Gemini key, which stays in your browser and is sent only to Google’s official API.
Sources
#- Gemini API rate limits — RPM, TPM, RPD, per-project limits, 429 RESOURCE_EXHAUSTED, midnight Pacific reset
- Gemini troubleshooting — exponential backoff and jitter; do not retry 400/402/403
- Gemini Interactions API errors — rate_limit_exceeded, quota_exceeded, too_many_requests, payment_required
Official documentation checked 27 November 2026. Independent explainer. Litmiq is not affiliated with, endorsed by or sponsored by OpenAI, Anthropic, Google, Microsoft or Cloudflare. Product names are used nominatively to identify official error codes.
FAQ
#Should I retry a 402?
No. The Interactions API errors page lists payment_required as HTTP 402 when your Prepay credit balance is depleted, and says not to retry until credits are added or auto-reload is turned on. The troubleshooting guide also says not to retry 400, 402 or 403.
When does the daily quota reset?
The Gemini API rate-limits documentation says requests-per-day (RPD) quotas reset at midnight Pacific time.
Are published RPM numbers guaranteed?
No. The official rate-limits page says specified rate limits are not guaranteed and actual capacity may vary, and that you should view your active rate limits in Google AI Studio.
Test your own prompt once the API accepts requests
#Litmiq cannot lift a provider rate limit, spend cap or credit balance. You can still run a smaller eval in your browser with your own API key.
- Free, no signup
- Runs in your browser
- Your OpenAI key, sent only to OpenAI
Newsletter
Get Litmiq AI Weekly
Practical AI tips and the best tools of the week, in plain English.