A Gemini API 429 on the free tier can mean two very different things: a per-minute limit that clears in seconds, or a per-day limit that clears at midnight Pacific. Most posts say "wait and retry" or "upgrade". That is true for one case and useless for the other. The error body already tells you which one it is.
Read quotaId and retryDelay
- Per-minute:
GenerateRequestsPerMinutePerProjectPerModel-FreeTier. Safe to retry afterretryDelay. - Per-day:
GenerateRequestsPerDayPerProjectPerModel-FreeTier. Retrying is pointless until the reset. - The limit is per project and per model, so a new key in the same project gives you nothing.
The probe
One tiny request, repeated until it fails. Each request asks for the single word ok with output capped at 20 tokens, so only the request count matters.
import json, urllib.request, urllib.error
def call(model, key):
body = json.dumps({
"contents": [{"parts": [{"text": "Reply with the single word: ok"}]}],
"generationConfig": {"maxOutputTokens": 20},
}).encode()
req = urllib.request.Request(
f"https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent",
data=body,
headers={"Content-Type": "application/json", "x-goog-api-key": key},
)
try:
with urllib.request.urlopen(req, timeout=60) as r:
return {"http": r.status}
except urllib.error.HTTPError as e:
return {"http": e.code, "raw": e.read().decode("utf-8", "replace")}
On a 429, the useful parts are in error.details: a QuotaFailure entry (quota ID and value) and a RetryInfo entry (retryDelay).
Results (one free-tier key, one project, 25 October 2026, no pause between requests)
| Model | Result |
|---|---|
| gemini-3.5-flash-lite | 17 ok, then per-minute 429 (limit 15), retry 22 s |
| gemini-3.1-flash-lite | 17 ok, then per-minute 429 (limit 15), retry 39 s |
| gemini-3.5-flash | 7 ok, then per-minute 429 (limit 5), retry 36 s |
| gemini-3.6-flash | first request already per-day 429 (limit 20), retry 70236 s |
| gemini-3.1-pro | 404, model name not found |
The daily number is a clock
retryDelay was 70236 seconds, 19 h 30 min 36 s. I sent the request at 14:29:22 (UTC+3). Adding the delay lands at 06:59:58 UTC, one second before midnight Pacific daylight time. That matches Google's rate-limit page (daily quotas reset at midnight Pacific). It also means the reset hour on a wall clock shifts when daylight saving ends, so a cron job pinned to a fixed UTC hour will drift. Read the delay from the error.
Two traps
-
The model in the error was not the one I called. My call to
gemini-3.5-flashfailed on request 8, but the error'squotaDimensionsnamedgemini-3.6-flash. Either the two names share counters or the key had already used its daily 20 on 3.6. I did not test which. Log the model from the error, not from your request. -
A 404 that looks like a limit.
gemini-3.1-proreturned 404 because the name that exists isgemini-3.1-pro-preview. If your logs show a failure before any 429, check the model name first.
What this does not show
Request counts for one project on one afternoon. I did not test token limits, paid tiers, concurrent processes, or whether the per-minute window is fixed or sliding. The per-minute models let 17 requests through against a stated limit of 15, which fits a sliding window or a different counting method. Google changes free-tier limits without notice, so treat these numbers as a snapshot and run the probe on your own key.
More detail and the FAQ: https://aiandsoftwarehub.com/blog/gemini-api-free-tier-429-per-minute-vs-per-day-measured
Top comments (0)