Introduction
Send messages in the OpenAI chat format and read back text, tool calls or schema-shaped JSON. Thinking level, reply length and stop sequences are all optional.
| Field | Value |
|---|---|
| Input | Text |
| Output | Text |
| Shared context | 1,048,576 tokens |
| max_tokens ceiling | 65,536 |
| Inputs | text / images |
Key features & highlights
Sized for the daily loop
Google positions Hydrogen for repository edits, debugging and agent steps that run many times a day, where a quick answer matters more than the deepest possible search.
A dial with four stops
Set reasoning_effort to low for a rename or a lookup, medium or high for routine fixes, and xhigh when a failing test has resisted two attempts already.
Replies your code can trust
Pass a JSON schema in response_format, or declare functions in tools and let Hydrogen ask for the next step while your application decides what actually runs.
Request parameters
| Parameter | Required | Description |
|---|---|---|
messages | Yes | The Hydrogen conversation, oldest message first. User messages may mix text parts with |
max_tokens | No | Hydrogen reply budget from 1 to 65,536, default 4,096. Thinking tokens come out of this budget, so a very small cap can end the call before any text appears. |
reasoning_effort | No | How long Hydrogen thinks before replying: low, medium, high or xhigh. The default is high; higher levels use more output tokens. |
stop | No | One sequence or up to four. Hydrogen ends the reply just before the first match, and the matched text is left out. at least 1 characters · at least 1 items · at most 4 items |
temperature | No | Hydrogen accepts values from 0 to 2 for client compatibility. Google's documentation says in-range values are ignored, so replies stay the same. |
top_p | No | Hydrogen accepts values from 0.01 to 1 for client compatibility. Google's documentation says in-range values are ignored here too. |
tools | No | Functions Hydrogen may ask to call, up to 128 definitions. Your application checks the arguments and runs the operation. at most 128 items |
parallel_tool_calls | No | Hydrogen may ask for several functions in a single turn unless you set this to false. Your application still decides what runs. Default: |
tool_choice | No | Whether Hydrogen may call a function on this turn: auto, none, required, or one named function. |
response_format | No | Ask Hydrogen for JSON, optionally against a |
Pricing
Input $1.3247 / Output $6.6233 per 1 million tokens
Use cases
Fix a failing test
Paste the stack trace and the two files it touches, then ask Hydrogen for the smallest patch and the reason the test broke.
Run an agent step by step
Give the model your function list, execute each call it requests and return the result, keeping the step limit in your own code.
Read a screenshot during support
Attach a screenshot of an error dialog and ask which setting caused it and what the user should try next.
Prompt guide & pro tips
Begin at a lower level
Try low or medium first and move up only when answers miss something. Higher levels spend more output tokens before the reply begins.
Budget for thinking
Thinking is counted inside
max_tokens. A cap of a few dozen tokens can be used up before any visible text appears, so leave generous room.Keep the stable part first
Put instructions and long reference text at the start of the conversation. Repeated openings can be served from the cache at the lower cached-input rate.
Gemini 4 Hydrogen is Google's fast reasoning model for everyday coding and agent workflows.
google/gemini-4-hydrogen/chat — /v1/chat/completions
Set reasoning_effort to low, medium, high or xhigh. Thinking draws on max_tokens, so leave room for the visible answer.
Attach images as image_url parts, declare functions in tools, or request schema-shaped JSON through response_format.
Google's safety systems review Hydrogen requests, so some prompts may be declined.
API quick start
curl --fail-with-body -sN https://api.spicyapi.ai/v1/chat/completions \
-H "Authorization: Bearer $SPICY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "google/gemini-4-hydrogen/chat",
"messages": [
{
"role": "user",
"content": "Summarise the following release notes into three bullet points."
}
],
"stream": true
}' \
| jq --unbuffered -Rrj 'select(startswith("data: ")) | .[6:] | select(. != "[DONE]") | fromjson | if .error then "\n[error] \(.error.message)\n" else (.choices[0].delta.content? // empty) end'
See the API reference for authentication, the complete schema, polling, and error handling.













