API error · Gemini API

Gemini API 429 RESOURCE_EXHAUSTED on the free tier: causes and fixes

A Gemini 429 RESOURCE_EXHAUSTED means your project went over a rate limit: requests or tokens per minute, or requests per day, which reset at midnight Pacific.

Checked against the official docs on

The short answer

A 429 RESOURCE_EXHAUSTED from the Gemini API means your project went over one of its rate limits: requests per minute (RPM), input tokens per minute (TPM) or requests per day (RPD). Limits apply per project, not per API key, so a new key in the same project does not help. For a per-minute limit, wait and retry with exponential backoff; a daily limit resets at midnight Pacific time. Google does not publish free-tier numbers: your project's active limits are shown in AI Studio.

The error response

Google documents the error shape and the 429 row (RESOURCE_EXHAUSTED) for the generateContent API, but shows no full 429 body, so no message is invented here. The newer Interactions API returns a snake_case code instead.

http · generateContent
HTTP/1.1 429 Too Many Requests

{
  "error": {
    "code": 429,
    "message": "<human-readable description>",
    "status": "RESOURCE_EXHAUSTED",
    "details": [ ... ]
  }
}
json · Interactions API
{
  "error": {
    "code": "quota_exceeded",
    "message": "<human-readable description>"
  }
}

Causes

  • Your project went over any one of its limits: requests per minute, input tokens per minute or requests per day. Exceeding one is enough, even with the others untouched.
  • Limits are counted per project, not per API key: every key of the project draws on the same quota.
  • Limits are tighter on experimental and preview models, and some models carry extra ones, such as tokens per day or images per minute.
  • Google says specified rate limits are not guaranteed and actual capacity may vary.
  • Spend-based rate limits also return 429 RESOURCE_EXHAUSTED, but Google lists them as not applicable to the free tier.

Find which one you hit

  1. Open the rate limit page in AI Studio (aistudio.google.com/rate-limit): it shows the active limits and usage of each project. Check that the key belongs to the project you think.
  2. On the Interactions API, the code tells the limits apart: rate_limit_exceeded is the per-minute or per-second request or token limit, quota_exceeded the daily quota, too_many_requests too many requests in a short period.
  3. Rule out the look-alikes. A 402 RESOURCE_EXHAUSTED is a depleted Prepay credit balance on a paid billing account, not a rate limit. A 403 PERMISSION_DENIED, for example with FREE_TIER_VERIFICATION_REQUIRED, means the project needs verification or cannot use the free tier. A 400 FAILED_PRECONDITION can mean the free tier is not available in your country.

How to fix it

  • Retry with exponential backoff and jitter, and cap the retries. Google's SDKs already do it: the Python SDK retries 429 up to four times, from about 1 second to at most 60.
  • Lower the rate or size of your requests: fewer calls per minute, shorter prompts.
  • For a daily limit, wait for the reset at midnight Pacific time; retrying before it fails the same way.
  • Creating another key in the same project does not add quota. Moving the project to Tier 1 means linking a billing account, which turns it into paid usage, and Google's rate limit increase form is for the paid tier.

What a failover router changes

A per-minute 429 clears in seconds; a daily one lasts until midnight Pacific. A router with other free providers configured sends the request elsewhere instead of making the caller wait, and stops sending traffic to a quota it knows is spent.

Gemini ships in Ficelle Pro's provider pack, not in the open core, so we have not read its connector. What we can state is how the v0.3.13 engine classifies a 429 from a provider: when the body says a quota is exceeded on a free-quota route, it cools that quota pool (quota_exhausted) for an hour by default, then 6 and 24 hours while its probes keep finding it spent; otherwise it skips the whole provider for 15 minutes (rate_limited).

A delay given by the provider replaces those defaults, capped at 24 hours: Ficelle reads Retry-After and retry-after-ms headers and a retryDelay or retry_after field in the error body. On a routing profile, the request then moves to the next free candidate.

The general method, by failure class, is in the guide to LLM fallback that reads the error first.

Questions

What does RESOURCE_EXHAUSTED mean in the Gemini API?

With HTTP 429, it means you exceeded one of the API rate limits, such as requests per minute, tokens per minute or requests per day. With HTTP 402, the same status means a Prepay credit balance is depleted, which is a billing problem and not a rate limit.

Does a new Gemini API key reset the quota?

No. Google applies rate limits per project, not per API key, so another key in the same project shares the same quota.

When does the Gemini API daily quota reset?

Requests-per-day quotas reset at midnight Pacific time.

What are the Gemini API free tier limits?

Google does not publish free-tier numbers on its rate limits page. Your active limits are shown per project in AI Studio, and Google says specified limits are not guaranteed.

Sources

Official documentation and the published Ficelle code this page rests on, read on 11 November 2026:

  1. Gemini API: Rate limits
  2. Gemini API: API errors (generateContent)
  3. Gemini API: API errors (Interactions API)
  4. Gemini API: Troubleshooting guide
  5. Ficelle v0.3.13: failures.py (classify_failure, cooldown policy)
  6. Ficelle v0.3.13: router.py (default cooldown_seconds)
  7. Ficelle v0.3.13: cooldowns.py (escalation, provider retry delay)
  8. Ficelle v0.3.13: retry_hints.py (provider retry delays)