Gemini API pricing
Google bills the Gemini API per 1M tokens of input, cached input and output, and thinking tokens count as output [1]. Google lists the 10 current Gemini models at $0.10 to $4.00 per 1M input tokens and $0.40 to $20.00 per 1M output tokens on its paid tier. [1] One Straitly key calls the 9 Gemini models linked in the table at https://api.straitly.ai/v1 [8]. Straitly charges 8 of the 9 Gemini models linked in the table at least 40% below Google's list price, input and output, with no subscription. [1][8]
Updated
40%
Are Gemini API prices changing?
Yes. Google has dated rises, an ended promotion and retired models that now route to newer ones [1][2].
| Model | What changes | When |
|---|---|---|
| Gemini 3.8 Flash and Gemini 3.6 Flash | Rises to $1.50 / $7.50 per 1M input / output tokens | 1 Jan 2027 |
| Gemini 4 Carbon | Moved from the $2.00 / $10.00 promotional rate to $4.00 / $20.00 | 1 Dec 2026 |
| Gemini 4 Argon | Moved from the $2.00 / $10.00 promotional rate to $4.00 / $20.00 | 1 Dec 2026 |
| Gemini 4 Argon | Deprecated; API calls route to Gemini 4 Carbon at Gemini 4 Carbon rates | 15 December 2026 |
| Gemini 3.7 Flash | Retired; API calls route to Gemini 3.8 Flash | In effect |
| Gemini 3.5 Flash | Retired; API calls route to Gemini 3.6 Flash | In effect |
| Gemini 2.5 Flash | Retired; API calls route to Gemini 3.5 Flash Lite at Gemini 3.5 Flash Lite rates | 1 December 2026 |
| Gemini 2.5 Pro | Retired; API calls route to Gemini 3.8 Flash at Gemini 3.8 Flash rates | 1 December 2026 |
How do I get a Gemini API key?
From Google AI Studio, or as a Straitly key that calls Gemini and every other Straitly model. Either way the OpenAI SDK works with a base URL and key change [6][10].
| Step | Google Gemini API | Straitly |
|---|---|---|
| Get a key | Create a key in Google AI Studio at aistudio.google.com/api-keys [1][5] | Sign up, add prepaid credits [11], then create a key on the API keys page [9] |
| Environment variable | GEMINI_API_KEY or GOOGLE_API_KEY [5] | STRAITLY_API_KEY |
| OpenAI SDK base URL | https://generativelanguage.googleapis.com/v1beta/openai/ [6] | https://api.straitly.ai/v1 |
| Request format | Gemini API, plus an OpenAI-compatible endpoint [6] | OpenAI Chat Completions and Anthropic Messages [10] |
| Models on one key | Google's own models | All 118 on /models [8] |
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.straitly.ai/v1",
api_key=os.environ["STRAITLY_API_KEY"],
)
reply = client.chat.completions.create(
model="gemini-4-hydrogen",
messages=[{"role": "user",
"content": "Hello"}],
)Questions people ask about Gemini API pricing
Ask a question- Google lists the 10 current Gemini models at $0.10 to $4.00 per 1M input tokens and $0.40 to $20.00 per 1M output tokens on its paid tier. Cached input, Batch, Priority, long prompts and Search grounding change the bill. List prices are from Google's pricing page, matched on 24 November 2026 and checked again on 2 December 2026. [1][7]
- Partly. Google's free tier covers 7 of the 10 current Gemini models in the table (Gemini 4 Hydrogen, Gemini 3.8 Flash, Gemini 3.5 Flash Lite, Gemini 3.6 Flash, Gemini 3.1 Flash Lite Preview, Gemini 3 Flash Preview and Gemini 2.5 Flash Lite), with lower rate limits; Gemini 4 Carbon, Gemini 4 Argon and Gemini 3.1 Pro Preview are paid only. Google's pricing page says free-tier content is "used to improve our products" and paid-tier content is not. [1]
- Google bills cached input at its context caching price, a fraction of fresh input; its caching page says cache hits "cost 95% less on Gemini 4 models and up to 90% less on Gemini 3 and 2.5 models." Gemini 4 models support implicit caching only, a request needs at least 4,096 input tokens on Gemini 4 and Gemini 3 models, and an entry lives up to 24 hours. [1][4]
- On Google, create a key in Google AI Studio (aistudio.google.com/api-keys) and set it as GEMINI_API_KEY; if GOOGLE_API_KEY is also set, it takes precedence. On Straitly, create a Straitly key, set the base URL to https://api.straitly.ai/v1 and use the model id gemini-4-hydrogen. The same Straitly key calls all 118 Straitly models. [5][9]
- No. Zero data retention (ZDR) is the default on every Straitly account, on every key. Prompts and completions are never written to disk or logs, and never used to train models. Straitly keeps only the metadata needed for billing and the Activity page: timestamp, model, provider, and the key that made the request; token counts per bucket; latency, status code, and the amount charged. None of these fields contain prompt or completion text. [12] See data retention.
Sources
Last updated 2 December 2026. Prices change. If something here is out of date, tell us at straitly.ai/contact.
- [1]Gemini Developer API pricing
- [2]Gemini deprecations
- [3]Batch API
- [4]Context caching
- [5]Using Gemini API keys
- [6]OpenAI compatibility
- [7]Straitly model catalog
- [8]Straitly models
- [9]Quickstart
- [10]Endpoints
- [11]Pricing
- [12]Data retention
How this page was checked
The 10 Gemini models in the table are from Straitly's catalog, read on 2 December 2026. List prices are the ones matched on Google's pricing page on 24 November 2026; that page, the deprecations page, and the Batch, caching, OpenAI compatibility and API key pages were read again on 2 December 2026. Cached input is Google's context caching price for prompts in the first price tier. Release months are from Google's model pages, else from Straitly's catalog. Batch and Priority figures are Google's per-model tables, which apply the same 50% and 1.8x to every model listed here.
Call Gemini 4 Hydrogen on Straitly.
One OpenAI-compatible key for the Gemini models above and the rest of the 118.