Gemini API spending limit
How do I limit what I spend on the Gemini API?
You limit your Gemini API spend by keeping your project on the Free Tier, loading a strict Prepay balance starting at $5, or configuring an enforced spend cap budget in Google Cloud Billing. Google enforces hard cutoffs when your credits hit $0 or your billing spend cap triggers, but a 10-minute processing delay means fast traffic can still overshoot your target before requests pause.
If you don't configure these guardrails, a linked billing account on Tier 1 defaults to an automatic monthly spend cap of $250. Here is how Google handles Gemini API billing, how usage limits work, and the exact steps to stop charges before they reach your card.
Free Tier vs Paid Tier
New accounts start on the Free Tier automatically. You get access to select models in Google AI Studio and the Gemini API without entering a card, but you are bound by free tier rate limits. Google also uses prompts and responses on the Free Tier to improve its products.
Once you link an active Cloud Billing account and add at least $5 in prepaid credits, your project moves to a Paid Tier. On Paid Tiers, Google does not use your prompts and responses to train or improve its products. If you opened your Google Cloud account after March 2, 2026, keep in mind that the standard $300 Google Cloud Free Trial welcome credit cannot be used for the Gemini API or AI Studio.
If you ever want to return to the zero-cost tier, you can unlink or disable billing on the project in the Google Cloud console. That immediately drops the project back to the Free Tier.
Choosing between Prepay and Postpay
Starting March 23, 2026, Gemini API billing splits into Prepay and Postpay plans at the Cloud Billing account level.
With Prepay, you buy credits in advance on the AI Studio Billing page via "Buy credits", with a minimum purchase of $5 and a maximum of $5,000. These credits apply solely to Gemini API usage and cannot pay for other Google Cloud services. They expire after 12 months and are non-refundable unless you switch to Postpay.
Prepay acts as an operational ceiling:
- When your credit balance hits $0, all API keys across all projects linked to that billing account stop working at the same time.
- Requests fail immediately with an
HTTP 402 Payment Requirederror. - Your projects do not automatically downgrade to the Free Tier; calls simply fail until you buy more credits.
- If you have eligible Google Cloud credits, an active Prepay balance is required first. Google Cloud credits get consumed first, but if the Prepay balance reaches $0, those promotional credits stop being consumed too.
There is one catch: billing pipeline latency runs around 10 minutes. Fast parallel workloads, batch jobs, and autonomous agents can continue consuming tokens during those 10 minutes before the system halts usage. If that happens, your AI Studio dashboard will show a negative credit balance, service pauses, and the difference is deducted from your next credit purchase.
If you prefer auto-reload, you can configure it under the Available credits card by clicking "Setup auto-reload" or "Manage auto-reload". You set the payment method, the reload amount, the minimum balance threshold, and a monthly auto-charge limit under Manage auto-reload > Monthly Limit. Once automatic reloads hit that monthly dollar limit, auto-reload disables until the first day of the next month. Manual top-ups do not count against this ceiling.
On Postpay, costs accrue over the month and Google automatically charges your card at month-end or whenever your costs hit your assigned tier spend cap. If you maintain other services on the same Cloud Billing account and miss a Postpay payment, Google will suspend your Gemini API access even if you still have unused Prepay credits sitting in your balance.
Usage tiers and spend rate limits
Your Cloud Billing account is assigned a usage tier based on cumulative spending across all Google Cloud services on that account, not just the Gemini API. Upgrades from Free to Tier 1 happen instantly upon linking billing, while upgrades to Tier 2 and Tier 3 reflect within 10 minutes.
| Usage tier | Qualification | Monthly billing spend cap | Spend rate limit (rolling 10 min) |
|---|---|---|---|
| Free Tier | Default on new accounts | N/A | N/A |
| Tier 1 | Link an active billing account | $250 | $10 |
| Tier 2 | Paid $100 + 3 days since first payment | $2,000 | $200 |
| Tier 3 | Paid $1,000 + 30 days since first payment | $20,000 - $100,000+ | $200 |
Tier spend caps aggregate spend across every linked project with the Gemini API enabled. If your total spend reaches the cap, service pauses for all projects on that billing account until the 1st of the next month.
Separate from monthly caps, Google evaluates spend-based rate limits on a rolling 10-minute window. If a Tier 1 account burns more than $10 inside 10 minutes, the API returns a 429 RESOURCE_EXHAUSTED error.
Standard rate limits also apply per project across three metrics simultaneously: Requests per minute (RPM), Tokens per minute (input) (TPM), and Requests per day (RPD). Exceeding any single metric triggers a rate limit error. RPD resets every day at midnight Pacific time. If you use Grounding with Google Search on Gemini 3 and newer models, note the default limit of 1,500 RPD per project. Priority inference runs at 0.3x the standard rate limit, and the Batch API allows up to 100 concurrent requests, a 2GB input file limit, and 20GB total file storage.
You aren't charged for tokens on requests that fail with HTTP 400 or 500 errors, though they still count against your rate limit quotas. Calls to the GetTokens API are entirely free and don't count against inference quotas. For token costs by model, check What does the Gemini API cost per million tokens?.
Setting project-level spend caps
You can enforce spending ceilings at the project level using two different mechanisms: Google AI Studio or Google Cloud Billing.
Method 1: Google AI Studio monthly spend caps
Project owners, editors, and admins can set an experimental monthly spend cap directly inside AI Studio:
- Go to the Spend page (
aistudio.google.com/spend). - Locate Monthly spend cap and click Edit spend cap.
- Enter your monthly dollar ceiling and save.
This cap is subject to the same ~10-minute processing delay. Rapid bursts can cause minor overages before the stop command registers.
Method 2: Google Cloud Billing spend cap budgets
For stricter control on first-party Google Cloud accounts (excluding reseller accounts), set up a formal spend cap budget in the Cloud console. Managing this requires billing.budgets.configureSpendCap on the billing account or billing.resourcebudgets.configureSpendCap on the project. Read Can I cap my Google Cloud spend, and how do the new spend cap budgets work? for an architectural deep dive.
To configure it:
- Open the Google Cloud console and navigate to Budgets & alerts.
- Click Create new budget.
- Name the budget and select Spend cap enforcement instead of Alerts only.
- Scope the budget to a single project and a single service: choose Gemini API (Service ID
AEFD-7695-64FA, API namegenerativelanguage.googleapis.com). - Set the budget period to Monthly (starts on the 1st of each month).
- Enter your target budget amount and confirm.
Spend cap budgets automatically send alert emails to all billing administrators and project owners when spend crosses 50%, 80%, and 100% of the target amount. You cannot change these thresholds or add custom email recipients.
When gross, estimated usage costs (calculated at list price, ignoring credits) hit 100%, all new usage for the Gemini API in that project pauses for the rest of the month. In-flight requests are allowed to finish and are billed normally. On the first day of the next month, the spend resets to zero, the status shifts back to Configured, and the API unblocks.
If you must restore service early, you can manually lift the spend cap. The status becomes Lifted, service takes up to one hour to resume normal operations, and the cap won't trigger again that month unless you manually edit the budget to a higher number. You cannot edit settings or delete a spend cap budget while it is in an Enforced state; you have to lift it first.
If you configure spend caps in both AI Studio and Cloud Billing, whichever system detects the spend first will trigger and block API requests across all platforms. Note that moving a project to a new billing account creates conflicting behavior in Google's documentation: AI Studio docs state your project cap persists while spend resets to $0, but Cloud Billing docs state spend cap budgets on the old account are deleted and must be rebuilt.
Monitoring spend before the invoice
Do not rely on month-end invoice totals. Use Google's monitoring dashboards to track numbers day to day:
- AI Studio Dashboard: Check Dashboard > Usage to inspect operational volume. Credit deductions reflect within minutes, but the Total Cost breakdown graphs on the Billing and Spend pages can take up to 24 hours to update.
- Cloud Billing Reports: Go to Cloud Billing in the Google Cloud console, select Reports, set the Group by filter to SKU, and set the Services filter to Gemini API. Actual cost records typically take a day to settle and can sometimes take more than 24 hours to appear.
Automating Gemini spend monitoring with Costbrake
Because Google's billing reports and breakdown charts lag by up to 24 hours, runaway loops can run up large bills before native graphs show the damage.
Costbrake monitors spend across 23 cloud, AI, and SaaS providers, including Google Cloud (Gemini API, Vertex AI, Cloud Run, and Cloud Functions), OpenAI, and Anthropic. To bridge Google's reporting delay, Costbrake combines BigQuery billing exports with live Cloud Monitoring metric estimates to surface costs before the daily invoice batch runs.
Live Gemini API estimates from Cloud Monitoring run hourly on the Free plan ($0 for 2 connections, 3 budgets) and every 5 minutes on Pro ($12/month) and Team ($39/month), tightening to 2-minute intervals during spend surges. You get alerted via email, Slack, Discord, or webhooks when:
- An hourly spend spike exceeds 3x your 7-day rolling baseline and adds at least $5.
- Spend crosses 50%, 80%, or 100% of a budget.
- Month-to-date spend plus the last 72 hours of usage forecasts a budget breach before month-end.
- A new billable service appears above $1.
On Pro and Team plans, Costbrake includes an optional brake for Google Cloud. A brake sets a zero spend cap on the Gemini API in that project via Google Cloud's spend cap budget API. Google pauses new usage once its processing pipeline passes the cap. It requires an admin confirmation click, never triggers autonomously, and includes an undo mechanism.
You can link your setup in minutes by handing agent setup to an AI coding assistant, or configure connections manually at app.costbrake.com/signin.
Questions and answers
Does the Gemini API have a hard spending limit?
Yes. You can enforce a hard ceiling by using a Prepay billing account, which cuts off traffic with an HTTP 402 error when your balance hits $0, or by enabling a Spend Cap budget in Cloud Billing scoped to the Gemini API (AEFD-7695-64FA).
Is the Gemini API completely free to use?
New accounts start on the Free Tier, which allows free access to select models up to their specific rate limits. However, Google uses your prompts and responses on the Free Tier to improve its products, and upgrading to the Paid Tier requires adding at least $5 in prepaid credits.
What happens when I hit a Gemini API rate limit?
If you exceed your requests per minute, tokens per minute, or requests per day, or if you exceed your tier's rolling 10-minute spend limit ($10 for Tier 1, $200 for Tiers 2 and 3), the API returns an HTTP 429 RESOURCE_EXHAUSTED error until the window clears.
Can I use the $300 Google Cloud Free Trial credit on the Gemini API?
No, accounts opened after March 2, 2026 cannot apply the $300 Google Cloud Welcome credit to Gemini API or Google AI Studio usage. Those trial credits only apply to other Google Cloud products.
How quickly does Google pause Gemini API calls after a cap is breached?
Spend caps and prepay balance shutoffs are subject to a billing pipeline delay of up to roughly 10 minutes. Fast automated agents and batch jobs can accrue overages during this window before Google halts incoming requests.
Sources
Updated