After this page, you can find the model code you need on the official model page, tell whether it is stable, preview, or deprecated, and work out which kind of 429 limit error you hit. It is for developers who already have a key and have made a first API call.
Model lists, limit numbers, and threshold amounts can change every week, so this page does not copy them. It explains how to read and where to look. For selection method, see Which model.
Three concepts to keep apart
Section titled “Three concepts to keep apart”| Concept | In one sentence | How it appears |
|---|---|---|
| Model family | A group of models from the same generation or with the same positioning | Group headings on the official model page |
| Model code | The string in the request’s model field |
Use what the official model page gives; do not spell it from memory |
| Status label | Stable, preview, latest, experimental | See the table below |
The model page describes the four labels roughly like this:
| Label | Meaning | What it means for you |
|---|---|---|
| Stable | Points to a specific stable model that usually does not change | Most production apps should pin a specific stable model |
| Preview | Can be used in production, but usually needs billing enabled and has stricter limits | Google says deprecation comes with at least two weeks’ notice |
| Latest | An alias pointing to the newest release of a model line | The version behind it gets swapped; Google emails two weeks ahead |
| Experimental | Usually not suitable for production, with stricter limits | Use only for trials and feedback |
A “latest” alias is convenient, but the same string can point to different models on different dates, so regression results cannot be reproduced. For repeatable evaluation or a live service, pin an explicit model code.
Which columns to read on the official model page
Section titled “Which columns to read on the official model page”For each candidate model, read only these items:
- Status: stable, preview, or already announced for deprecation.
- Input and output modalities, context window, and per-request output limit.
- Whether it supports the tools and abilities you need, such as structured output, function calling, and grounding.
- Whether the free tier is available (see Pricing and billing).
- Whether the deprecations page has an entry for it (see Model deprecation and migration).
The model-choice page (Choosing a model) recommends models by reasoning depth, speed, and price, and lists upgrade targets from older models. These change as new models ship, so open the current page before quoting them.
The three dimensions of limits
Section titled “The three dimensions of limits”The rate-limits page says limits are usually measured across three dimensions:
- Requests per minute (RPM);
- Input tokens per minute (TPM);
- Requests per day (RPD).
Exceeding any one dimension triggers a limit error; all three do not need to be exceeded together. A few rules are easy to misread:
- Limits apply per project, not per API key. Switching keys or creating more keys in one project does not give you more quota.
- RPD resets at midnight Pacific time, not your local midnight.
- Limits vary by model; some exist only for specific models, such as images per minute for image-generation models, and built-in tools can have their own limits.
- Preview and experimental models have stricter limits.
There is also a spend-based limit: spending is evaluated over a rolling 10-minute window to guard against unexpected large charges. Whether it applies to your account depends on billing history and usage tier. Exceeding it also returns 429 RESOURCE_EXHAUSTED.
So a 429 has at least two causes: the request rate is too high, or the spend rate is too high. The remedies differ, so identify the type before acting.
Usage tiers and where to see your own limits
Section titled “Usage tiers and where to see your own limits”Limits are tied to the project’s usage tier: the free tier, and paid tiers that upgrade automatically with cumulative spend and account age. Thresholds and per-tier numbers are updated on the official pages and are not written here. Your own limits are on the AI Studio Rate limit page, and the project’s tier is on the Projects page.
Moving from the free tier to the first paid tier requires setting up billing first. Higher tiers upgrade automatically once the conditions are met, and Google says later upgrades take effect within about 10 minutes. If you need higher limits, the rate-limits page has a request form, but Google does not guarantee an increase.
Minimal example: pin the model and classify the 429
Section titled “Minimal example: pin the model and classify the 429”This script names no model: you choose GEMINI_MODEL from the official model page and put it in an environment variable. It only shows how to record complete information on failure instead of blindly retrying on 429.
import osfrom google import genaifrom google.genai import errors
client = genai.Client() # reads the GEMINI_API_KEY environment variablemodel = os.environ["GEMINI_MODEL"]
try: result = client.interactions.create( model=model, input="Explain in one sentence what API rate limiting is.", ) print(result.output_text)except errors.APIError as err: # Record the raw details first, then classify print({"model": model, "code": err.code, "status": err.status, "message": str(err)[:300]}) if err.code == 429: print("Limit error: read the error body and tell request rate, daily quota, and spend rate apart; do not retry immediately.") else: raiseExpected: on success, one sentence of explanation; on failure, the model, error code, and a truncated error message. This example was not run with a real key; only the call shape was checked against the official docs. Field names depend on your installed SDK version; if errors.APIError has different attributes, follow the SDK documentation.
Full example: keep a “model and limit record sheet”
Section titled “Full example: keep a “model and limit record sheet””The common team problem is not how to call the API but that nobody remembers which model was used, at which tier, and what 429 was seen. Fix it in a table kept in the project docs and update it whenever the model or tier changes:
| Date | Environment | Model code | Status | Project tier | Observed 429 type | Action |
|---|---|---|---|---|---|---|
| 2026-11-24 | Test | (copy from the official model page) | Stable | Free | None | None yet |
| 2026-11-25 | Load test | (same) | Stable | Free | RPM | Lower concurrency, add backoff |
Rules for filling it in: copy the model code from the official page; take the status from the model page that day; take the 429 type from the error body, not a guess; date every row, and re-check any row older than 14 days against the official page before reusing it. Numbers in the table come only from what you actually see in AI Studio, never from “how many requests per minute model X allows” in this site or a tutorial.
Counterexample and rewrite
Section titled “Counterexample and rewrite”Counterexample:
Hardcode
model="..."in code and write “the limit is N per minute” in the docs, then nobody updates either for a year.
Problem: models get deprecated and limits change with tier and model, so hardcoded numbers silently go stale.
Rewrite: keep the model code in an environment variable or config; in docs, say only “limits are as shown on the AI Studio Rate limit page; screenshots or records must carry a date”; keep the source and re-check date in the record sheet.
Verification checklist
Section titled “Verification checklist”- The value of
GEMINI_MODELcan be found verbatim on the official model page; - You can say whether the chosen model is stable or preview, and whether the deprecations page lists it;
- No limit number is written into code comments or external docs;
- On a
429, you read the error body first, then decide whether it is rate, daily quota, or spend rate; - The record sheet is dated, and someone owns periodic re-checks.
Failure recovery
Section titled “Failure recovery”| Symptom | Order of handling |
|---|---|
429 immediately |
Read the error body; check the current-tier limit for that model on the AI Studio Rate limit page; confirm several processes are not sharing one project |
429 only late in the day |
Suspect RPD is used up; remember it resets at midnight Pacific time |
Few requests but 429 |
Check for a spend-based limit; shrink context or output, or lower the rate of expensive requests |
| Preview model limits are tight | Load-test on a stable model; use preview only for feature checks |
| You need higher limits | Confirm tier and billing status, then use the official request form; do not work around it by creating more keys |
| A model suddenly stops working | Check the deprecations page and see Model deprecation and migration |
Do not rotate through multiple keys or open extra projects to get around limits. Limits are per project, and doing so makes key management and billing harder to trace.
- Understand bills, the free tier, and spend caps: Pricing and billing.
- Inventory dependencies before deprecation: Model deprecation and migration.
- How keys relate to projects: API key safety.