Gemini API 429 vs. 503: Quotas and Safe Retries
If an app calling Gemini API suddenly returns 429 or 503, should you immediately retry or switch models? The wrong fix may pile up requests, increase costs, and produce duplicate results.

Distinguish the causes and handling of 429 and 503
429 generally indicates a rate or quota limit; 503 usually indicates temporary unavailability or heavy load. Google recommends exponential backoff for temporary errors. Distinguish these from invalid requests that waiting cannot fix (Troubleshooting; checked October 16, 2026)
| Status | Meaning that should be checked | Initial guidance |
|---|---|---|
| 400 | Invalid request or parameter | Check the model name, API version, and data format. Don't resend the same thing again. |
| 429 | Rate limit, quota or spending rate ceiling | Read error details, check Usage and Rate Limits, and schedule retries appropriately |
| 503 | Service is temporarily unavailable. | Delayed and limited retries. |
| Other 5xx errors | Service-side problems that may be temporary | Save the status, check the documentation, and try again carefully. |
Note: API error details may differ by format. Use the actual HTTP status and returned error information alongside API errors manual Do not judge from a single short warning line
Why Gemini can return 429 even at low usage
Quotas are shared at project level, so another API key in the same project does not create a new quota. Limits cover more than daily requests: request and token rates vary by model, account tier, and enabled features. Batch jobs have separate limits. Manually counting calls may therefore not match the enforced limit (Rate limits)
- Open Google AI Studio and select the project actually used by the app
- See Usage and Rate Limits for the model and time period of issue.
- Check if there are many concurrent requests from multiple users or background tasks.
- Look at the error details to see if it mentions a per-minute rate, daily quota, or other restrictions.
- Check billing and spending status when relevant; payment does not remove all limits.
Also check the reset time: Google documentation states that the request per day (RPD) quota resets at midnight Pacific Time, so it should not be interpreted as midnight in Thailand.
Hypothetical example: space retries and limit attempts
Suppose a read request receives a 503 response and the system permits up to 3 retries, waiting approximately 1, 2, and 4 seconds, with a small random delay (jitter) to avoid many users retrying at once. These intervals are design examples, not Google requirements. If the service recommends a waiting time or the SDK already handles retries, use that information and avoid stacking retry mechanisms.
The principle is delay(n) = min(maximum delay, initial delay × 2^n + jitter) where n starts at 0. Set maximum elapsed time and attempt counts, then report failure when either limit is reached.
If an app request saves data or executes a transaction, do not retry before checking whether the first attempt succeeded. Design request IDs and duplicate-prevention mechanisms first.
When retrying will not fix a 429 or 503 error
- 400 caused by invalid JSON or parameters: correct the request
- Incorrect permissions or API key: check the configuration instead of repeatedly retrying
- Quotas requiring a reset or service-tier change: a few seconds of delay may be insufficient
- Results blocked by policy or content restrictions: retry should not be used to circumvent such checks.
Prepare limits, logs, and clear error states before launch
Record the time, model, status code, and request ID while keeping API keys and private text out of logs. Limit concurrent requests and set a timeout with a message that tells users whether the system is waiting or has stopped. After service resumes, check both costs and answers, since a successful request can still return incorrect information.
Sources
- Google AI for Developers: Troubleshooting guide
- Google AI for Developers: Rate limits
- Google AI for Developers: API errors
- Google: Retry strategy
- Google Site Policies
Google documentation reviewed October 16, 2026. Retry delays are hypothetical, not Google requirements. This article includes no load tests or real API calls.