New video: Give AI Its Own Computer: 8 Tools For Freelancers →
Muddaser

Gemini 4 Hydrogen API: Pricing, Model ID & Migration Guide

Direct answer: Gemini 4 Hydrogen is available now in Google AI Studio and the Gemini API under the model ID gemini-4-hydrogen. It has a rate-limited free API tier; paid usage costs $1.50 per 1 million input tokens and $7.50 per 1 million output tokens, including thinking tokens. It supports a unified 1,048,576-token context window, four thinking levels, multimodal input and outputs longer than 64K through background execution or continuation.[1][2]

If you are moving from Gemini 3.8 Flash, start by changing the model ID, removing unsupported sampling parameters and explicit caching, and testing medium versus the default high thinking level. Do not send production traffic until your own evaluation set confirms quality, latency and cost.

Gemini 4 Hydrogen quick reference

Item Confirmed detail
Release date November 12, 2026
API model ID gemini-4-hydrogen
API access Free and paid tiers
Paid input price $1.50 per 1M tokens
Paid output price $7.50 per 1M tokens, including thinking
Cached input $0.075 per 1M tokens on eligible implicit-cache hits
Context window 1,048,576 tokens shared by input, thinking and output
Synchronous output Up to 65,536 tokens per hop
Thinking levels low, medium, high (default), xhigh
Inputs Text, images, audio, video and documents
Best fit Everyday coding, tool-using agents, multimodal documents and parallel workers

Google positions Hydrogen as the fast execution model in the Gemini 4 family. Carbon is intended for the hardest reasoning and verification work, while Argon covers advanced long-horizon tasks with lower token use than Carbon. Hydrogen is the practical daily driver when responsiveness and throughput matter.[1][2]

Python quickstart

Install or upgrade the Google Gen AI SDK:

pip install --upgrade google-genai

Set GEMINI_API_KEY in your environment, then send a request through the Interactions API:

from google import genai

client = genai.Client()

interaction = client.interactions.create(
    model="gemini-4-hydrogen",
    input=(
        "Review this function for edge cases. Return: "
        "1) findings, 2) a minimal patch, and 3) tests."
    ),
    generation_config={
        "thinking_level": "high",
        "max_output_tokens": 65536,
    },
)

print(interaction.output_text)
print(interaction.usage)

Google’s official quickstart uses the same stable model ID. The default thinking level is high; the normal synchronous output limit is 65,536 tokens.[2]

A lower-cost interactive configuration

Use medium when a task needs useful reasoning but must remain responsive:

interaction = client.interactions.create(
    model="gemini-4-hydrogen",
    input="Add input validation and focused unit tests to this endpoint.",
    generation_config={
        "thinking_level": "medium",
        "max_output_tokens": 32768,
    },
)

The safest production rule is to choose the lowest thinking level that passes your evaluation set. A higher setting can increase latency and output-token spend without improving a simple task.

What each thinking level is for

low

Choose low for fast chat, high-throughput processing, routing and simple tool calls. It uses the fewest thinking tokens and usually gives the lowest latency.

medium

Choose medium for interactive coding, live prototypes and responsive agents. It is a useful first test when the default high setting spends too much time or budget.

high — default

Choose high for multi-file coding, tool use, multimodal analysis and agentic workflows where a missed edge case matters. This is Google’s default for Hydrogen.[2]

xhigh

Reserve xhigh for difficult, multi-step work that fails at high. It spends the most reasoning tokens, can be slower and may overthink straightforward prompts. Do not make it the default merely because it is the highest setting.[2]

Gemini 4 Hydrogen pricing with worked examples

Paid standard pricing is flat across the full context window: $1.50 per million input tokens and $7.50 per million output tokens. Thinking tokens are included in billed output. Eligible implicit-cache hits cost $0.075 per million input tokens.[2]

Use this estimate before adding separately billed tools:

estimated cost = (input tokens / 1,000,000 × $1.50)
               + (output and thinking tokens / 1,000,000 × $7.50)

