TL;DR — Gemini's 429 RESOURCE_EXHAUSTED ("Resource has been exhausted (e.g. check quota)") is one error string covering several different limits: requests-per-minute, requests-per-day, and tokens-per-minute — each set per model and per tier. On the free tier the per-day cap is the one that bites: once it's gone, backoff won't help until the daily reset. Diagnose by asking "does it recover in a minute?" — yes → per-minute limit, back off; no → daily quota or project quota, so upgrade tier, wait for reset, or route the workload elsewhere.
The error
HTTP 429
{
"error": {
"code": 429,
"message": "Resource has been exhausted (e.g. check quota).",
"status": "RESOURCE_EXHAUSTED"
}
}
Recent API versions often return a more explicit variant — "You exceeded your current quota, please check your plan and billing details" — sometimes with details naming the exact quota metric and a suggested retry delay. If your error includes those details, read them first: they name the specific limit you hit.
One string, several different limits
Gemini enforces (numbers vary by model and tier — check the current rate-limit docs rather than blog folklore, including this blog):
| Limit | Scope | Recovers | |-------|-------|----------| | RPM (requests/minute) | per model, per project | within a minute | | TPM (tokens/minute) | per model, per project | within a minute | | RPD (requests/day) | per model, per project | at the daily quota reset |
The same 429 fires for all of them. That's why "I added backoff and it still fails" is the classic report: backoff solves the per-minute limits and does nothing for an exhausted daily cap.
Diagnose in one step
Wait 60–90 seconds and retry once.
- Succeeds → you were hitting RPM/TPM. Add rate limiting on your side (space requests, batch prompts, cap concurrency) and you're done.
- Still 429 → daily or project quota. Backoff is now pointless; your options are the tier/billing route or moving the workload.
Fixes by cause
Free-tier daily cap (AI Studio key, no billing): the free tier is sized for experimentation, not for an agent loop that fires hundreds of calls per session. Options: wait for the reset, enable billing on the project to move to paid-tier limits, or split traffic across models (limits are per model — a flash-class model typically has much higher caps than a pro-class one, and is the right default for most agent steps anyway).
Paid-tier RPM/TPM: you're sending bursts. Smooth them: client-side rate limiter, request queue, reduced agent parallelism. If you're legitimately above the tier's ceiling, higher tiers exist — usage tiers scale with spend history.
Vertex AI project quota: on Vertex, quotas are project-level and adjustable — request increases through the cloud console's quota page rather than treating the limit as fixed.
One project shared by everything: a surprisingly common self-inflicted version — your CI, your agent, and your teammate's script all draw from one project's quota. Separate projects (or separate providers) per workload restores predictability.
If you reached Gemini through an OpenAI-compatible base URL
Coding tools pointed at Gemini's OpenAI-compatibility endpoint get the same 429 for the same reasons — the base-URL setup itself has its own failure modes, covered in the Google AI Studio base-URL guide. Free-tier keys behind agent workloads hit RPD fast; that combination is the single most common source of this error we see.
The structural fix for agent workloads
An agent that hard-depends on one provider's free tier has a built-in daily outage. Two structural answers:
- Match model to step: most agent steps don't need the most rate-limited model; routing routine steps to higher-limit models spends scarce quota only where it pays — phase-aware routing explained.
- Fail over across providers: when a daily cap is gone, the session can continue on a different upstream instead of stopping — what a router API should handle for you.
Part of the LLM API Error Reference — errors indexed by their exact strings.