Gemini 4 Hydrogen API
Google's fast, efficient Gemini model for everyday coding and agents.
On this page
Gemini 4 Hydrogen API pricing
75% less than Google’s API for 1,000 input and 500 output tokens, before caching.
| Token type | RouterHub | GoogleOfficial API |
|---|---|---|
| Input | $0.375 | $1.50 |
| Output | $1.875 | $7.50 |
| Cached input | $0.01875 | $0.075 |
Google pricing source · Checked 2026-11-18
Compatible with the tools you already use
One key, one base URL. OpenAI and Anthropic compatible.
Gemini 4 Hydrogen uses Chat Completions. See the tools that support this model.
Start for free
Plus up to $5 bonus credit on your first top-up.
Context window and API compatibility
Gemini 4 Hydrogen uses the OpenAI-compatible Chat Completions API over POST /v1/chat/completions and has a context window of 1,048,576 tokens. Use model ID gemini-4-hydrogen in requests.
- Exact model ID
gemini-4-hydrogen- Provider
- Variant
- Standard
- Supported API
- OpenAI-compatible Chat Completions API (
/v1/chat/completions) - Availability
- Preview
- Context window
- 1,048,576 tokens
- Maximum input
- Not published
- Maximum output
- 65,536 tokens
- Input types
- text and images
- Coding tools
- OpenCode, VS Code + Continue, VS Code + Cline, Hermes Agent
Make your first API request
Set ROUTERHUB_API_KEY locally, then send a request with the exact model ID below.
curl --connect-timeout 30 --max-time 600 https://routerhub.si/v1/chat/completions \
-H "Authorization: Bearer $ROUTERHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gemini-4-hydrogen","messages":[{"role":"user","content":"Write a short noir scene set in a lighthouse."}],"max_tokens":256}'Python: install openai with pip. This example requests 256 output tokens and disables automatic retries. Check Usage before resending a paid request.
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["ROUTERHUB_API_KEY"],
base_url="https://routerhub.si/v1",
timeout=600.0,
max_retries=0,
)
response = client.chat.completions.create(
model="gemini-4-hydrogen",
messages=[{"role": "user", "content": "Write a short noir scene set in a lighthouse."}],
max_tokens=256,
)
print(response.choices[0].message.content)Common questions
What is Gemini 4 Hydrogen?
Gemini 4 Hydrogen is a Google language model served through RouterHub using the OpenAI-compatible Chat Completions API. Its exact API model ID is gemini-4-hydrogen.
How much does Gemini 4 Hydrogen cost?
RouterHub charges $0.375 input, $0.01875 cached input and $1.875 output per million tokens (prices as of 2026-11-22). A typical chat message of about 1,000 input and 500 output tokens costs about 0.13¢. Usage is billed against your prepaid balance.
What is the Gemini 4 Hydrogen context window?
Context window: 1,048,576 tokens. Maximum input: Not published. Maximum output: 65,536 tokens.
Which API does Gemini 4 Hydrogen support?
Use the OpenAI-compatible Chat Completions API at https://routerhub.si/v1/chat/completions with the exact model ID gemini-4-hydrogen and your RouterHub API key (Authorization: Bearer header).
Which coding tools work with Gemini 4 Hydrogen?
OpenCode, VS Code + Continue, VS Code + Cline, Hermes Agent. These tools support this model’s Chat Completions endpoint with the configurations in their setup guides.
Can I try Gemini 4 Hydrogen for free?
Gemini 4 Hydrogen needs a free RouterHub account with prepaid credits. New accounts get $5 free on their first top-up of $20 or more.