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.

Request envelopes spaced in a queue beside an hourglass represent bounded waiting and API retries

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)

StatusMeaning that should be checkedInitial guidance
400Invalid request or parameterCheck the model name, API version, and data format. Don't resend the same thing again.
429Rate limit, quota or spending rate ceilingRead error details, check Usage and Rate Limits, and schedule retries appropriately
503Service is temporarily unavailable.Delayed and limited retries.
Other 5xx errorsService-side problems that may be temporarySave 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)

  1. Open Google AI Studio and select the project actually used by the app
  2. See Usage and Rate Limits for the model and time period of issue.
  3. Check if there are many concurrent requests from multiple users or background tasks.
  4. Look at the error details to see if it mentions a per-minute rate, daily quota, or other restrictions.
  5. 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

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 documentation reviewed October 16, 2026. Retry delays are hypothetical, not Google requirements. This article includes no load tests or real API calls.