All insights

Pricing and plans

Gemini API Rate Limits: How to Check Your Quota and Handle Errors

Learn how Gemini API rate limits work, where to check your project’s active limits, and how to handle quota errors in a production integration.

Illustration for Gemini api rate limits

Gemini API rate limits: the direct answer

For the Gemini Developer API used through Google AI Studio, limits depend on the project’s usage tier and the model or feature you call. Google describes common limits as requests per minute (RPM), input tokens per minute (TPM), and requests per day (RPD). Some models or tools may have additional limits. These limits apply per project, not per API key: creating or rotating another key in the same project does not provide a separate project quota. (Google’s Gemini API rate-limits documentation)

There is no single fixed quota number that applies to every model and project. To plan production traffic, check the active limits for the project and model you actually use rather than relying on old third-party quota tables. Google’s billing documentation places usage-tier determination at the billing-account level, while rate-limit enforcement is per project. These are distinct scopes. (Rate limits; Billing)

Scope: This guidance is for the Gemini Developer API through AI Studio. If your application uses another Google Cloud API surface, consult the documentation and quota view for that specific service. Do not assume the Developer API’s limits or management path apply there.

Which quota dimensions can apply?

Limit What it measures What to keep in mind
RPM Requests in a minute A project can hit this limit while remaining below its token limit.
TPM Input tokens in a minute Large input contexts can use this quota quickly, even with relatively few requests.
RPD Requests in a day Google says this quota resets at midnight Pacific time.
Model- or tool-specific limits Limits that apply to some models or built-in tools Check the active limits for the model or feature in use.

Google evaluates usage against each applicable limit. Exceeding any one can trigger a rate-limit error. For example, if a project’s RPM limit is 20, a 21st request within that minute can fail even if the project remains below its TPM and RPD limits. The example is illustrative; use the active limit shown for your project. (Google’s Gemini API rate-limits documentation)

How to check the quota for your project

  1. Identify the API surface. Confirm whether your application calls the Gemini Developer API through AI Studio or uses another Google Cloud service. Use the quota instructions for the service your application actually calls.
  2. Confirm the project. Identify the project associated with the API key used by your deployed application. For the Gemini Developer API, multiple keys in the same project share project-level limits. (Google’s rate-limits documentation)
  3. View the active limits in AI Studio. Open Google’s Gemini API rate-limits page and follow its “View your active rate limits in AI Studio” link. Check the entries for the project, model, and tier relevant to your production requests.
  4. Compare usage with limits. When investigating a failure, check the project and model first, then compare recent traffic with each applicable request, input-token, daily, or feature-specific limit.
  5. If you need more capacity, consult Google’s rate-limits page. Follow the current tier-upgrade or rate-limit-increase guidance and any conditions shown for your account and project. This overview does not establish which route applies to a particular setup. (Google’s Gemini API rate-limits documentation)

What to do when a Gemini request hits a limit

A 429 RESOURCE_EXHAUSTED response can indicate that a quota or rate limit has been exceeded. Inspect the error and check the active limits and usage for the relevant project and model; do not retry indefinitely. Google’s troubleshooting guide recommends exponential backoff with jitter for appropriate transient errors, and advises against retrying client errors such as 400, 402, or 403. (Google’s troubleshooting guide)

Use this decision path:

  • A brief burst or transient limit: Pace or queue requests to avoid another immediate burst. If the error is appropriate to retry, use bounded exponential backoff with jitter.
  • A daily request limit: Defer work that can wait. Google says RPD resets at midnight Pacific time; repeated immediate retries will not create more daily capacity. (Google’s rate-limits documentation)
  • An input-token-per-minute limit: Reduce or shorten input context and spread input-heavy requests over time. Shorter outputs do not directly reduce input TPM.
  • A persistent limit at normal production traffic: Review the active limits and tier, then follow the applicable upgrade or rate-limit-increase guidance on Google’s rate-limits page. The route and conditions depend on the options shown for your setup. (Google’s rate-limits documentation)
  • A client or billing error: Do not treat it as a transient quota event. Google advises against retrying client errors such as 400, 402, or 403; correct the underlying request, key, or billing issue. (Google’s troubleshooting guide)

Google documents automatic exponential-backoff retries for transient errors in its official Gemini API client SDKs; its troubleshooting guide gives the Python SDK as an example and describes its retry behavior. Check the documentation and retry configuration for the particular SDK and version your application uses. If you add an application-level retry layer, cap total attempts so nested retries do not amplify traffic.

Production checklist

  • Treat API keys in the same Gemini Developer API project as sharing that project’s quota. Use application-level queues or traffic controls when workloads need separate budgets. (Google’s rate-limits documentation)
  • Check active limits for each production project and model instead of hard-coding quota figures from older articles.
  • Pace request bursts and input-heavy traffic; use bounded retries with jitter only for errors that are appropriate to retry. (Google’s troubleshooting guide)
  • Stop retrying non-retryable client or billing errors and correct the underlying issue. (Google’s troubleshooting guide)
  • Keep Gemini Developer API limits separate from other Google Cloud services, Gemini CLI quotas, and subscription benefits in AI Studio.
  • If normal demand exceeds available capacity, follow the current upgrade or rate-limit-increase guidance for your account and project on Google’s official rate-limits page. (Google’s rate-limits documentation)

Sources

Rate limits | Gemini API | Google AI for Developers

Billing | Gemini API | Google AI for Developers

Troubleshooting guide | Gemini API | Google AI for Developers

Contact us