Google Gemini pricing: what the API really costs
Updated 2026-07-15
The Gemini API has a real free tier that costs nothing but caps you at a few requests per minute, while paid usage bills per million tokens with no subscription required. Most solo developers land between $5 and $50 per month; the scenarios below show exactly where that money goes.
Quick answer: three different Gemini prices
People searching for Google Gemini pricing usually mean one of three different things, and Google does not make the distinction obvious. First, the consumer subscription. The Gemini app's paid plan (Google AI Pro) is a fixed fee of about $20 per month. It covers the chatbot and app features, not the API. Nothing you pay there raises your API quota by a single request. Second, the Gemini API through Google AI Studio. This is what developers actually integrate. It has a genuinely free tier with hard rate limits, and a paid tier that bills per million tokens with no monthly fee. A hobby project typically costs single-digit dollars per month; a small production app lands in the hundreds. Third, Vertex AI. Same models, enterprise wrapper, Google Cloud billing, per-token rates in the same range. If price is the question you are asking, you almost certainly want AI Studio rather than Vertex. The rest of this guide covers the API: what the free tier allows, what paid usage costs at realistic volumes, and what to do when the rate limiter starts returning 429s.
Gemini API pricing tiers and free-tier rate limits
The Gemini API meters three things at once: requests per minute (RPM), tokens per minute (TPM), and requests per day (RPD). Whichever ceiling you hit first, the API answers 429 until that window resets. Limits apply per Google Cloud project and per model, so creating a second key inside the same project changes nothing. Google revises these numbers frequently, so treat the table as the shape of the system rather than a contract. The figures are approximate Flash-class limits as of mid-2026; Pro-class models get materially lower caps at every tier. Check Google's rate-limits documentation for the exact values applied to your project today.
| Tier | How you qualify | Approx. Flash-class limits | Billing |
|---|---|---|---|
| Free | AI Studio key, no billing account | ~10 RPM, ~250K TPM, ~250 RPD | $0 |
| Tier 1 | Link a Cloud Billing account | ~1,000 RPM, ~1M TPM, ~10K RPD | Per-token rates |
| Tier 2 | Over $250 total spend, 30+ days since first payment | ~2,000 RPM, ~3M TPM | Per-token rates |
| Tier 3 | Over $1,000 total spend | Highest published caps, custom on request | Per-token rates |
Free vs paid: what actually changes
Adding a billing account does more than raise the ceilings. The most overlooked difference sits in the terms: Google may use free-tier prompts and responses to improve its products, and that can include human review. Paid API traffic is excluded from product improvement. If you are prototyping on anything sensitive, that line matters more than any rate limit. The daily request cap is the other practical difference. On the free tier it is a hard ceiling that resets at midnight Pacific time. No retry strategy gets around it; you wait, upgrade, or route the traffic somewhere else.
| What changes | Free tier | Paid (Tier 1+) |
|---|---|---|
| Token cost | $0 | Billed per million tokens, varies by model |
| Rate limits | Single-user territory | Orders of magnitude higher |
| Daily cap | Hard stop, resets midnight Pacific | High enough that most apps never see it |
| Data used to improve Google products | Yes | No |
| Batch API and context caching | Restricted | Available; batch jobs bill at reduced rates |
| Good for | Prototypes, evals, cron scripts | Anything with real users |
Test your tier from the command line
One curl tells you whether your key works and which tier you are effectively on. The response includes a usageMetadata block with exact input and output token counts, which is the number you multiply by list rates when forecasting spend. If you get HTTP 429 with status RESOURCE_EXHAUSTED instead of a completion, you have either burned the day's free-tier quota or you are sending faster than the per-minute window allows.
curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-3.5-flash:generateContent" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"contents":[{"parts":[{"text":"Explain token billing in one paragraph."}]}]}'What Gemini costs per month: three scenarios
These scenarios use Gemini 3.5 Flash at its list price of $1.50 per million input tokens and $9.00 per million output tokens. Two things dominate the math. Output tokens cost six times as much as input, so verbose responses are the expensive part. And chat applications resend conversation history on every turn, so input volume grows fast with conversation length unless you trim context. If the chat-frontend row describes your workload, note that the same math applies to any model, and budget-class models such as DeepSeek V4 Flash change the totals dramatically for conversational use. Also budget separately for long-document jobs: Pro-class Gemini models bill a higher rate once a prompt crosses the large-context threshold.
| Workload | Traffic profile | Monthly tokens | Approx. cost |
|---|---|---|---|
| Personal scripts | 50 requests/day, ~1K in / 250 out each | 1.5M in / 0.38M out | ~$5.60 |
| Chat frontend (SillyTavern class) | 200 messages/day, ~2.5K context in / 350 out | 15M in / 2.1M out | ~$41 |
| Small production app | 5,000 requests/day, ~1.2K in / 400 out | 180M in / 60M out | ~$810 |
Troubleshooting Gemini API rate limits
A 429 with RESOURCE_EXHAUSTED is generic, so start by working out which of the three meters you actually hit. The client below retries transient per-minute trips with backoff and gives up quickly on anything that retrying cannot fix.
- Daily cap exhausted (free tier): the RPD counter resets at midnight Pacific time. No retry pattern helps; upgrade the tier or move the traffic.
- RPM bursts: parallel workers and naive retry loops trip the per-minute limit even at low daily volume. Add exponential backoff with jitter.
- TPM trips on long context: a handful of 100K-token prompts can exhaust tokens-per-minute while your request rate looks tiny. Trim history or cache stable prefixes.
- Wrong knob: limits attach to the Google Cloud project, not the API key. Minting new keys in the same project does nothing.
- Model class: Pro-class caps are far lower than Flash-class at the same tier. Route background jobs to Flash and reserve Pro for the calls that need it.
import random
import time
from google import genai
from google.genai import errors
client = genai.Client() # reads GEMINI_API_KEY from the environment
def generate(prompt: str, retries: int = 5) -> str:
for attempt in range(retries):
try:
resp = client.models.generate_content(
model="gemini-3.5-flash", contents=prompt
)
return resp.text
except errors.APIError as e:
if e.code != 429 or attempt == retries - 1:
raise
time.sleep(min(2 ** attempt + random.random(), 30))
raise RuntimeError("unreachable")The gateway option: fixed prices, no tier ladder
If your blocker is the tier ladder rather than the per-token price, an AI gateway is the pragmatic alternative. apisrouter.com serves gemini-3.5-flash at $1.20 per million input tokens and $7.20 per million output, with global models at 20% below official list pricing and pay-as-you-go billing instead of a subscription. There is no signup form: pay at /topup, the API key arrives by email, and your first top-up adds +100% balance. Quota becomes a balance you spend down rather than a per-minute negotiation with a tier system. The endpoint is OpenAI-compatible, so anything that accepts a custom base URL works: point it at https://api.apisrouter.com/v1 and the model list populates from /v1/models. The same catalog carries claude-sonnet-4-6, gpt-5.5, deepseek-v4-flash, and glm-5, which makes A/B-testing Gemini against alternatives a one-line change.
curl https://api.apisrouter.com/v1/chat/completions \
-H "Authorization: Bearer $KEAIAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.5-flash",
"messages": [{"role": "user", "content": "Hello"}]
}'FAQ
Is the Gemini API free to use?
Yes, within limits. An AI Studio key needs no credit card and free-tier calls cost nothing. The caps are roughly a few requests per minute and a few hundred per day on Flash-class models, and Google may use free-tier data to improve its products. For production traffic you link billing and pay per token.
How much does Gemini cost per month?
The consumer Gemini app subscription is a fixed fee of about $20 per month. The API has no monthly fee at all: light personal use of Gemini 3.5 Flash usually works out under $10 per month, a busy chat frontend in the tens of dollars, and a small production app in the hundreds, driven entirely by token volume.
What are the rate limits on the free Gemini API?
Approximately 10 requests per minute, around 250K tokens per minute, and a few hundred requests per day for Flash-class models, with Pro-class models capped much lower. Google revises these figures often and applies them per project and per model, so check the official rate-limits page for your current values.
Why do I keep getting 429 errors from the Gemini API?
A 429 with RESOURCE_EXHAUSTED means one of three meters tripped: requests per minute, tokens per minute, or requests per day. Per-minute trips recover with exponential backoff and jitter. If the daily cap is gone, nothing resets it before midnight Pacific except upgrading to a paid tier or routing traffic elsewhere.
Is Gemini cheaper than GPT-5.5 or Claude?
Per token, Flash-class Gemini undercuts both gpt-5.5 and claude-sonnet-4-6 by a wide margin, while budget models like deepseek-v4-flash undercut Gemini itself. The comparison that matters is cost per completed task at acceptable quality, so benchmark your own prompts before standardizing on one model.
Does Google train on Gemini API data?
On the free tier, Google states that prompts and responses may be used to improve its products, which can include human review. Paid API traffic is excluded from product improvement under the current terms. Read the Gemini API terms before sending anything sensitive through a free key.