Last updated: · Applies to: Gemini 4 Hydrogen in Antigravity, Google AI Studio and the Gemini API

Gemini 4 Hydrogen for coding

Status as of 12 Nov 2026: Gemini 4 Hydrogen was released on November 12, 2026. Use gemini-4-hydrogen for fast coding and agentic tasks. Standard paid API pricing is $1.50 per 1M input tokens and $7.50 per 1M output tokens, including thinking. A rate-limited free tier is available in Google AI Studio and the Gemini API.

What is Gemini 4 Hydrogen?

Gemini 4 Hydrogen is Google’s fast, Flash-class Gemini 4 model for everyday coding and agentic execution, alongside Carbon and Argon for deeper planning and reasoning. It can work alone or execute tasks planned by those larger models. The model ID gemini-4-hydrogen is stable.

Google reports that Hydrogen finishes tasks 2.5x faster than Gemini 3.8 Flash at its default high thinking level. Google reports an Artificial Analysis Intelligence Index score of 51 at high versus Argon’s 50, reaching 54 at xhigh, and Terminal-Bench 4.1 scores of 57% versus 18.2% for 3.8 Flash. These are Google’s reported comparisons, not independent tests by this site.

The model specification lists a 1,048,576-token unified window shared by input, thinking and output. Synchronous output supports 65,536 tokens; long decode can reach up to 1,048,576 tokens within that shared budget. Longer outputs require background execution or client-side continuation. Inputs are text, image, video, audio and PDF; output is text. Knowledge cutoff and tokens per second: Not officially published.

How to use Gemini 4 Hydrogen for coding

Gemini 4 Hydrogen in Antigravity

Open the model selector below the conversation prompt and choose Gemini 4 Hydrogen. The thinking options are Low, Medium, High (default) and Extra. Extra maps to xhigh. The Antigravity model docs also document CLI model selection; list your available identifiers, then select Hydrogen’s Extra High setting with the documented model identifier or effort flag:

agy models
agy --model gemini-4-hydrogen-xhigh
agy --effort xhigh

The last command uses the documented alternative --effort xhigh flag after selecting Gemini 4 Hydrogen with /model. For automatic planning and execution, choose Orchestrator (Carbon) or Orchestrator (Argon). Carbon or Argon plans and reviews; Hydrogen implements and verifies. Orchestrator uses a fixed thinking configuration, so its thinking level cannot be adjusted. The docs list Carbon Orchestrator on Ultra, and Argon Orchestrator on Ultra and paid Pro, with eligible premium-device trials also listed for Argon.

Plan availability conflict, 12 Nov 2026: Google’s launch post and X announcement say Antigravity access is for paid Google AI Pro and Ultra subscribers. Antigravity’s model table lists Hydrogen for all plans, including Free and Google AI Plus, Pro, Ultra and Enterprise. Check your account’s model selector for actual availability.

Google AI Studio

Try Gemini 4 Hydrogen in Google AI Studio. The official guide confirms a free tier in AI Studio and the Gemini API. Start with a small coding task, inspect the result and run your own project checks before expanding its scope.

Gemini API: Python and REST

The following Python and REST examples are copied from the official thinking-level examples. They use the Interactions API and explicitly set generation_config.thinking_level to xhigh. Configure your environment’s GEMINI_API_KEY; $GEMINI_API_KEY below refers to that variable.

Python

from google import genai

client = genai.Client()

interaction = client.interactions.create(
    model="gemini-4-hydrogen",
    input="Audit this payment retry queue for race conditions and rewrite the lock acquisition logic.",
    generation_config={
        "thinking_level": "xhigh"
    }
)

print(interaction.output_text)

REST (curl)

curl "https://generativelanguage.googleapis.com/v1beta/interactions" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -H 'Content-Type: application/json' \
  -X POST \
  -d '{
    "model": "gemini-4-hydrogen",
    "input": "Audit this payment retry queue for race conditions and rewrite the lock acquisition logic.",
    "generation_config": {
      "thinking_level": "xhigh"
    }
  }'

Migrating from Gemini 3.8 Flash

