RESOURCE_EXHAUSTED is Gemini's catch-all 429. If it clears after a minute, you hit a rate limit — backoff fixes it. If it lasts until midnight Pacific, you exhausted a daily free-tier quota — no retry loop can fix that; only billing or a different route can.
The error
{
"error": {
"code": 429,
"message": "Resource has been exhausted (e.g. check quota).",
"status": "RESOURCE_EXHAUSTED"
}
}Causes and fixes at a glance
| Cause | Fix |
|---|---|
| Per-minute rate limit (RPM/TPM) | Backoff with jitter; smooth bursts. Clears within ~60s. |
| Daily free-tier request quota exhausted | Waits until the daily reset — enable billing, raise quota, or route through a paid gateway. |
| Many workers sharing one key | The quota is per project, not per worker — centralize a rate limiter or shard across projects/keys. |
Classify: minute-limit or day-quota
Retry once after 60 seconds. Success → minute-scale rate limit (add backoff and move on). Still 429 → daily quota; check Cloud Console → Quotas for the exact counter that's at 100%.
For minute limits: the standard backoff
Same pattern as every 429 — exponential, jittered, retry only retryable statuses. Reuse the snippet from our Claude 429 guide unchanged; it's provider-agnostic.
For daily quotas: change the economics
Free-tier quotas are for prototyping. Production needs billing enabled on the project — or a pay-as-you-go gateway where the ceiling is your wallet, not a daily counter. Compare the per-token math before choosing.
If you're calling through Kunavo
On Kunavo, Gemini 2.5 Flash/Pro are pay-as-you-go under one prepaid wallet — there is no daily free-tier counter to exhaust, and failed requests aren't billed. For workloads that keep tripping AI Studio's daily quotas, the per-token price (well under Google's list) is usually cheaper than the engineering time spent sharding projects.
FAQ
When does the Gemini free-tier quota reset?
Daily quotas reset at midnight Pacific time. Per-minute limits reset on a rolling 60-second window.
Will backoff fix RESOURCE_EXHAUSTED?
Only the per-minute kind. A drained daily quota returns 429 for every retry until reset — detect that case (429 persisting after a 60s wait) and stop burning retries on it.
More error semantics live in the error reference; getting a key takes a minute via sign up and the authentication docs.