Gemini

Gemini 4 Hydrogen

Model ID:gemini-4-hydrogen

谷歌 Gemini 4 轻量版(Hydrogen):主打响应速度与性价比,适合日常对话、批量调用与轻量推理,支持 1M 上下文。

StreamingReasoning
Context window1m
Input (CNY / Million Tokens)¥3.15
Output (CNY / million tokens)¥15.75
Cache read (CNY / million tokens)¥0
Cache write (1h, yuan / million tokens)¥0

Prices by channel

ChannelInputOutputRead CacheCache hitCache Write (1h)Cache write (5m)Multiplier
聚合/反代节点1¥3.15¥15.75¥0¥0.1575¥0—1.00x
谷歌官方¥5.88¥29.4¥0¥0.294¥0—1.00x

Call example

This model belongs to theGeminigroup, calling protocol:Google Gemini native protocol (generateContent, model name in URL)Enter your API Key to use; groups determine the entry point and cannot be mixed (e.g., models in the Gemini group cannot use /v1/messages).

Request examplecurl
curl https://www.relay-api.com/v1beta/models/gemini-4-hydrogen:generateContent \
  -H "x-goog-api-key: sk-你的Key" \
  -H "content-type: application/json" \
  -d '{
    "contents": [
      { "role": "user", "parts": [{ "text": "你好,请简单介绍一下自己" }] }
    ],
    "generationConfig": { "maxOutputTokens": 1024 }
  }'
Back to examplesJSON
{
  "candidates": [
    {
      "content": { "role": "model", "parts": [{ "text": "你好!我是 Gemini 4 Hydrogen,很高兴为你服务。" }] },
      "finishReason": "STOP"
    }
  ],
  "usageMetadata": { "promptTokenCount": 12, "candidatesTokenCount": 34, "totalTokenCount": 46 }
}

Tool Integration Tutorial

Use this model with your usual AI coding tool, billed per token.