The official migration checklist calls for these changes:

  • Change the model ID from gemini-3.8-flash to gemini-4-hydrogen.
  • Review thinking settings: Hydrogen defaults to high, while 3.8 Flash defaulted to medium. Hydrogen adds xhigh and rejects minimal.
  • Account for the unified input, thinking and output budget. Remove low hardcoded max_output_tokens caps or raise them to 65,536; this cap covers thinking plus output. For longer outputs, use background execution or continuation.
  • Remove explicit caching calls and cached_content request fields. Explicit caching is unsupported; implicit caching is enabled by default for prompts of at least 4,096 tokens.
  • Remove temperature, top_p and top_k: custom values are ignored.
  • Declare native tools or structured output schemas instead of prompting for raw-text JSON tool calls without declared tools. Preserve multi-turn state using previous_interaction_id; in client-managed GenerateContent histories, preserve prior turns and thought signatures unchanged.

Choosing among the four thinking levels

Start with high for complex coding. Google’s thinking-level guidance recommends testing all four levels with enough output budget, then choosing the lowest level that meets your quality bar.

Official Hydrogen thinking-level guidance
LevelToken use and speedWhen to use
lowFewest tokens; lowest latencyCost- and latency-sensitive chat and high-throughput processing; still capable on agentic tasks.
mediumLower token use; faster responsesInteractive coding, live UI prototyping, responsive chat and latency-sensitive tool calls.
high (default)Balance of intelligence and speedMost tasks, including complex coding, agentic execution, tool calling and multimodal knowledge work.
xhighMost tokens; deepest reasoningHard multi-step coding and agentic problems where high falls short; accept higher latency and token use.

Google cautions that xhigh can overthink simple prompts. In Antigravity, select Extra for xhigh; Orchestrator’s fixed configuration does not expose this control.

Gemini 4 Hydrogen API pricing and free tier

The official pricing page lists these paid rates in USD per 1M tokens. Output rates include thinking tokens. Standard pricing stays flat across the full unified context window.

Hydrogen paid API rates per 1M tokens (USD)
Service tierInputOutput, including thinkingCached input (implicit only)
Standard$1.50$7.50$0.075
Batch$0.75$3.75$0.0375
Flex$0.75$3.75$0.0375
Priority$2.70$13.50$0.135

Free tier: free of charge, but rate-limited. Per-model free-tier RPM/RPD figures are Not officially published in the docs; view your limits in AI Studio. Batch and Flex are not available on the free tier.

Implicit caching: prompts of at least 4,096 tokens qualify; cache hits receive a 95% discount on cached input tokens. Explicit caching is unsupported. Google counts and bills thinking tokens and, when grounding is used, internal tool system instructions and function declarations.

Google Search grounding: on the paid tier, 5,000 free search requests per month are shared across Gemini 3 and newer models, then $14 per 1,000 requests. Google’s pricing note says each individual search query is charged and one model request can generate multiple queries. Search grounding is unavailable on the free tier.

Gemini 4 Hydrogen vs GPT-6.1 Terra vs Gemini 3.8 Flash

These are published API specifications and prices as of 12 Nov 2026. Prices below are USD per 1M tokens. Terra’s listed base rates apply to requests with at most 272K input tokens; the long-context adjustment is explained below.

Official API specs and prices; context budgets differ by model
PropertyGemini 4 HydrogenGPT-6.1 TerraGemini 3.8 Flash
Model IDgemini-4-hydrogengpt-6.1-terragemini-3.8-flash
Standard input / output$1.50 / $7.50, flat$1.00 / $5.00 at ≤272K input$0.75 / $3.75 through Dec 31, 2026; $1.50 / $7.50 from Jan 1, 2027
Standard cached input$0.075; implicit only$0.05 at ≤272K input; cache writes cost extra$0.075 through Dec 31, 2026; $0.15 from Jan 1, 2027; storage billed separately
Batch input / output$0.75 / $3.75$0.50 / $2.50 at ≤272K input$0.375 / $1.875 through Dec 31, 2026; $0.75 / $3.75 from Jan 1, 2027
Context window / input limit1,048,576 unified input, thinking and output1,050,000 context; 922,000 maximum input1,048,576 input limit; separate output budget
Maximum output65,536 synchronous; up to 1,048,576 with long decode, within the unified budget128,00065,536
Thinking / effortlow, medium, high (default), xhigh; minimal rejectednone, low, medium (default), high, xhigh, maxlow, medium (default), high; minimal rejected
Free API tierFree of charge; rate-limitedNot officially publishedFree of charge
Knowledge cutoffNot officially publishedJun 01, 2026Not officially published
InputsText, image, video, audio, PDFText, imageText, image, video, audio, PDF
Output typeTextTextText

