Gemini API pricing:
what every model costs
Per-million-token prices for every Gemini model, how thinking tokens and cached input are billed, and what long-context requests do to the bill.
Gemini is the family with the biggest context windows and the widest range of prices: a small Flash model costs a fraction of a Pro model, and both read text, images, audio and video. That range makes the model you pick the main lever on your bill. This page lists what each Gemini model costs at Half Off Dev, how a Gemini response is billed, and where long inputs and thinking tokens quietly add up.
Every Gemini model and its price
Live prices, per million tokens. At Half Off Dev they are half of Google's list price.
| Model | Context | Input | Output | Cache read |
|---|---|---|---|---|
| Gemini 3.1 Pro gemini-3.1-pro | 1.05M | $1.00 | $6.00 | $0.10 |
| Gemini 3 Flash gemini-3-flash | 1.05M | $0.25 | $1.50 | $0.025 |
| Gemini 4 Argon gemini-4-argon | 1.05M | $1.00 | $5.00 | $0.10 |
| Gemini 3.5 Flash gemini-3.5-flash | 1.05M | $0.75 | $4.50 | $0.075 |
| Gemini 3.8 Flash gemini-3.8-flash | 1.05M | $0.38 | $1.88 | $0.0375 |
| Gemini 3.6 Flash gemini-3.6-flash | 1.05M | $0.38 | $1.88 | $0.0375 |
USD per 1M tokens, live from the catalog.
Each row opens the model's page with its context window. The same list is available as JSON at GET https://halfoff.dev/v1beta/models, no key required.
How a Gemini response is billed
The Gemini API reports usage in usageMetadata. The parts that matter:
| Billed part | Field | Price used |
|---|---|---|
| Uncached input | promptTokenCount minus cachedContentTokenCount | Input price |
| Cached input | cachedContentTokenCount | Cache-read price |
| Output | candidatesTokenCount plus thoughtsTokenCount | Output price |
Gemini caches repeated prompt prefixes by itself and has no cache-write charge. Explicit context caching through the cachedContents API is not offered here, so structure prompts with the stable content first and let the implicit cache do the work.
Thinking tokens are output tokens
Gemini's thinking models reason before they answer, and those thoughts are billed as output through thoughtsTokenCount, whether or not you ask for the thought summaries. You set the budget with thinkingConfig in generationConfig. For classification, extraction and short answers, a small or zero thinking budget on a Flash model is usually all the quality you need at a fraction of the cost. Gemini API guide shows the request.
Long context: where the money goes
A Gemini request can carry a million tokens, and every one of them is an input token. The price of a long request is its length times the input price, every time you send it. Three habits keep that in check:
- Keep the big document first and identical so repeats hit the implicit cache and bill at the cache-read price.
- Retrieve, don't dump. Sending only the relevant sections is cheaper than a full document even at Flash prices.
- Check
promptTokenCounton the first calls. Images, audio and video are tokenized, and a short clip or a high-resolution image is more tokens than most people expect.POST /v1beta/models/{model}:countTokenstells you before you send.
Worked example: summarizing documents
A pipeline summarizes 2,000 documents a month, each 20,000 tokens long, writing a 500-token summary. That is 40 million input tokens and 1 million output tokens (plus thinking, if enabled). Price it as 40 × input price + 1 × output price on a Flash model and again on a Pro model: the cost calculator shows both at once. For summarization, a Flash model with thinking turned down is normally the right first test.
Frequently asked questions
How much does the Gemini API cost?+
You pay per token, with a different price for each model. The table above has every current price per million tokens. Flash models are the low end; Pro models cost several times more.
Are Gemini thinking tokens charged?+
Yes, as output tokens. They are reported in thoughtsTokenCount and added to candidatesTokenCount. Reduce the thinking budget in thinkingConfig to reduce them.
Does the Gemini API have prompt caching?+
Implicit caching applies to repeated prefixes and cached tokens are billed at the lower cache-read rate. There is no cache-write fee. Explicit cachedContents are not supported here.
Is there a free Gemini API tier here?+
Half Off Dev is prepaid with no subscription and no free tier, but every Gemini model is half of Google's list price. Your first top-up is matched up to $5.
Can I use the OpenAI SDK with Gemini models?+
Yes. Chat Completions accepts every text model, so model="gemini-3.1-pro" works through an OpenAI client. For Gemini-only options such as thinkingConfig, call the native Gemini endpoint instead. The OpenAI SDK guide explains the trade-off.
Next: compare with Claude API pricing and GPT API pricing, browse the model list, or sign up and follow the quickstart.