SPB Git

Repository Public

rate-limits.md 8.8 KB 212 lines markdown

1Rate limits regulate the number of requests you can make to the Gemini API2within a given timeframe. These limits help maintain fair usage, protect against3abuse, and help maintain system performance for all users.45[View your active rate limits in AI Studio](https://aistudio.google.com/rate-limit?timeRange=last-28-days)67## How rate limits work89Rate limits are usually measured across three dimensions:1011- Requests per minute (**RPM**)12- Tokens per minute (input) (**TPM**)13- Requests per day (**RPD**)1415Your usage is evaluated against each limit, and exceeding any of them will16trigger a rate limit error. For example, if your RPM limit is 20, making 2117requests within a minute will result in an error, even if you haven't exceeded18your TPM or other limits.1920Rate limits are applied per project, not per API key. Requests per day (**RPD**)21quotas reset at midnight Pacific time.2223Limits vary depending on the specific model being used, and some limits only24apply to specific models. For example, Images per minute, or IPM, is only25calculated for models capable of generating images (Nano Banana), but is26conceptually similar to TPM. Other models might have a token per day limit (TPD).2728Rate limits are more restricted for experimental and preview models.2930### Spend-based rate limits3132In addition to requests per minute (RPM) and tokens per minute (TPM) limits, the33Gemini API enforces spend-based rate limits to protect against unexpected34charges. Whether these limits apply to your account depends on your billing35history and [usage tier](https://ai.google.dev/gemini-api/docs/rate-limits#usage-tiers).3637The following table shows the spend-based rate limits for each38[usage tier](https://ai.google.dev/gemini-api/docs/rate-limits#usage-tiers). These limits are evaluated on a rolling 10-minute39window. Whether these limits apply to your account depends on your billing40history and account standing.4142| Usage tier | Spend rate limit (per 10 minutes) |43|---|---|44| **Free** | N/A |45| **Tier 1** | $10 |46| **Tier 2** | $50 |47| **Tier 3** | $200 |4849If you hit a spend-based rate limit, the API returns a `429 RESOURCE_EXHAUSTED`50error. To resolve this:5152- **Wait and retry** after a short period.53- **Reduce the rate of expensive requests**, for example by using smaller context windows or shorter outputs.54- If you consistently hit this limit during normal usage, [request a rate limit increase](https://ai.google.dev/gemini-api/docs/rate-limits#request-rate-limit-increase).5556## Usage tiers5758Rate limits are tied to the project's usage tier. As your API usage and spending59increase, you'll be automatically upgraded to a higher tier with increased rate60limits.6162The qualifications for Tiers 2 and 3 are based on the total cumulative spending63on Google Cloud services (including, but not limited to, the Gemini API) for the64billing account linked to your project.6566| Usage tier | Qualification | [Billing tier cap](https://ai.google.dev/gemini-api/docs/billing#tier-spend-caps) |67|---|---|---|68| **Free** | [Active project](https://ai.google.dev/gemini-api/docs/api-key#google-cloud-projects) or free trial | N/A |69| **Tier 1** | [Set up and link an active billing account](https://ai.google.dev/gemini-api/docs/billing#setup-billing) | $250 |70| **Tier 2** | Paid $100 + 3 days from first successful payment | $2,000 |71| **Tier 3** | Paid $1,000 + 30 days from first successful payment | $20,000 - $100,000+ |7273While meeting the stated qualification criteria is generally74sufficient for approval, in rare cases an upgrade request may be denied based on75other factors identified during the review process.7677This system helps maintain the security and integrity of the Gemini API platform78for all users.7980## Gemini API rate limits8182Rate limits depend on a variety of factors (such as your usage tier) and can be83viewed in Google AI Studio. As your tier and account status change over time,84your rate limits will automatically update.8586[View your active rate limits in AI Studio](https://aistudio.google.com/rate-limit?timeRange=last-28-days)8788Specified rate limits are not guaranteed and actual capacity may vary.8990## Priority inference rate limits9192[Priority](https://ai.google.dev/gemini-api/docs/priority-inference) consumption holds its own rate93limits even though consumption is counted towards overall interactive traffic94rate limits. **Default rate limits are: 0.3x the [standard rate limit](https://aistudio.google.com/rate-limit) for each model and tier**9596## Batch API rate limits9798[Batch API](https://ai.google.dev/gemini-api/docs/batch-api) requests are subject to their own rate99limits, separate from the non-batch API calls.100101- **Concurrent batch requests:** 100102- **Input file size limit:** 2GB103- **File storage limit:** 20GB104- **Enqueued tokens per model:** The **Batch enqueued tokens** table lists the maximum number of tokens that can be enqueued for batch processing across all your active batch jobs for a given model.105106### Tier 1107108| Model | Batch enqueued tokens |109| Text-out models |||||110|---|---|---|---|---|111| Gemini 3.1 Pro Preview | 5,000,000 |112| Gemini 3.5 Flash-Lite | 10,000,000 |113| Gemini 3.8 Flash | 3,000,000 |114| Gemini 3.7 Flash | 3,000,000 |115| Gemini 3.1 Flash Lite | 10,000,000 |116| Gemini 3.1 Flash Lite Preview | 10,000,000 |117| Gemini 3.6 Flash | 3,000,000 |118| Gemini 3.5 Flash | 3,000,000 |119| Gemini 2.5 Pro | 5,000,000 |120| Gemini 2.5 Pro TTS | 25,000 |121| Gemini 2.5 Flash | 3,000,000 |122| Gemini 2.5 Flash Preview | 3,000,000 |123| Gemini 2.5 Flash Image Preview | 3,000,000 |124| Gemini 2.5 Flash TTS | 100,000 |125| Gemini 2.5 Flash Lite | 10,000,000 |126| Gemini 2.5 Flash Lite Preview | 10,000,000 |127| Gemini 2.0 Flash | 10,000,000 |128| Gemini 2.0 Flash Image | 3,000,000 |129| Gemini 2.0 Flash Lite | 10,000,000 |130| Gemini 3.1 Flash Image Preview 🍌 | 1,000,000 |131| Gemini 3.1 Flash Lite Image 🍌 | 2,000,000 |132| Gemini 3 Pro Image Preview 🍌 | 2,000,000 |133| Gemini Embedding | 500,000 |134135### Tier 2136137| Model | Batch enqueued tokens |138| Text-out models |||||139|---|---|---|---|---|140| Gemini 3.1 Pro Preview | 500,000,000 |141| Gemini 3.5 Flash-Lite | 500,000,000 |142| Gemini 3.1 Flash Lite | 500,000,000 |143| Gemini 3.1 Flash Lite Preview | 500,000,000 |144| Gemini 3.8 Flash | 400,000,000 |145| Gemini 3.7 Flash | 400,000,000 |146| Gemini 3.6 Flash | 400,000,000 |147| Gemini 3.5 Flash | 400,000,000 |148| Gemini 2.5 Pro | 500,000,000 |149| Gemini 2.5 Pro TTS | 100,000 |150| Gemini 2.5 Flash | 400,000,000 |151| Gemini 2.5 Flash Preview | 400,000,000 |152| Gemini 2.5 Flash Image Preview | 400,000,000 |153| Gemini 2.5 Flash TTS | 100,000 |154| Gemini 2.5 Flash Lite | 500,000,000 |155| Gemini 2.5 Flash Lite Preview | 500,000,000 |156| Gemini 2.0 Flash | 1,000,000,000 |157| Gemini 2.0 Flash Image | 400,000,000 |158| Gemini 2.0 Flash Lite | 1,000,000,000 |159| Gemini 3.1 Flash Image Preview 🍌 | 250,000,000 |160| Gemini 3.1 Flash Lite Image 🍌 | 270,000,000 |161| Gemini 3 Pro Image Preview 🍌 | 270,000,000 |162| Gemini Embedding | 5,000,000 |163164### Tier 3165166| Model | Batch enqueued tokens |167| Text-out models |||||168|---|---|---|---|---|169| Gemini 3.1 Pro Preview | 1,000,000,000 |170| Gemini 3.5 Flash-Lite | 1,000,000,000 |171| Gemini 3.1 Flash Lite | 1,000,000,000 |172| Gemini 3.1 Flash Lite Preview | 1,000,000,000 |173| Gemini 3.8 Flash | 1,000,000,000 |174| Gemini 3.7 Flash | 1,000,000,000 |175| Gemini 3.6 Flash | 1,000,000,000 |176| Gemini 3.5 Flash | 1,000,000,000 |177| Gemini 2.5 Pro | 1,000,000,000 |178| Gemini 2.5 Pro TTS | 1,000,000 |179| Gemini 2.5 Flash | 1,000,000,000 |180| Gemini 2.5 Flash Preview | 1,000,000,000 |181| Gemini 2.5 Flash Image Preview | 1,000,000,000 |182| Gemini 2.5 Flash TTS | 4,000,000 |183| Gemini 2.5 Flash Lite | 1,000,000,000 |184| Gemini 2.5 Flash Lite Preview | 1,000,000,000 |185| Gemini 2.0 Flash | 5,000,000,000 |186| Gemini 2.0 Flash Image | 1,000,000,000 |187| Gemini 2.0 Flash Lite | 5,000,000,000 |188| Gemini 3.1 Flash Image Preview 🍌 | 750,000,000 |189| Gemini 3.1 Flash Lite Image 🍌 | 1,000,000,000 |190| Gemini 3 Pro Image Preview 🍌 | 1,000,000,000 |191| Gemini Embedding | 10,000,000 |192193## How to upgrade to the next tier194195To transition from the Free tier to a paid tier, you must first196[set up billing in AI Studio](https://ai.google.dev/gemini-api/docs/billing).197198Once your project meets the [specified criteria](https://ai.google.dev/gemini-api/docs/rate-limits#usage-tiers), it will be199automatically upgraded to the next tier. Tier upgrades from the Free to Tier 1200will typically take effect instantly, and subsequent tier upgrades will take201effect within 10 minutes. Navigate to the [Projects page](https://aistudio.google.com/projects) in AI Studio to check your tiers.202203## Request a rate limit increase204205Each model variation has an associated rate limit (requests per minute, RPM).206For details on those rate limits, see the207[AI Studio Rate Limit](https://aistudio.google.com/rate-limit) page.208209[Request paid tier rate limit increase](https://forms.gle/ETzX94k8jf7iSotH9)210211We offer no guarantees about increasing your rate limit, but we'll do our best212to review your request.
Files main
Menu

Theme