Skip to main content
Google

Gemini 4 Hydrogen API

Google

Gemini 4 Hydrogen is part of the Gemini model familyView all Gemini models

The fast Gemini 4 model from Google for everyday coding and agent work, 2.5x faster than Gemini 3.8 Flash, with a 1M-token context window and four reasoning effort levels.

google/gemini-4-hydrogen

Documentation

Conversation

Start a conversation

The fast Gemini 4 model from Google for everyday coding and agent work, 2.5x faster than Gemini 3.8 Flash, with a 1M-token context window and four reasoning effort levels.

Enter to send · Shift+Enter for a new line

UnificAlly doesn't store your LLM prompts and replies. We only keep token usage information for billing purposes.

Uses POST /v1/chat/completions with your UnificAlly API key. Supports system and user prompts, tools, streaming, and thinking when available.

Updated

What is the Gemini 4 Hydrogen API?

The Gemini 4 Hydrogen API is live on UnificAlly as google/gemini-4-hydrogen, from $0.45/1M tokens of input and $2.25/1M tokens of output. Gemini 4 Hydrogen is Google's fast Gemini 4 model for everyday coding and agent work, released November 12, 2026. It is the third model in the Gemini 4 family, after Gemini 4 Argon and Gemini 4 Carbon, and the first with an xhigh reasoning level. Input and output share one 1M-token window, and one response returns up to 64K tokens. It runs on UnificAlly as google/gemini-4-hydrogen, with text and image input and four reasoning effort levels (low, medium, high, xhigh).

Gemini 4 Hydrogen API at a glance

Model IDgoogle/gemini-4-hydrogen
EndpointPOST https://direct-api.unifically.com/v1/chat/completions
Request typesChat, streaming, image input
InputText and images
OutputText, up to 64K tokens per response
Context window1M tokens, shared by input and output
Reasoning effortlow, medium, high, xhigh
Image inputAn image_url content part with a direct https link or a data:image/...;base64 URI, up to 14 MB per link
Input rate$0.45/1M tokens
Output rate$2.25/1M tokens
Cache read rate$0.0225/1M tokens

The Gemini 4 Hydrogen API bills per token, with no subscription. Thinking tokens are billed as output tokens. The Gemini API pricing guide covers the rates for every Gemini model.

How to use the Gemini 4 Hydrogen API

  1. Create an API key on the API keys page. The same key and balance work for every model on UnificAlly.
  2. Send a POST request to /v1/chat/completions on https://direct-api.unifically.com with the model ID and a messages array. This is the OpenAI-compatible endpoint shared by every language model on UnificAlly.
  3. Read the reply from choices[0].message.content in the same response, or from the stream when stream is true. There is no task to check.
curl -X POST https://direct-api.unifically.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "google/gemini-4-hydrogen",
    "reasoning_effort": "high",
    "stream": true,
    "messages": [
      {"role": "user", "content": "Find the bug in this function, explain it in two sentences, and write the fix."}
    ]
  }'

Tokens arrive as they generate. The stream is sent as server-sent events and ends with data: [DONE]. Lower reasoning_effort to low for quick steps, and raise it to xhigh for the hardest ones. A reply at xhigh can take a minute or more to start, so stream it and give your client timeout some headroom. Send requests to direct-api.unifically.com so long replies are not cut short by a proxy timeout.

Without stream, the response comes back synchronously with the completion and the token usage:

{
  "id": "3f8e2a1c-7b4d-4e9a-9c2f-5d1e8b7a6c40",
  "object": "chat.completion",
  "created": 1710000000,
  "model": "google/gemini-4-hydrogen",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "The loop stops one item early, so the last element is never checked..."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 28,
    "completion_tokens": 64,
    "total_tokens": 92,
    "prompt_tokens_details": {
      "cached_tokens": 0
    },
    "completion_tokens_details": {
      "reasoning_tokens": 0
    }
  }
}

Gemini 4 Hydrogen API parameters

ParameterTypeDefaultWhat it does
modelstringrequiredModel identifier, google/gemini-4-hydrogen
messagesarrayrequiredNon-empty array of message objects with role and content (a string or an array of content parts). Roles: system, developer, user, assistant, tool, function
streambooleanfalseIf true, the response is streamed using server-sent events
stream_optionsobjectnoneSet { "include_usage": true } to get a final chunk with token usage. Only used when stream is true
temperaturenumbernoneSampling temperature between 0 and 2. Higher values produce more random output
max_tokensintegernoneMaximum number of tokens to generate in the completion
max_completion_tokensintegernoneAccepted as an alias for max_tokens
reasoning_effortstringnoneHow much the model reasons before answering: low, medium, high, or xhigh
top_pnumbernoneNucleus sampling parameter. Alternative to temperature
stopstring or arraynoneUp to four sequences where the model stops generating further tokens
toolsarraynoneList of tools the model may call. Each tool needs a type and a function definition
tool_choicestring or objectnoneControls which tool, if any, is called: none, auto, required, or a specific tool
response_formatobjectnoneSet { "type": "json_object" } to enable JSON mode when the model supports it

The Gemini 4 Hydrogen API documentation has the full reference.

Image input request

Send an image in an image_url content part alongside your text, either as a direct https link or inline as a base64 data URI. The link must point straight at the image file, with no redirect. Images are counted as input tokens.

curl -X POST https://direct-api.unifically.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "google/gemini-4-hydrogen",
    "messages": [
      {"role": "user", "content": [
        {"type": "text", "text": "Read every number in this chart and return them as a JSON table."},
        {"type": "image_url", "image_url": {"url": "https://example.com/chart.png"}}
      ]}
    ]
  }'

Gemini 4 Hydrogen key features

2.5x faster than Gemini 3.8 Flash

