APIMart
Back to all models

Gemini 4 Hydrogen API

GoogleModel ID gemini-4-hydrogenText modelReleased November 12, 2026

Use Gemini 4 Hydrogen to fix a test that just started failing, route a batch of tickets by your rules, or check that the numbers in a report match its charts.

Max input
1,048,576 tokens
Max output
65,536 tokens
Input → output
Text, Image, Audio, Video → Text
Knowledge cutoff
March 2026
  • Image input
  • Streaming
  • Cached input pricing
  • OpenAI SDK compatible

Gemini 4 Hydrogen API use cases

Each use case comes with an illustrative example: source material, a prompt and a hand-written sample answer, not actual model output. Copy the prompt, swap in your own material and try it on Gemini 4 Hydrogen.

Try Gemini 4 Hydrogen with your own material

Small fixes and debugging in a repo

Send the error, the failing test and the related files together, and have Gemini 4 Hydrogen find the direct cause and propose a fix that touches only the lines that need it. Run the tests again after the change.

Example: Why did this test suddenly fail?

Material

test_price.py
Expected format_price(1999) to return "$19.99", got "$1999.00".
price.py
format_price(cents) returns f"${cents:.2f}" directly.
Latest commit
Renamed the parameter from dollars to cents; the unit is now cents.

PromptExplain the direct cause of the failing test, give the smallest fix, and point out which callers need to change with it.

Sample answer · written by hand to show the reasoning

Now that the parameter is in cents, the function never divides by 100. Change it to f"${cents / 100:.2f}". Any caller still passing dollars has to switch to cents too, or amounts will come out 100 times too small.

About the Gemini 4 Hydrogen API

  • The fast executor in the Gemini 4 family

    Google positions Gemini 4 Hydrogen as the model that executes everyday coding and agent work, leaving deep reasoning to Gemini 4 Carbon and Argon. Use it alone or to run the many execution steps in a multi-model pipeline.

  • Four thinking levels, high by default

    Gemini 4 Hydrogen supports low, medium, high and xhigh, with high as the default. Coming from Gemini 3.8 Flash, set medium explicitly to keep the response speed you had.

  • Reads PDFs, spreadsheets, audio and video

    Input covers text, images, audio and video, and it reads PDFs and Office documents directly. The 1,048,576-token context is shared by input and output, and the knowledge cutoff is March 2026.

  • Gemini 4 Hydrogen API key and access

    You don’t need a separate Gemini 4 Hydrogen API key: one APIMart key works for every model. Requests go through an OpenAI Chat Completions-compatible endpoint with the model ID gemini-4-hydrogen.

Gemini 4 Hydrogen official benchmark results

Selected results Google published at launch.

  • Agents' Last Exam v1.1

    71.6%

    Multi-step professional workflows. Ahead of GPT-6.1 Terra (69.8%) and Claude Sonnet 5.5 (60.4%).

  • Terminal-Bench 4.1

    57.0%

    Coding tasks completed in a terminal. More than three times Gemini 3.8 Flash (18.2%); Claude Sonnet 5.5 scores 63.9%.

  • AutomationBench-AA

    76.1%

    Business process automation. Ahead of Claude Sonnet 5.5 (71.8%) and GPT-6.1 Terra (60.2%).

  • SWE-sweep

    13.5%

    Development tasks completed in a code repository. Claude Sonnet 5.5 scores 3.1% and GPT-6.1 Terra 5.8%.

  • HLE-Diamond

    58.8%

    Hard knowledge and reasoning questions. Ahead of Claude Sonnet 5.5 (53.3%) and GPT-6.1 Terra (47.3%).

  • Vending-Bench 2

    $14,549

    The model runs a simulated vending machine over a long period and is scored on its final balance. Claude Sonnet 5.5 ends at $11,165 and GPT-6.1 Terra at $9,107.

How to call the Gemini 4 Hydrogen API

To call Gemini 4 Hydrogen, you only need an APIMart API key and your existing OpenAI SDK, or send plain HTTP requests.

POST /v1/chat/completions
curl https://api.apimart.ai/v1/chat/completions \
  -H "Authorization: Bearer $APIMART_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gemini-4-hydrogen",
  "messages": [
    {
      "role": "user",
      "content": "Describe how to design a clear API in three sentences."
    }
  ],
  "stream": false
}'

Gemini 4 Hydrogen access details

Model IDgemini-4-hydrogen
Base URLhttps://api.apimart.ai/v1
Endpoint/chat/completions

Common parameters

model
Required
messages
Required
stream
Optional
max_tokens
Optional
temperature
Optional
All request parameters, response fields and error codes

Gemini 4 Hydrogen API request parameters

Gemini 4 Hydrogen uses the general chat endpoint, POST /v1/chat/completions, with a JSON body. model and messages are required; every other parameter is optional.

ParameterTypeRequiredDescription
modelstringYesModel ID. Use gemini-4-hydrogen for this model.
messagesarrayYesConversation messages. Each message has a role (system, user, or assistant) and content. Include earlier messages for multi-turn conversations.
streambooleanNoWhether to stream the output. true returns chunks over SSE, false returns the full response at once. Default: true.
temperaturenumberNoOutput randomness, 0–2. Default: 1.0. Lower values give more deterministic output.
top_pnumberNoNucleus sampling, 0–1. Default: 1.0. Adjust this or temperature, not both.
max_tokensintegerNoMaximum number of tokens to generate for the reply.
frequency_penaltynumberNoFrequency penalty, -2.0 to 2.0. Default: 0. Positive values reduce repeated wording.
presence_penaltynumberNoPresence penalty, -2.0 to 2.0. Default: 0. Positive values encourage new topics.
stopstring | arrayNoUp to 4 stop sequences. Generation stops when any of them appears.
nintegerNoNumber of replies to generate. Default: 1.

