Skip to main content
Watch: I Built an AI App Without Leaving Databricks

Cost levers - verified

How to cut your Gemini API bill

Prompt caching: automatic and explicit. Cache lifetime: explicit: 1 hour default, no bounds; implicit not stated. A cache hit typically saves 90% on input across 9 current Google models. Batch: 50% off, 24h target, expires at 48 hours. Batch and caching stack: cache hits at the cache rate. Service tiers: Flex (50% off), Priority (75 to 100% more).

Read from ai.google.dev. Compare every provider's cost levers

Caching
Automatic and explicit
Cache hit saves
90%
Batch
50% off
Service tiers
2

Prompt caching

Mode

Both: automatic caching by default, plus explicit breakpoints you control

Implicit caching on by default for Gemini 2.5 and newer (no savings guarantee). Explicit cached-content resources (CachedContent, guaranteed savings) on Gemini 3 and 2.5 via the generateContent API only; not supported for Gemini 4 Argon and onward. The recommended Interactions API documents implicit caching only.

Cache lifetime

Implicit: not stated. Explicit: TTL defaults to 1 hour if not set; no minimum or maximum bounds; updatable via ttl or expire_time

Minimum prompt

Gemini 4 Argon, Gemini 3.8 Flash, Gemini 3.6 Flash, Gemini 3.1 Pro Preview: 4,096. Gemini 2.5 Flash and 2.5 Pro: 2,048.

Cache write cost
Not stated
Cache read cost

Per-model 'Context caching price' (in facts.json cacheRead)

Storage cost

Explicit caches: billed per hour of TTL on the cached token count (per-model storage price, e.g. $1.00 / 1M tokens per hour on Gemini 3.x Flash models after promo; $4.50 / 1M tokens per hour on Gemini 3.1 Pro Preview). Implicit: no storage line documented.

How to enable

Implicit: nothing to configure; put large common content first. Explicit: create a cache (client.caches.create) and pass its name as cached_content (OpenAI library: extra_body cached_content).

From the docs
“Implicit caching is enabled by default for all Gemini 2.5 and newer models.”
“Implicit caching (automatically enabled on Gemini 2.5 and newer models, no cost saving guarantee)”
“Explicit caching (can be manually enabled on Gemini 3 and 2.5 models, cost saving guarantee; not supported for Gemini 4 Argon and onward)”
“If not set, the TTL defaults to 1 hour. The cost for caching depends on the input token size and how long you want the tokens to persist.”
“There are no minimum or maximum bounds on the TTL.”
“| Gemini 4 Argon | 4,096 |”
“| Gemini 2.5 Flash | 2,048 |”
“Storage duration: The amount of time cached tokens are stored (TTL), billed based on the TTL duration of cached token count.”
“$1.00 / 1,000,000 tokens per hour (storage price)”
“Implicit caching only (explicit caching is not supported).”
“you can enable explicit caching using the `cached_content` property on `extra_body`.”

Sources: ai.google.dev/gemini-api/docs/caching, ai.google.dev/gemini-api/docs/generate-content/caching, ai.google.dev/gemini-api/docs/pricing

Batch API

Discount

50% off

50% of standard cost

Window

Target turnaround 24 hours (usually much quicker); jobs pending or running more than 48 hours expire with no results

Limits

Inline requests: total request size under 20MB; input file (JSONL via File API): max 2GB; results stored 6 weeks

Endpoint

BatchGenerateContent (batches.create; batches.create_embeddings for embeddings); also via the OpenAI compatibility layer

Stacks with caching

Cache hits inside a batch are billed at the standard caching rate

“If a request in your batch results in a cache hit, you pay the standard context caching rates.”
ai.google.dev
From the docs
“The Gemini Batch API is designed to process large volumes of requests asynchronously at 50% of the standard cost.”
ai.google.dev
“The target turnaround time is 24 hours, but in majority of cases, it is much quicker.”
ai.google.dev
“JOB_STATE_EXPIRED: The job has expired because it was running or pending for more than 48 hours. The job will not have any results to retrieve.”
ai.google.dev
“This is suitable for smaller batches that keep the total request size under 20MB.”
ai.google.dev
“The maximum allowed file size for an input file is 2GB.”
ai.google.dev
“If a request in your batch results in a cache hit, you pay the standard context caching rates.”
ai.google.dev

Service tiers

Flex trades speed or availability for a lower price; Priority and Fast cost more for lower latency or reserved capacity.

Flex

Flex inference

Set with service_tier: flex

Price effect

50% of standard

Trade-off

Minutes (1 to 15 min target), best-effort sheddable capacity, 503/429 on congestion, no automatic fallback to standard; counts toward normal rate limits

