Gemini 4 Hydrogen API pricing and access

Run Gemini 4 Hydrogen (model ID gemini-4-hydrogen) through Code By AI for $0.15 per 1M input tokens and $0.75 per 1M output tokens. Google lists the same model at $1.50 and $7.50; you pay about 90% less than that, with no monthly subscription.

What Gemini 4 Hydrogen is for

Use this model through Gemini CLI to explain code, investigate error messages and summarize project changes. Review its suggestions against your project.

Official price

$1.50

per 1M tokens, USD

Your price

$0.15

per 1M tokens, USD

You save

−90%

1/10 of official price

Gemini model service may be unstable due to recent upstream risk controls. Please choose carefully.

gemini-4-hydrogenTop up & try
Official priceYour price
Input$1.50$0.15
Cache read$0.075$0.0075
Output$7.50$0.75

What gemini-4-hydrogen costs in a typical month

For 20M input and 2M output tokens, the same workload costs $45.00 at list price and $4.50 through Code By AI — 90% less.

How to use gemini-4-hydrogen

Export GOOGLE_GEMINI_BASE_URL=https://www.codebyai.net/api/agent and GEMINI_API_KEY=sk-proj-xxxx, then launch the CLI, and use the model ID gemini-4-hydrogen. The Gemini guide walks through the full configuration.

export GOOGLE_GEMINI_BASE_URL="https://www.codebyai.net/api/agent"
export GEMINI_API_KEY="sk-proj-xxxx"
Read the Gemini setup guideCompare plans and monthly costs

No key yet? Create one

Claude Code, Codex and Gemini CLI compatibility

A client can call gemini-4-hydrogen only when it speaks the endpoint that serves this model. The table shows what works and the minimum configuration.

  • Claude CodeNot applicable

    Not applicable: the Anthropic Messages endpoint serves Claude models only.

    Open the Claude Code guide
  • CodexNot applicable

    This model is not available in Codex. Gemini models use the Gemini endpoint.

    Open the Codex guide
  • Gemini CLIAvailable

    Set GOOGLE_GEMINI_BASE_URL="https://www.codebyai.net/api/agent" and GEMINI_API_KEY, select gemini-api-key in ~/.gemini/settings.json, then use model gemini-4-hydrogen.

    Open the Gemini CLI guide

Compare other Gemini models

Your price /1M

Similar price on other channels

Gemini 4 Hydrogen FAQ

Get started

Four steps to your first request

  1. 01

    Create a free account

    Sign up with Google, GitHub or email and set a password. No card is required.

  2. 02

    Generate an API key

    Create a key in one click from the dashboard. It lets your CLI authenticate with Code By AI.

  3. 03

    Top up your balance

    Add credit before your first request; usage is charged per token from your balance.

  4. 04

    Point your CLI at Code By AI

    Export one base-URL variable, or add a model provider block to config.toml. The setup guides list the exact lines for each agent.

Use it nowTop up to send a requestWhat a working month costs

No card required to sign up · API usage requires a top-up