Terra long-context billing: above 272K input tokens, OpenAI applies 2x input/cache rates and 1.5x output rates to the full request. At Standard rates that is $1.00 × 2 = $2.00 input, $0.05 × 2 = $0.10 cached input, and $5.00 × 1.5 = $7.50 output per 1M tokens. Standard cache writes are $1.25 for 30-minute retention or $2.50 for 12-hour retention before long-context adjustments. Terra’s Flex rates match Batch at $0.50 / $2.50 for short context.

3.8 Flash cache storage: $0.50 per 1M tokens per hour through Dec 31, 2026, rising to $1.00 from Jan 1, 2027, in addition to the cached-input rate above. Its Flex input/output rates match its Batch rates.

Sources: Google’s Hydrogen specs, 3.8 Flash specs and API pricing; OpenAI’s Terra specs and API pricing.

Benchmark gap: an official head-to-head benchmark between Hydrogen and Terra is Not officially published by Google or OpenAI as of 12 Nov 2026. Google’s Hydrogen-versus-Argon and Hydrogen-versus-3.8-Flash results do not establish a Terra ranking.

Editorial take: Terra has lower listed Standard input/output rates at ≤272K input. Hydrogen offers flat full-window pricing, broader input modalities and a published free tier. Choose using your own coding evaluations and actual token use; unit prices alone do not predict task cost or quality.

FAQ

Is Gemini 4 Hydrogen free?

Yes. Google AI Studio and the Gemini API offer a free tier that is free of charge and rate-limited. Per-model RPM/RPD limits are Not officially published in the docs; check AI Studio. Google Search grounding is unavailable on the free tier.

What is the Gemini 4 Hydrogen model ID?

The stable Gemini API model ID is gemini-4-hydrogen. It defaults to high thinking and also supports low, medium and xhigh.

How much does the Gemini 4 Hydrogen API cost?

Standard paid pricing is $1.50 per 1M input tokens, $7.50 per 1M output tokens including thinking, and $0.075 per 1M cached input tokens. Pricing is flat across the full unified context window.

Is Gemini 4 Hydrogen in Antigravity?

Yes, but official plan information conflicts. Google’s launch post and X announcement say paid Google AI Pro and Ultra; Antigravity’s model docs list Hydrogen for all plans including Free. Check your account’s model selector.

Gemini 4 Hydrogen vs GPT-6.1 Terra: which is cheaper?

At Standard rates for requests with at most 272K input tokens, Terra has lower listed input/output prices: $1.00/$5.00 versus Hydrogen’s $1.50/$7.50 per 1M tokens. Above 272K input, Terra charges 2x input/cache and 1.5x output for the full request; Hydrogen stays flat. Actual cost depends on token use, thinking and caching.

Which thinking level should I use for coding?

Start at high for complex coding and agentic tasks. Use medium for interactive coding and live UI prototyping, low for cost- or latency-sensitive work, and xhigh for hard multi-step problems where high falls short. Antigravity labels xhigh as Extra.

Is there an official Hydrogen vs Terra benchmark?

An official head-to-head benchmark between Gemini 4 Hydrogen and GPT-6.1 Terra is Not officially published by Google or OpenAI as of 12 Nov 2026. Google’s Hydrogen comparisons with Argon and Gemini 3.8 Flash do not establish a Terra ranking.

See also the Qwen4-Max coding guide for QwenCloud API usage, Claude Code and Codex setup, pricing and common errors.

For OpenAI’s Astra and Sol models, see the GPT-6.2 Astra pricing and Codex guide, including the comparison with Claude Opus 5.5 and Qwen4-Max.

Compare published rates and specifications in the Gemini 4 Neon pricing and comparison guide.

Sources

Checked against Google and OpenAI official pages on 12 Nov 2026. Google’s ai.google.dev documentation URLs redirect to aistudio.google.com/docs. Specifications not found in official sources are marked “Not officially published”.

Unofficial guide, not affiliated with or endorsed by Google or OpenAI. Benchmark figures are attributed to Google; code examples are documentation excerpts and were not sent to a live API for this article.