· 6 min read
Gemini 4 Hydrogen: pricing, thinking levels and migration
Gemini 4 Hydrogen is Google's fast agentic model: $1.50/$7.50 pricing, a new xhigh thinking level, implicit caching and what changes from 3.8 Flash.

Gemini 4 Hydrogen is Google's new fast, lower-cost model for agentic and everyday coding work, released on 12 November 2026 under the API ID gemini-4-hydrogen. It costs $1.50 per million input tokens and $7.50 per million output tokens at a flat rate across a 1M-token context window, adds a new xhigh thinking level, and defaults to high. If you are moving from Gemini 3.8 Flash, the model string is only the first of several changes.
This post covers what the model is, how pricing and caching work, how the thinking levels behave, and what to change in existing code.
What is Gemini 4 Hydrogen?
Google positions Hydrogen as the "daily driver" in the Gemini 4 family. The larger Gemini 4 Carbon and Gemini 4 Argon models handle the heaviest reasoning; Hydrogen is meant for the high-volume execution work underneath: tool loops, coding agents, data and document tasks. Google does not label it Flash, but it is framed as the upgrade path for teams on Gemini 3.8 Flash, which is where it sits in practice.
The main specs, from Google's developer guide and model card:
- Context window: one shared window of 1,048,576 tokens covering input, thinking and output.
- Output: up to 65,536 tokens per synchronous request, and up to the rest of the window through background generation.
- Inputs: text, images, audio, video and PDFs.
- Knowledge cutoff: March 2026.
- Where it runs: the Gemini API (both
generateContentand the Interactions API), Google AI Studio, on free and paid tiers. It also rolls out in the Gemini app, Google Search, Sheets and Google Antigravity.
On speed, Google reports Hydrogen finishing tasks about 2.5 times faster than Gemini 3.8 Flash at its default setting. Treat vendor speed numbers as a starting point and measure on your own prompts.
How much does Gemini 4 Hydrogen cost?
Per million tokens on the paid tier:
| Item | Price |
|---|---|
| Input | $1.50 |
| Output (including thinking tokens) | $7.50 |
| Cached input (implicit caching) | $0.075 |
| Free tier | Free, rate-limited |
Two details matter for cost estimates.
First, there is no long-context surcharge. The same rate applies whether a prompt is 2k tokens or 900k. That makes budgeting simpler for agents that accumulate large histories.
Second, caching works differently. Implicit caching means the API detects a repeated prompt prefix and discounts it automatically, without you creating a cache object. On Hydrogen it is on by default for prompts of at least 4,096 tokens and takes 95% off cached input. Explicit caching, the cachedContents and caches.create route, is not supported. To get cache hits, keep stable content (system instructions, tool declarations, long documents) at the front of the prompt and put the changing part at the end. The same prefix discipline applies to GPT-6's prompt caching, even though the mechanism there is explicit.
Thinking tokens are billed as output, and so are tokens from tool system instructions and function declarations. A request that looks small can bill more than you expect at higher thinking levels.
How do thinking levels work on Gemini 4 Hydrogen?
Thinking level controls how much internal reasoning the model does before answering. Hydrogen accepts four values: low, medium, high and xhigh. The default is high, and the older minimal value is rejected with an error. For comparison, Carbon and Argon default to medium and stop at high.
You set it in generation_config:
from google import genai
client = genai.Client()
interaction = client.interactions.create(
model="gemini-4-hydrogen",
input="Find the slow query in this log and propose an index: ...",
generation_config={"thinking_level": "medium"},
)
print(interaction.output_text)
The REST shape is the same field inside the request body:
{
"model": "gemini-4-hydrogen",
"input": "Summarise the attached contract clauses.",
"generation_config": { "thinking_level": "high" }
}
Google's guidance is to start at high, keep xhigh for hard multi-step problems, and pick the lowest level that meets your quality bar. The model card also notes that Hydrogen can use more tokens than expected at higher levels, so run a small sweep of medium, high and xhigh against your own eval set before you settle on one. Claude uses a similar ladder with its effort setting, covered in the Claude Fable 5.2 migration notes.
max_output_tokens caps thinking and visible output together. If you set it low, the model can spend the whole allowance thinking and return little or no text.
How do you get outputs longer than 64K tokens?
A synchronous request stops at 65,536 tokens. For longer output, such as a full report or a large generated file, you run the request in the background: set background to true and raise max_output_tokens above 65,536. The ceiling is the full window minus your input tokens. If you leave max_output_tokens unset, the server still stops at 65,536.
A background request returns immediately with an interaction you poll until its status is no longer queued or in_progress. The shape looks like this:
import time
job = client.interactions.create(
model="gemini-4-hydrogen",
input="Write the full migration guide for this codebase: ...",
background=True,
max_output_tokens=262144,
generation_config={"thinking_level": "high"},
)
while job.status in ("queued", "in_progress"):
time.sleep(10)
job = client.interactions.get(job.id)
Use this only when you need the length. For normal agent turns, synchronous calls are simpler to reason about and retry.
What changes when you migrate from Gemini 3.8 Flash?
Google's migration section lists several changes. In order of how likely they are to bite:
- Model ID. Change
gemini-3.8-flashtogemini-4-hydrogen. - Sampling parameters. Remove
temperature,top_pandtop_k. In-range values are ignored; out-of-range values return HTTP 400. - Output caps. Gemini 3.8 Flash had separate input and output budgets. Hydrogen shares one window. Old hardcoded caps such as 8,192 output tokens now also have to cover thinking, so raise them or remove them.
- Thinking default. The default moves from
mediumtohigh, andminimalerrors. Expect higher latency and output token counts until you tune it. - Caching. Delete
cached_contentfields and rely on implicit caching. - Tool calls. Declare tools with native function calling or use structured outputs. Prompting the model to emit raw JSON tool calls with no tools declared can return
MALFORMED_FUNCTION_CALL. - Thought signatures. A thought signature is an opaque token the model attaches to its reasoning so it can pick up where it left off. If you manage history yourself with
generateContent, send signatures back unchanged, and never copy one signature onto several parallelfunctionCallparts. - Multi-turn on the Interactions API. Pass
previous_interaction_idinstead of resending the whole history.
Coming from Carbon or Argon is lighter: the request schema stays the same, and only the model ID and default thinking level change.
Key takeaways
- Gemini 4 Hydrogen (
gemini-4-hydrogen) costs $1.50 input and $7.50 output per million tokens, flat across a 1M window. - Thinking levels are
low,medium,high(default) and the newxhigh;minimalis rejected. - Caching is implicit only, with a 95% discount on repeated prefixes of 4,096+ tokens.
- Synchronous output tops out at 65,536 tokens; use
backgroundfor longer generations. - Migrating from 3.8 Flash means removing sampling parameters and explicit caching, and re-checking output caps.
FAQ
Is Gemini 4 Hydrogen free to try?
Yes. It is available on the free tier in Google AI Studio and the Gemini API, with rate limits. Paid usage is billed at $1.50 input and $7.50 output per million tokens.
Can I set temperature on Gemini 4 Hydrogen?
No. temperature, top_p and top_k are ignored when in range and rejected with a 400 when out of range. Steer behaviour through the prompt and the thinking level instead.
Does Gemini 4 Hydrogen support explicit context caching?
No. Only implicit caching is available. Keep stable content at the start of your prompts so repeated prefixes are discounted automatically.