# Gemini API cost calculator

[Calculate my cost →](https://apicostcheck.com/calculator/?model=gemini-3.5-flash-lite&daily=10000&input=6000&output=500&cache=0&write=0&batch=0)[Compare Google (Gemini) models side by side](https://apicostcheck.com/compare/?m=gemini-3.5-flash-lite,gemini-3.8-flash,gemini-4-hydrogen,gemini-4-neon)

At 10,000 requests a day (6,000 input and 500 output tokens each), the models below cost $915/mo to $10,200/mo without caching.

Gemini caches repeated prompt prefixes implicitly. There is no cache-write fee in our data: the first request pays normal input and later hits are billed at 5%–10% of the input price. Caching only starts above a minimum prompt length (4,096 tokens where our data lists one), so short prompts never get the discount, and you cannot force a hit. Google also sells explicit caches with an hourly storage fee on supported Gemini 3 and 2.5 models (Gemini 4 models cache implicitly only); those are not modelled here. In Gemini 4 multi-turn and agent loops, the full previous request is cached only if the new request adds at least 2,050 tokens (model output, thoughts and function results all count toward this total); smaller additions re-process the last 2,050 tokens of the previous request at the standard input rate.

The Batch API takes 50% off input and 50% off output, but cached tokens inside a batch cost 50% of the normal cached rate depending on the model, so Batch and caching do not always stack. Long-context rates apply above 200K for Gemini 3.1 Pro Preview, Gemini Pro (latest) (input 2×, output 1.5×), to the whole request; models not named there keep one price at every prompt length. 

The table prices one workload on each model: 10,000 requests a day with 6,000 input and 500 output tokens per request. Columns: no caching; 70% of input read from the cache and 5% written to it; every request sent through the Batch API. For the same traffic [Gemini 4 Carbon](https://apicostcheck.com/models/gemini-4-carbon/) costs 11× as much as [Gemini 3.5 Flash Lite](https://apicostcheck.com/models/gemini-3.5-flash-lite/).

| Model | Standard 10,000 req/day · 6,000 in · 500 out [Calculate with your numbers → (Standard)](https://apicostcheck.com/calculator/?daily=10000&input=6000&output=500&cache=0&write=0&batch=0) | With prompt caching 10,000 req/day · 6,000 in · 500 out · cache 70% [Calculate with your numbers → (With prompt caching)](https://apicostcheck.com/calculator/?daily=10000&input=6000&output=500&cache=70&write=5&batch=0) | Batch API 10,000 req/day · 6,000 in · 500 out · Batch [Calculate with your numbers → (Batch API)](https://apicostcheck.com/calculator/?daily=10000&input=6000&output=500&cache=0&write=0&batch=100) |
| --- | --- | --- | --- |
| [Gemini 3.5 Flash Lite](https://apicostcheck.com/models/gemini-3.5-flash-lite/) | $915/mo | $575/mo | $458/mo |
| [Gemini 3.8 Flash](https://apicostcheck.com/models/gemini-3.8-flash/) | $1,912/mo | $1,062/mo | $956/mo |
| [Gemini 4 Hydrogen](https://apicostcheck.com/models/gemini-4-hydrogen/) | $3,825/mo | $2,030/mo | $1,912/mo |
| [Gemini 4 Neon](https://apicostcheck.com/models/gemini-4-neon/) | $7,650/mo | $4,059/mo | $3,825/mo |
| [Gemini 4 Carbon](https://apicostcheck.com/models/gemini-4-carbon/) | $10,200/mo | $5,412/mo | $5,100/mo |

Estimates from published per-token rates; check official pricing before budgeting. Data synced from the LiteLLM price list 2026-12-05 13:00 UTC. 

[All Google (Gemini) API prices →](https://apicostcheck.com/providers/gemini/) 

## Cost per 1,000 requests

For 1,000 requests of 6,000 input and 500 output tokens, [Gemini 3.5 Flash Lite](https://apicostcheck.com/models/gemini-3.5-flash-lite/) costs $3.05 at standard rates, $1.92 with caching and $1.53 through the Batch API; [Gemini 4 Carbon](https://apicostcheck.com/models/gemini-4-carbon/) costs $34.00, $18.04 and $17.00. Multiply by your own request count, or put your traffic into the calculator. 

## How to cut the bill, in order
- Keep the shared prefix at the start and above the minimum cacheable length; short prompts never hit the implicit cache.
- Send requests about the same document close together to raise implicit hits; for a document queried for hours, compare an explicit cache (storage billed per hour; supported Gemini 3 and 2.5 models only, not Gemini 4) on Google's pricing page.
- Use Flash or Flash-Lite for volume and latency-sensitive work, Pro for complex reasoning and long documents.
- Batch everything that is not interactive, but check the cached rate inside batches for your model.
- Keep prompts under the long-context threshold with retrieval, and count them with the [token counter](https://apicostcheck.com/token-counter/) before budgeting in the [calculator](https://apicostcheck.com/calculator/). 

[When does caching pay off for your traffic? Use the prompt caching calculator →](https://apicostcheck.com/prompt-caching-calculator/)

## FAQ

### Pricing

### Do I pay to write Gemini's implicit cache?

Not in our data: a cache miss is billed as normal input and hits get the cached rate. Keep the shared part at the start of the prompt and send similar requests close together to raise the hit rate.

### Which Gemini models charge more for long prompts?

Long-context rates apply above 200K for Gemini 3.1 Pro Preview, Gemini Pro (latest) (input 2×, output 1.5×). All other models keep one price at every prompt length in our data. Above the threshold the whole request uses the higher input and output rates.

### Is Gemini Batch cheaper than caching?

For unique prompts, Batch saves more. For prompts that share a long prefix, caching saves more on input. Use both where you can, but check the cached rate inside batches, which is not discounted further on every model.

### Flash or Pro?

Flash and Flash-Lite for high-volume, latency-sensitive work such as chat, classification and extraction; Pro for complex reasoning, code and long documents. They share the same caching and Batch rules, so the choice comes down to quality per dollar: test your prompts on both before committing.

### What does the Gemini API charge besides tokens?

Main items as of 2026-11-28, paid tier: [Grounding with Google Search](https://apicostcheck.com/web-search-api-pricing/) and grounding with Google Maps on Gemini 3 and newer are each free for the first 5,000 requests a month, then $14 per 1,000; Gemini 2.5 models have a daily free allowance instead, then $35 per 1,000 grounded prompts for Search and $25 for Maps. File search bills indexing at embedding rates, from $0.15 per 1M tokens; storage and query-time embeddings are free. Explicit context cache storage (supported Gemini 3 and 2.5 models only, not Gemini 4) is billed per hour. Code execution and URL context have no separate fee, only tokens. The Deep Research agent (preview) bills all its tokens, including intermediate reasoning, at standard rates plus the tool fees above. Managed agents do not bill environment compute during the preview.

### Billing, credits and limits

### Do Google AI Pro or Ultra subscriptions include Gemini API credits?

Yes. As of 2026-11-28, Google AI Pro includes $10 a month in GenAI and Google Cloud developer credits, Google AI Ultra 5x $40 and Google AI Ultra 20x $100, usable for the Gemini API and claimed through the Google Developer Program; Prepay billing rules and expiry apply. Details on [subscriptions vs API (ChatGPT, Claude and Gemini plans)](https://apicostcheck.com/chatgpt-plus-vs-api-cost/).

### Do prepaid Gemini API credits expire?

Yes. As of 2026-11-29, [Google's Gemini API billing page](https://ai.google.dev/gemini-api/docs/billing#prepay) says credits bought on the Prepay billing plan expire 12 months after purchase and are then forfeited; they pay only for Gemini API usage, not for other Google Cloud services. Google Cloud's [Supplemental Paid Credit Terms](https://cloud.google.com/terms/supplemental-paid-credit), which the Gemini API terms apply to payments, say paid credits expire 12 months after purchase or when your agreement with Google ends, whichever comes first.

### Can I get a refund for unused Gemini API Prepay credits?

Usually not. As of 2026-11-29, [Google's Gemini API billing page](https://ai.google.dev/gemini-api/docs/billing#refunds) says refunds aren't allowed for Prepay billing accounts, except when you meet the criteria and manually upgrade the account to Postpay: the Prepay account is then closed and the remaining credits are refunded to your payment method (the same page's FAQ also says switching from Prepay to Postpay is not supported, so check what the AI Studio Billing page offers you). Closing a Prepay account for any other reason forfeits the remaining credits. Google Cloud's [Supplemental Paid Credit Terms](https://cloud.google.com/terms/supplemental-paid-credit), which the Gemini API terms apply to payments, also give a pro rata refund of the remaining balance if Google notifies you that prepaying is no longer required and you move to paying in arrears, or if applicable law gives you a right to cancel the purchase, and they don't limit rights that the law doesn't allow to be limited. You request these refunds from Google Cloud support.

### How does Gemini API Prepay billing work?

As of 2026-11-29, per [Google's Gemini API billing page](https://ai.google.dev/gemini-api/docs/billing#prepay), you buy credits on the AI Studio Billing page, which shows the minimum purchase required for your region and tier and the maximum amount your account can hold at one time, and usage is deducted in near real time. When the balance hits $0, every API key in every project linked to that billing account stops working and requests fail with HTTP 402 until you add credits. Because billing lags about 10 minutes, usage can run past your balance before it stops; long-running work such as Batch jobs and agents may keep using credits. Optional auto-reload tops up the balance when it falls to a minimum you set, and a monthly auto-charge limit turns auto-reload off until the next month once reached (manual purchases don't count toward it).

### What does Gemini API error 429 RESOURCE_EXHAUSTED mean?

You hit a rate limit. As of 2026-11-29, [Google's Gemini API rate limits page](https://ai.google.dev/gemini-api/docs/rate-limits) says limits are applied per project, not per API key, and are usually measured in requests per minute, input tokens per minute and requests per day (RPD quotas reset at midnight Pacific time); exceeding any one triggers the error; paid tiers can also hit spend-based limits over a rolling 10-minute window, which return 429 RESOURCE_EXHAUSTED. Wait and retry with exponential backoff; on a paid tier you can request a rate limit increase (Google offers no guarantee). An empty Prepay balance is a different error: per [the billing page](https://ai.google.dev/gemini-api/docs/billing#prepay), requests fail with HTTP 402 Payment Required until you add credits.

### Is there a free tier for the Gemini API?

Yes, for some models. As of 2026-11-29, [Google's Gemini API pricing page](https://ai.google.dev/gemini-api/docs/pricing) says the Free tier gives limited access to certain models with free input and output tokens, and content on the Free tier is used to improve Google's products (on the Paid tier it is not). Per [the billing page](https://ai.google.dev/gemini-api/docs/billing), new accounts begin on the Free Tier, up to each model's free tier rate limits; a model whose Free Tier column on the pricing page says "Not available" can't be used for free. Moving to the Paid tier means linking a billing account; depending on the account, you then prepay credits (the purchase screen shows the minimum for your region and tier) or choose, or are assigned, Postpay.

### How do I set a spend cap on the Gemini API?

As of 2026-11-29, [Google's Gemini API billing page](https://ai.google.dev/gemini-api/docs/billing#project-spend-caps) says project spend caps are experimental: accounts with the project editor, owner or admin role set them per project in AI Studio on the Spend page under Monthly spend cap > Edit spend cap. They are not available for invoiced (offline) billing accounts. Because billing data can take around 10 minutes to process, you can be charged beyond the cap, and long-running tasks such as batch mode and agent sessions may also exceed it. Separately, each billing account tier has its own monthly spend cap.

### What does it take to reach a higher Gemini API usage tier?

As of 2026-11-29, [Google's rate limits page](https://ai.google.dev/gemini-api/docs/rate-limits) lists: Tier 1 when you link an active billing account (billing tier cap $250), Tier 2 after $100 paid and 3 days from the first successful payment ($2,000), and Tier 3 after $1,000 paid and 30 days from the first successful payment ($20,000 to $100,000+). [Google's billing page](https://ai.google.dev/gemini-api/docs/billing#tier-spend-caps) describes these caps as a maximum monthly spend limit. Tiers 2 and 3 count total Google Cloud spending on the billing account linked to your project, not only the Gemini API. Upgrades usually happen automatically once you qualify, though Google says a request may be denied in rare cases.

---
Source: https://apicostcheck.com/gemini-api-cost-calculator/ · prices in USD per 1M tokens, synced 2026-12-05 13:00 UTC · Free to reuse under CC BY 4.0 with attribution to apicostcheck.com (a plain or nofollow link is fine). Prices derived from LiteLLM's model price list, MIT License, (c) 2023 Berri AI.