Example 1: small coding request

For 20,000 input tokens and 5,000 billed output tokens:

  • Input: 20,000 / 1,000,000 × $1.50 = $0.03
  • Output: 5,000 / 1,000,000 × $7.50 = $0.0375
  • Estimated token cost: $0.0675

Example 2: repository task

For 200,000 input tokens and 40,000 billed output tokens:

  • Input: 200,000 / 1,000,000 × $1.50 = $0.30
  • Output: 40,000 / 1,000,000 × $7.50 = $0.30
  • Estimated token cost: $0.60

These are arithmetic examples, not quotes for a finished project. Retries, longer reasoning, grounding queries and other tools can change the final charge. Log actual usage and accepted task outcomes rather than comparing models only by their listed token rates.

Hydrogen vs Carbon vs Argon

Model Use it when Avoid using it when
Hydrogen You need fast coding, interactive agents, document workflows or parallel workers A cheaper lightweight classifier is enough, or the task repeatedly fails at xhigh
Argon You need advanced long-horizon reasoning without Carbon’s deeper per-turn exploration Hydrogen already meets the quality bar at lower cost and latency
Carbon The cost of a wrong answer is high and the task needs deep architecture, debugging, science or security review The task is routine execution, chat or high-volume processing

All three share Gemini 4’s unified 1M-token context architecture and built-in tools. Hydrogen adds xhigh, defaults to high, and is priced below the current listed per-token rate for Carbon and Argon.[2]

A practical multi-model pattern is:

  1. Give Carbon the difficult planning, architecture or root-cause investigation.
  2. Give Hydrogen scoped implementation, test execution and parallel verification.
  3. Return failures to Carbon only when Hydrogen cannot resolve them.
  4. Measure total accepted-task cost, not the price of the first prompt.

Google introduced an Orchestrator in Antigravity that can switch between Carbon and Hydrogen within a session. Google reports that this setup approached Carbon’s task-success rate in its cited test while using less quota and finishing faster; treat those as provider-reported results until your own workload reproduces them.[1]

Migration checklist from Gemini 3.8 Flash

1. Change the model ID

Replace:

model="gemini-3.8-flash"

with:

model="gemini-4-hydrogen"

2. Rework token assumptions

Gemini 3.8 Flash separates its input and output budgets. Hydrogen shares 1,048,576 tokens across input, thinking and output. A large prompt therefore leaves less room for reasoning and the visible answer.[2]

Remove old 8K-style output caps or test a higher limit. The ordinary synchronous cap is 65,536 tokens.

3. Set the thinking level explicitly

Hydrogen defaults to high, not medium. Test medium and high against the same tasks, then record:

  • accepted versus rejected outputs
  • end-to-end latency
  • input and output tokens
  • tool-call failures
  • retries and human corrections

The old minimal level is not supported and returns an error.[2]

4. Remove explicit context caching

Hydrogen does not support explicit cachedContents or caches.create calls. Remove cached_content from requests. Implicit caching runs automatically on qualifying prompts of at least 4,096 tokens, and an eligible cache hit receives the listed discount.[2]

5. Remove ignored sampling controls

Remove custom temperature, top_p and top_k values. The Hydrogen API ignores custom values for those fields.[2]

6. Use native tools and structured output

Declare functions through the API’s function-calling interface. If you need JSON, provide a structured-output schema instead of asking for an improvised raw-text tool call. This reduces malformed function-call failures.[2]

7. Preserve multi-turn state

Use previous_interaction_id with the Interactions API. If your application manages generateContent history itself, preserve prior model turns and thought signatures exactly as documented.[2]

8. Load test before cutover

Run a shadow comparison with real, non-sensitive tasks. Check quality, p50/p95 latency, usage, tool-call accuracy and cost per accepted result. Keep the old model available for rollback until Hydrogen passes the agreed thresholds.

How to generate more than 64K tokens