Response fields

The response contains the fields below. Token usage is returned in usage, which you can use to check costs.

FieldTypeDescription
idstringUnique identifier for the request.
modelstringThe model that handled the request.
choicesarrayList of replies. Each item contains message (role and content) and finish_reason.
usageobjectToken usage: prompt_tokens, completion_tokens, and total_tokens.

Error codes

Failed requests return an error object with code, message, and type.

StatusTypeMeaning
400invalid_request_errorInvalid request parameters.
401authentication_errorThe API key is invalid or missing.
402payment_requiredInsufficient account balance.
403permission_errorNo permission to access this resource.
429rate_limit_errorToo many requests. Retry later.
500server_errorInternal server error.
502bad_gatewayGateway error. The service is temporarily unavailable.

Gemini 4 Hydrogen API pricing

The Gemini 4 Hydrogen API is billed by token usage, and prices depend on your membership tier. Prices below are per million tokens; 1 US dollar = 10 credits.

ItemGoldCurrent pricePlatinumDiamondOfficial priceYou save
Input12Credits~$1.211.4Credits~$1.1410.8Credits~$1.0815Credits~$1.520%
Cached input0.6Credits~$0.060.57Credits~$0.0570.54Credits~$0.0540.75Credits~$0.07520%
Output60Credits~$657Credits~$5.754Credits~$5.475Credits~$7.520%

Prices are for reference only. View full pricing

Why call Gemini 4 Hydrogen API through APIMart

  • 20% below official pricing

    Gemini 4 Hydrogen API pricing is billed by token usage. Gold to Diamond member prices are 20%–28% below Google's official prices, and cached input costs just $0.06 per 1M tokens.

    See membership prices
  • One API key for 500+ models

    Gemini 4 Hydrogen, the rest of its family and 500+ models from GPT, Claude, Gemini and more share one API key and one account balance. Switching models is just a change to the model parameter.

  • Change two lines of existing code

    If you already use the OpenAI SDK, point base_url at https://api.apimart.ai/v1 and swap in your APIMart API key. Requests and responses keep the same format.

  • Try it online before you code

    Try Gemini 4 Hydrogen with your own material in the Playground, no code or setup needed, and integrate once you like the results.

    Open Playground

Which Google model should you choose?

Base prices per 1M tokens (USD). Your Gemini 4 Hydrogen API key works for every model in the table; just change the model parameter.

Differences between Google models
ComparisonGemini 4 Hydrogen CurrentGemini 4 Neon
Best forEveryday coding, Agentic tasks, Chat & questionsComplex coding, Long-running agents, Analytical reasoning
Input price$1.2$2.4
Output price$6$12

Gemini 4 Hydrogen FAQ

How is Gemini 4 Hydrogen different from Gemini 4 Argon and Carbon?

All three belong to Google’s Gemini 4 family. Hydrogen is the fast, low-cost model for everyday coding and agentic tasks, while Carbon and Argon target more complex reasoning. On APIMart they share one endpoint and API key, so you only change the model parameter. Gemini 4 Hydrogen pricing and the rates for the other two are on the pricing page.

When was Gemini 4 Hydrogen released?

Google released Gemini 4 Hydrogen on November 12, 2026. It is available on APIMart under the model ID gemini-4-hydrogen.

What changes when moving from Gemini 3.8 Flash to this model?

Google’s migration guidance recommends replacing gemini-3.8-flash with gemini-4-hydrogen. Note that the default thinking level changes from medium to high; set it to medium explicitly if you want to keep the old response speed. On APIMart the base_url and API key stay the same: change only the model parameter, then rerun your own prompts to check the output.

Which parameters cause errors with Gemini 4 Hydrogen?

According to Google’s developer guide, sending frequency_penalty or presence_penalty, or setting the thinking level to minimal, returns a 400 error, and temperature and top_p are ignored. To tune speed and cost, use the four thinking levels: low, medium, high and xhigh.

How can I try this model online?

Click Start chatting or Open Playground to visit the existing APIMart Playground. Select Gemini 4 Hydrogen in the text category to start exploring.

Which model ID does the Gemini 4 Hydrogen API use?

Set model to gemini-4-hydrogen. Copy the exact ID from the page heading or the integration details panel.

Is it compatible with the OpenAI SDK?

You can keep the OpenAI SDK. Set base_url to https://api.apimart.ai/v1, provide your APIMart API key, and use the model ID on this page.

What is the context window of Gemini 4 Hydrogen?

On APIMart, Gemini 4 Hydrogen accepts up to 1,048,576 input tokens per request. Your prompt, earlier messages, and file content all count toward it.

How many tokens can it output at once?

Gemini 4 Hydrogen can output up to 65,536 tokens in a single reply. Use the max_tokens parameter to set a lower limit.

How much does the Gemini 4 Hydrogen API cost?

The Gemini 4 Hydrogen API on APIMart is billed by token, and prices depend on your membership tier. Gold: $1.2 per million input tokens and $6 per million output tokens. Diamond: $1.08 per million input tokens and $5.4 per million output tokens. Prices may change; the pricing page has the current rates.

Does it support streaming?

Yes. The general chat endpoint streams over SSE by default. Set stream to false to receive the complete response at once.

How do I get an API key?

Sign in to APIMart and create a key on the API Keys page, then send it in the Authorization: Bearer header. The same key also works for other models on the platform.