From the docs
“The Gemini Flex API is an inference tier that offers a 50% cost reduction compared to standard rates, in exchange for variable latency and best-effort availability.”
ai.google.dev
“| **Latency** | Minutes (1–15 min target) | Low (Seconds) | Seconds to minutes | Up to 24 hours |”
ai.google.dev
“No server-side fallback: To prevent unexpected charges, the system won't automatically upgrade a Flex request to the Standard tier if Flex capacity is full.”
ai.google.dev

Priority

Priority inference

Set with service_tier: priority

Price effect

75-100% more than Standard

Trade-off

Seconds, non-sheddable; overflow gracefully downgraded to Standard and billed at standard rate; default limit 0.3x standard rate limit

From the docs
“Priority inference is priced at 75-100% more than the standard API and billed per token.”
ai.google.dev
“If Priority limits are exceeded due to congestion, overflow requests are automatically and gracefully downgraded to Standard processing instead of failing with a 503 or 429 error. Downgraded requests are billed at the standard rate, not the Priority premium rate.”
ai.google.dev

Other discounts and surcharges

  • Contributor Tier (discount in exchange for data use)

    “The Gemini Contributor Tier allows developers to get discounted token costs on select models in exchange for permission to use data from those models to provide, improve, and develop Google products and services and machine learning technologies.”
    ai.google.dev
    “Developers receive up to 50% off token costs for select models, with the same real-time performance of the standard API.”
    ai.google.dev
  • Enterprise: provisioned throughput and volume-based discounts

    “Provisioned throughput”
    ai.google.dev
    “Volume-based discounts (based on usage)”
    ai.google.dev
  • Time-limited promotional pricing on several models (e.g. Gemini 4 Argon through November 30, 2026; Gemini 3.8 Flash through December 31, 2026)

    “$2.00 through November 30, 2026.<br>$4.00 starting December 1, 2026.”
    ai.google.dev

Google per-model prices

USD per 1M tokens from the provider's own pricing page, newest release first. A dash means the model has no such rate. These are the Google models billed through Gemini. Muted rows are scheduled for shutdown or deprecated.

Google models with input, cache, batch, output and fast mode prices per 1M tokens
ModelInputCached inputBatch inputOutputBatch output
Gemini 4 Argon$2$0.1095% off$1$10$5
Gemini 3.8 Flash$0.75$0.07590% off$0.375$3.75$1.875
Gemini Robotics ER 2 Preview$1$0.1090% off$0.50$5$2.50
Gemini 3.5 Flash-Lite$0.30$0.0390% off$0.15$2.50$1.25
Gemini 3.6 Flash$0.75$0.07590% off$0.375$3.75$1.875
Gemini 3.1 Flash-LiteScheduled for shutdown or deprecated$0.25$0.02590% off$0.125$1.50$0.75
Gemini 3.1 Pro Preview$2$0.2090% off$1$12$6
Gemini 3 Flash PreviewScheduled for shutdown or deprecated$0.50$0.0590% off$0.25$3$1.50
Gemini 2.5 Flash-Lite$0.10$0.0190% off$0.05$0.40$0.20
Gemini 2.5 Flash$0.30$0.0390% off$0.15$2.50$1.25
Gemini 2.5 Pro$1.25$0.12590% off$0.625$10$5

Research notes

Tool charges are out of scope.

FAQ

Does Gemini cache prompts automatically?

Both: automatic caching by default, plus explicit breakpoints you control. Implicit caching on by default for Gemini 2.5 and newer (no savings guarantee). Explicit cached-content resources (CachedContent, guaranteed savings) on Gemini 3 and 2.5 via the generateContent API only; not supported for Gemini 4 Argon and onward. The recommended Interactions API documents implicit caching only. How to enable: Implicit: nothing to configure; put large common content first. Explicit: create a cache (client.caches.create) and pass its name as cached_content (OpenAI library: extra_body cached_content).

How much does a cache hit cost on Gemini?

Across 9 current models with a cache read price, a hit saves 90% (90% to 95%) off the input price. The docs say: Per-model 'Context caching price' (in facts.json cacheRead).

Does Gemini have a batch API discount?

50% of standard cost. Window: Target turnaround 24 hours (usually much quicker); jobs pending or running more than 48 hours expire with no results. Stacks with caching: cache hits inside a batch are billed at the standard caching rate.

What service tiers does Gemini offer?

Flex: 50% of standard. Priority: 75-100% more than Standard.

Sources

Last verified from Google Gemini API's own pages below. Quotes are verbatim; each was matched against the live page.

Newsletter

Know when a provider changes its prices

One email per week. New model releases, pricing changes and what they mean for what you build.