Gemini quota errors: 429 limits versus 402 depleted credits

Distinguish Gemini rate, daily and spend limits from depleted Prepay credit, using the correct Interactions or GenerateContent error fields.

By benchr Editorial Team · · · Changelog

Provider documentation read . Documentation review; no provider execution is established by this date.

For Gemini, first distinguish a temporary limit from depleted credit. Google's GenerateContent reference uses RESOURCE_EXHAUSTED for both HTTP 429 rate or spend pressure and HTTP 402 exhausted Prepay credit. Retrying both as the same error can waste capacity while leaving the account blocked.

Keep the API interface in the diagnostic record

Google's GenerateContent reference, labeled legacy, uses an uppercase error.status plus a numeric error.code. Its current Interactions reference instead uses string codes such as rate_limit_exceeded, quota_exceeded, too_many_requests, and payment_required. Do not assume every Gemini error has the first format.

Per-minute or shorter request/token pressure

Meaning. The current workload exceeds an applicable throughput limit.

Action. Pace admission, inspect actual limits, and use bounded retries with backoff.

Daily quota

Meaning. A brief retry delay does not reset the daily allowance.

Action. Check the project quota and its reset, or request an increase where available.

Spend-based rate limit

Meaning. Google documents a rolling spend window whose applicability depends on billing history and account standing.

Action. Reduce expensive request pressure and inspect the applicable tier and rate-limit settings.

HTTP 402 depleted Prepay credit

Meaning. The linked billing account has no usable Prepay balance.

Action. Stop automatic retries and have an authorized owner inspect credits and payment setup.

Project limits and billing-account controls have different scopes

Google documents RPM, input TPM, and RPD limits per project, not per API key. Model-specific dimensions can also apply. Changing keys inside the same project does not create a new throughput allowance. The documented daily request reset is midnight Pacific time, not midnight in the server's local time zone.

Billing history and tier affect other controls. Google's GenerateContent error reference says depleted Prepay credit stops keys linked to that billing account. Do not assume a new project sharing the account bypasses a credit failure. Separate environments for ownership and isolation when appropriate; do not present project creation as an unlimited-capacity workaround.

Use observed capacity, not a remembered free-tier number

Read the active limits in AI Studio for the actual project and model. Google states that published limits do not guarantee available capacity. Preview or experimental deployments can have different restrictions, and paid access does not eliminate quotas.

A concurrency cap and a request-start rate solve different problems. Fast calls can pass through a small pool at a high rate. Coordinate paced starts, token budgets, a bounded queue, and retries across every worker sharing the project. A synchronous exception from a queued operation must release its slot just like a rejected promise; do not leave the queue permanently stalled.

Retry only the failures that can clear

The current troubleshooting guide documents automatic retries in official SDKs. Before adding an application loop, inspect the version you deploy and configure one retry owner. Count initial attempts and retries separately, honor available server guidance, and stop or defer when the wait exceeds the operation's time budget.

A daily quota or depleted balance needs its own handling. Preserve the exact code and HTTP status rather than classifying only by the word “exhausted.” In Interactions, record streaming error events as failures even if the stream initially returned HTTP 200.

No account quota, billing state, or provider request was exercised for this guide. For a proposed capacity change, use the calculator for supported source-linked billing scenarios, then validate output quality and actual throughput separately. A quote is not a capacity guarantee or an exact future invoice.

Changelog

  • 2026-10-15 — Rebuilt quota diagnosis to distinguish Interactions from GenerateContent, project quotas from billing-account credit and 429 from 402. Removed universal minute resets, a fragile queue and unsupported daily-cost claims.
  • — Replaced the Gemini 3.5 Flash paid-tier pointer ($1.50/$9) with Gemini 3.8 Flash ($0.75/$3.75 through 2026, $1.50/$7.50 from January 1, 2027) and added Gemini 3.5 Flash-Lite as the cheapest volume tier.
  • — Published. Error envelope, free-tier cause, and quota-increase path verified against Google's Gemini API troubleshooting guide.

Sources and documentation review

Documentation review dates are recorded per source. No provider inference or independent benchmark replication was performed for this revision.

  1. Gemini Interactions API errors — read
  2. Legacy GenerateContent API errors — read
  3. Gemini rate limits and scope — read
  4. Gemini billing and Prepay — read
  5. Gemini troubleshooting and SDK retries — read