Skip to content
Ali Hassan, home

Blog5 min read

Gemini API pricing: what each model costs to run

Gemini API pricing for Flash-Lite, Flash and Pro: per-token prices, the free tier, caching and batch discounts, and the Flash price change in January 2027.

By Ali Hassan, Senior engineer for SaaS and AI products

The Gemini API is priced per million tokens, with separate rates for input and output, and output includes the model's thinking tokens. As of 8 October 2026, on the paid tier, Gemini 3.5 Flash-Lite costs $0.30 per million input tokens and $2.50 per million output tokens, Gemini 3.8 Flash costs $0.75 and $3.75, and Gemini 3.1 Pro (preview) costs $2 and $12. Two dates and thresholds matter for budgeting: Gemini 3.8 Flash doubles in price on 1 January 2027, and Gemini 3.1 Pro charges more for prompts over 200,000 tokens.

Gemini API prices by model

Paid-tier prices per 1 million tokens, from Google's pricing page:

ModelInputOutputNotes
Gemini 3.5 Flash-Lite$0.30$2.50Free tier available
Gemini 3.8 Flash$0.75$3.75Until 31 December 2026, then $1.50 input and $7.50 output; free tier available
Gemini 3.1 Pro (preview)$2.00$12.00Prompts up to 200K tokens; above that $4 input and $18 output; no free tier

Prices as of 8 October 2026. They change, so check Google's pricing page before you budget, or compare them with OpenAI and Claude in the API pricing calculator.

The output column carries more weight than it looks. Gemini counts a model's thinking tokens as output, so a request that reasons at length before answering is billed for that reasoning at the output rate, even though you never see it.

What changes the price you actually pay

  • The free tier. Gemini 3.8 Flash and Gemini 3.5 Flash-Lite can be used free of charge on the free tier, which makes prototyping cheap. Gemini 3.1 Pro has no free tier.
  • Context caching. A repeated prompt prefix can be cached and read back at a fraction of the input price: $0.03 per million on Flash-Lite, $0.075 on Flash (rising to $0.15 in January) and $0.20 on Pro. Unlike some vendors, Google also charges for storing the cache by the hour: $1.00 per million tokens per hour on Flash-Lite, $0.50 on Flash (rising to $1.00) and $4.50 on Pro. For a short system prompt the storage is pennies; for a large document held all month it is not.
  • The Batch API. Requests that can wait are half price, input and output.
  • Long prompts on Pro. Above 200,000 tokens, Gemini 3.1 Pro's whole request moves to $4 input and $18 output per million.
  • Grounding with Google Search. On the paid tier, the first 5,000 search requests a month are free, shared across Gemini 3 models and newer, then $14 per 1,000.

A worked example

Take a support feature that sends 2,000 input tokens per request and gets back 400 output tokens, across 100,000 requests a month: 200 million input tokens and 40 million output tokens.

  • Gemini 3.5 Flash-Lite: $60 input plus $100 output, $160 a month
  • Gemini 3.8 Flash: $150 input plus $150 output, $300 a month until December, then $600 a month from January 2027
  • Gemini 3.1 Pro (preview): $400 input plus $480 output, $880 a month

Now cache a 1,500-token system prompt on Gemini 3.8 Flash. 150 million cached tokens at $0.075 per million is about $11, the remaining 50 million fresh tokens are $37.50, and output stays at $150, for about $200 a month plus well under a dollar of cache storage. That is a third off, and again most of what remains is output.

How Gemini compares with OpenAI and Claude

On the top tier the prices are close: Gemini 3.1 Pro is $2 input and $12 output, against $2 and $10 for OpenAI's GPT-6.1 Sol and Claude Sonnet 5.5.

The surprise is at the bottom. Gemini's cheapest paid model, Flash-Lite, costs $0.30 input and $2.50 output, while OpenAI's GPT-6 Luna and Claude Haiku 5.5 both cost $0.10 and $0.50. On the workload above that is $160 a month on Flash-Lite against $40 on either of the other two. Whether the cheaper ones are good enough for your task is a question for a test set, not a price table, but the gap is worth knowing before you choose. Claude API pricing and what an AI feature costs to run have the other two vendors in detail.

Budget for the January price change

If you are building on Gemini 3.8 Flash now, plan the 2027 budget at the new price. The same traffic that costs $300 a month in December costs $600 in January, and the cached-input and storage rates double with it. A model behind an interface, which is how I build every product, turns that into a choice: keep Flash, or move the simple steps to a cheaper model and keep Flash for the rest.

Measure before you switch

Whichever vendor you are on, the useful number is what one request costs today and which part of it is expensive. On Evoriqa, every AI action draws from one credit balance per workspace, so the cost of AI use is visible to the customer as well as to me. On an AI audit reviewer for a CPA firm, logging tokens on every call put a review at a measured $0.24-0.28.

If your Gemini bill is growing faster than your usage, or you are weighing a move between vendors, an LLM cost and RAG quality audit measures cost per request on your real traffic and ranks the changes by what they save.

From the work

  • AI reply grounded in cited help-centre content, shadow-mode draft metrics per channel, and metered AI credits in billing.

    Evoriqa

    My own SaaS: a multi-tenant AI customer-support platform, live in production, built by the person who also pays its inference bill.

    Live in production

    • Next.js
    • TypeScript
    • PostgreSQL
  • Exception report, upload screen and style-guide admin of an AI tool that reviews financial statements for $0.24 each.

    AI audit reviewer

    A draft financial-statement package goes in; a categorised exception report comes back in about 90 seconds, at a measured $0.24-0.28 per review.

    • Python
    • FastAPI
    • Anthropic Claude

The offer this article leads to: AI accuracy and cost audit, typically $1.5k-$3k.

Tell me what you’re building and where it’s stuck.

I’ll tell you the cleanest path forward, including if it’s “don’t build that.”

Email only, on purpose: it reaches me, not a sales team.

Or write tocontact@alihassan.dev

Ali Hassan in a dark winter jacket, looking off to one side, standing in a stone courtyard with a minaret and cloudy sky behind him.