At the default high setting it finishes tasks 2.5x faster than Gemini 3.8 Flash in Google's tests. Artificial Analysis measures about 170 output tokens per second at every effort level.

Four reasoning effort levels

The Artificial Analysis Intelligence Index v5.0.1 reads 27 at low, 41 at medium, 51 at high, and 54 at xhigh. The top level ranks 16 of 80 models and sits above Gemini 4 Argon at 50.

#1 on Tax Agent Bench

Vals AI ranks it first of 85 models on Tax Agent Bench at 52.3% and second of 40 on the Vals Finance Index at 66.1%. On the Vals Index it reaches 68.5%, sixth of 37 models.

Terminal and coding agents

Google reports 57% on Terminal-Bench 4.1, up from 18.2% for Gemini 3.8 Flash. The Vals AI run of Terminal-Bench 4.0 lands at 54.0%, and Vibe Code Bench v1.1 at 87.8%.

What Gemini 4 Hydrogen is best for

  • Everyday coding agents

    57% on Terminal-Bench 4.1 and 87.8% on Vibe Code Bench v1.1 at a speed that keeps long loops moving.

  • High-volume agent steps

    About 170 output tokens per second, with low and medium effort for the cheap steps.

  • Tax and finance analysis

    #1 on Tax Agent Bench at 52.3% and #2 on the Vals Finance Index at 66.1%.

  • Hard reasoning on demand

    54 on the Artificial Analysis Intelligence Index when a step needs xhigh.

  • Whole-codebase context

    A 1M-token window with up to 64K tokens out in one response.

  • Charts and screenshots

    Image input for reading diagrams, tables, and UI screenshots alongside text.

Gemini 4 Hydrogen use cases

Make it the default model in a coding agent. It reads the repo, runs the tests, and fixes the failure without the wait of a larger model. Run worker and verifier agents on it while a stronger model plans the job. Build tax and finance pipelines that read filings and check the numbers against each other. Send it a chart or a screenshot and ask for the data as JSON. Keep low or medium effort for classification and extraction, and raise a single step to xhigh when it gets stuck.

Gemini 4 Hydrogen limitations

xhigh is slow and it writes a lot. Artificial Analysis measures about 43 seconds before the first answer token at xhigh, against 18 seconds at high. It used 304M output tokens to finish the Intelligence Index at xhigh and 110M at high. Thinking tokens bill as output, so the top level costs far more per task than the per-token rate suggests.

It is not the strongest Gemini 4 model. Gemini 4 Carbon scores 60 on the Artificial Analysis Intelligence Index, 70.5% on the Vals Index, and 63.1% on Terminal-Bench 4.0, against 54, 68.5%, and 54.0% here.

Images go in as direct https links or inline base64 data URIs, and a link that redirects is refused. Video and audio input are not available on this model yet, and one response tops out at 64K tokens.

Gemini 4 Hydrogen vs Gemini 4 Carbon

Carbon is the stronger reasoner and Hydrogen is the faster worker. Carbon leads the Artificial Analysis Intelligence Index 60 to 54, the Vals Index 70.5% to 68.5%, and Terminal-Bench 4.0 63.1% to 54.0%. Hydrogen writes about 170 tokens per second against about 80 for Carbon, starts answering sooner, and edges Carbon on Tax Agent Bench, 52.3% to 51.8%. Hydrogen also has the xhigh level that Carbon lacks.

Gemini 4 Hydrogen vs Gemini 3.8 Flash

Hydrogen replaces Gemini 3.8 Flash for agent work. It finishes tasks 2.5x faster at the default setting, and Terminal-Bench 4.1 goes from 18.2% to 57%. Both share the 1M-token window. Move agent loops over first, since that is where the gap is widest.

When to use Gemini 4 Hydrogen

Use Gemini 4 Hydrogen as the everyday model: coding agents, tool-calling loops, extraction, and document analysis where speed counts. Step up to Gemini 4 Carbon when the task is long, the answer has to be right, and waiting is fine. Try xhigh on a hard step before you switch models.

FAQs

People also ask about Gemini 4 Hydrogen

google/gemini-4-hydrogen, called through the OpenAI-compatible POST /v1/chat/completions endpoint with your UnificAlly API key.

Sign up on UnificAlly and create a key on the API keys page. One key and one balance cover Gemini 4 Hydrogen and every other model, with no subscription.

Send a POST request to https://direct-api.unifically.com/v1/chat/completions with the model ID google/gemini-4-hydrogen and a messages array. The reply comes back in the same response, in the OpenAI chat completion format. Set "stream": true to receive it as it is written.

Text and image input, with text output. Send images as direct https links or inline as base64 data URIs. Input and output share one 1M-token window, and a single chat completion returns up to 64K output tokens.

Four. reasoning_effort takes low, medium, high, and xhigh, and high is the default. Thinking tokens are billed as output tokens.

It scores 54 on the Artificial Analysis Intelligence Index v5.0.1 at xhigh, rank 16 of 80, and 51 at high. On Vals AI it reaches 68.5% on the Vals Index, rank 6 of 37, and it is #1 on Tax Agent Bench at 52.3%. Google reports 57% on Terminal-Bench 4.1 and 58.8% on HLE-Diamond.

Yes, for coding and agent work. Google measures it finishing tasks 2.5x faster at the default high setting, and Terminal-Bench 4.1 rises from 18.2% to 57%.

Artificial Analysis measures about 170 output tokens per second. The first answer token arrives after about 6 seconds at low, 18 seconds at high, and 43 seconds at xhigh, so stream long replies.

Google released it on November 12, 2026. It is the third model in the Gemini 4 family, after Gemini 4 Argon and Gemini 4 Carbon.

Gemini 4 Hydrogen guides and comparisons

Review pricing, limits, and tested outputs before running this model.