Hydrogen can continue beyond a 65,536-token synchronous hop through background execution or client-side continuation. The combined input, thinking and output still cannot exceed the unified context window.[2]

import time
from google import genai

client = genai.Client()

job = client.interactions.create(
    model="gemini-4-hydrogen",
    input="Create a complete migration plan, implementation guide and test suite.",
    background=True,
    generation_config={
        "thinking_level": "high",
        "max_output_tokens": 131072,
    },
)

while job.status in ("queued", "in_progress"):
    time.sleep(5)
    job = client.interactions.get(id=job.id)

text = "".join(
    part.text
    for step in job.steps
    if step.type == "model_output"
    for part in step.content
    if part.type == "text"
)

print(job.status)
print(text)

If background=True is set without raising max_output_tokens, the server still stops after 65,536 tokens. Set a hard ceiling to control spend, and use asynchronous jobs only where the user experience can tolerate waiting.[2]

Where consumers can use Hydrogen

Google says Hydrogen is rolling out globally in the Gemini app, Google Search, Gemini for business and eligible Google Sheets experiences. Free Gemini app users receive Hydrogen through automatic model selection when Google considers it appropriate; that does not mean every free-user prompt is manually selectable as Hydrogen.[1]

Google Search is also using Hydrogen globally to interpret multi-part questions, fan out across subtopics and produce more structured visual responses and links.[4]

Production rollout checklist

  • [ ] Confirm gemini-4-hydrogen is enabled in the intended project and region.
  • [ ] Keep API keys in a secret manager, not source code.
  • [ ] Test medium and high; reserve xhigh for demonstrated failures.
  • [ ] Set timeouts, retries and a maximum output-token budget.
  • [ ] Validate tool arguments before execution.
  • [ ] Require approval for destructive, financial or external actions.
  • [ ] Log usage, latency, failures and accepted outcomes.
  • [ ] Redact sensitive data before sending it to a model.
  • [ ] Keep a fallback model and rollback path during migration.
  • [ ] Recheck live pricing and rate limits before forecasting spend.

Gemini 4 Hydrogen is a strong migration candidate for teams that used Gemini 3.8 Flash as a daily coding or agentic model. Its real value depends on whether it completes your workload with fewer retries and acceptable latency—not on launch benchmarks alone. Google’s developer announcement emphasizes repository coding, debugging, interactive web work and multimodal workflows, but production adoption should still be gated by your own tests.[3]

FAQ

Is Gemini 4 Hydrogen available now?

Yes. Google released it on November 12, 2026 across Google AI Studio, the Gemini API and several consumer and enterprise surfaces.[1][2]

What is the Gemini 4 Hydrogen model ID?

The official API model ID is gemini-4-hydrogen.[2]

Is there a free API tier?

Yes. Google documents a rate-limited free tier for Hydrogen in Google AI Studio and the Gemini API. Current limits can vary, so check the live rate-limits page for your project.[2]

How much does the API cost?

Paid standard usage is $1.50 per million input tokens and $7.50 per million output tokens. Output billing includes thinking tokens; eligible implicit-cache input is listed at $0.075 per million tokens.[2]

What is the default thinking level?

high is the default. Hydrogen also supports low, medium and xhigh.[2]

Does Hydrogen replace Gemini 4 Carbon?

No. Hydrogen is optimized for speed and efficient execution. Carbon remains Google’s deepest Gemini 4 model for difficult architecture, debugging, science and security work.[1][2]

Can Hydrogen analyze images, audio and video?

Yes. Google documents multimodal support including images, audio, video and dense documents.[1][2]

Can it output one million tokens in a normal request?

Not in one ordinary synchronous hop. The standard synchronous limit is 65,536 tokens; longer output requires background execution or continuation, and the total still shares the 1,048,576-token window with input and thinking.[2]

Sources

  1. Introducing Gemini 4 Hydrogen
  2. Gemini 4 Hydrogen API documentation
  3. Build with Gemini 4 Hydrogen
  4. Gemini 4 Hydrogen in Search


Leave a Comment