Skip to content
NEWZhipu flagship GLM-5.4 is live: 1M context, native vision & all 3 protocolsView pricing
HopBase
← Back to blog

Gemini 4 API Pricing & Integration Guide: Neon, Carbon, Hydrogen, Argon | HopBase

Gemini 4 API Pricing & Integration Guide: Neon, Carbon, Hydrogen, Argon | HopBase

The short answer: All four Google Gemini 4 chat models—gemini-4-neon, gemini-4-carbon, gemini-4-hydrogen, and gemini-4-argon—are live on HopBase with a 1,048,576-token context window, a 65,536-token synchronous output cap, implicit prefix caching, and flat single-tier pricing across the entire context. Under Google's standard GA list prices effective December 1, 2026 (USD per 1M input / cached input / output tokens, thinking included), gemini-4-argon and gemini-4-carbon are $4.00 / $0.20 / $20.00, gemini-4-neon is $3.00 / $0.15 / $15.00, and the fast tier gemini-4-hydrogen is $1.50 / $0.075 / $7.50. You can call them over OpenAI-compatible endpoints (POST /v1/chat/completions, /v1/responses), Anthropic Messages (/v1/messages), or—on the enterprise Gemini group—Google's native REST API (POST /v1beta/models/{model}:generateContent) for google-genai, Gemini CLI, and Antigravity CLI (agy). Note that gemini-4-argon accepts discrete thinking levels (low, medium, high) only, whereas Carbon, Neon, and Hydrogen accept both levels and numeric budgets; xhigh is unsupported and returns HTTP 400.

Gemini 4 model lineup and official list prices

On December 1, 2026, gemini-4-argon and gemini-4-carbon concluded their introductory period and moved to Google's standard GA pricing alongside gemini-4-neon and gemini-4-hydrogen. Every model in the series shares a 1,048,576-token context window (shared by input, thinking, and output), a 65,536-token default synchronous output limit, implicit prefix caching, and single-tier pricing with no long-context surcharge:

Model ID Input (/ 1M tokens) Cached input (/ 1M tokens) Output incl. thinking (/ 1M tokens) Thinking control Positioning and best fit
gemini-4-argon $4.00 $0.20 $20.00 Thinking levels low / medium / high only (no thinkingBudget or budget_tokens) Deep-reasoning flagship for hard architecture design, math, and multi-step root-cause analysis
gemini-4-carbon $4.00 $0.20 $20.00 Both thinking levels (low / medium / high) and numeric thinking budgets Flagship multimodal and reasoning model when your stack needs explicit numeric token budgets
gemini-4-neon $3.00 $0.15 $15.00 Both thinking levels (low / medium / high) and numeric budgets (xhigh returns 400) Balanced daily driver for coding agents, multi-turn tool calling, and multimodal production apps
gemini-4-hydrogen $1.50 $0.075 $7.50 Both thinking levels (low / medium / high) and numeric budgets (xhigh returns 400) Fast, cost-efficient Gemini 4 tier for high-throughput sub-agents, extraction, and routing

The table above shows Google's official list prices. Thinking tokens are billed at the output rate. On HopBase, charges are calculated from actual token usage and your effective rate depends on the plan group attached to your API key; check the signed-in model catalog for your key's rate, or contact sales from the pricing page for volume quotes.

Thinking parameters and key spec boundaries

All Gemini 4 models think by default and thinking cannot be turned off completely, so review these parameter rules before deploying to production:

  • gemini-4-argon accepts thinking levels only: Sending thinkingConfig.thinkingBudget on the native /v1beta endpoint returns HTTP 400 (Thinking budget is not supported for this model); pass thinkingConfig.thinkingLevel set to low, medium, or high instead. On OpenAI Chat Completions, Responses, and Anthropic Messages, HopBase automatically converts reasoning_effort or thinking.budget_tokens into levels (none / minimal → low, medium → medium, high → high).
  • gemini-4-carbon, gemini-4-neon, and gemini-4-hydrogen accept both levels and budgets: Pass either thinkingLevel (low / medium / high) or an integer thinkingBudget natively, OpenAI reasoning_effort (none / minimal → 0, medium → 8192, high → 24576; low uses the model default), or Anthropic thinking.budget_tokens (capped at 24576).
  • xhigh is not supported yet: Passing xhigh (listed by Google for Neon and Hydrogen) returns HTTP 400. Stick to low, medium, or high.
  • Set max_tokens to at least 4096: Thinking tokens count against your output limit. A small max_tokens budget can end with finish_reason=length after producing only a few visible words.
  • Multimodal inputs and tools: Supports text, base64 data-URL images (public image URLs return 400 on the enterprise Gemini group), input_audio, and PDF/file data URLs, plus parallel multi-turn tool calling, json_schema structured output, and Google web search grounding (web_search_options: {} or {"googleSearch": {}}).

How to call Gemini 4: OpenAI-compatible and native /v1beta examples

First call GET https://api.hop-base.com/v1/models with your API key to verify that gemini-4-neon, gemini-4-carbon, gemini-4-hydrogen, or gemini-4-argon is in your key's scope; if not, attach the corresponding Gemini group in the console. Migrating an existing SDK requires changing only the base URL and API key.

1. OpenAI-compatible endpoint (Chat Completions)

Point any OpenAI SDK, LangChain client, or Vercel AI SDK provider at https://api.hop-base.com/v1:

curl https://api.hop-base.com/v1/chat/completions \
  -H "Authorization: Bearer sk-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-4-neon",
    "reasoning_effort": "medium",
    "max_tokens": 4096,
    "messages": [
      {"role": "user", "content": "Compare event sourcing vs. CRUD for a billing ledger in three bullet points."}
    ]
  }'

In OpenAI responses, thinking tokens are included in usage.completion_tokens and itemized under usage.completion_tokens_details.reasoning_tokens. Codex CLI connects via POST /v1/responses, and Claude Code connects via POST /v1/messages with base URL https://api.hop-base.com (no /v1).

2. Native Gemini REST API (google-genai SDK and Antigravity CLI)

Keys that include the enterprise Gemini group can call POST /v1beta/models/{model}:generateContent and :streamGenerateContent?alt=sse directly with root base URL https://api.hop-base.com and x-goog-api-key, ?key=, or Authorization: Bearer:

curl "https://api.hop-base.com/v1beta/models/gemini-4-neon:generateContent" \
  -H "x-goog-api-key: sk-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [
      {"role": "user", "parts": [{"text": "Summarize when to choose each Gemini 4 model in three sentences."}]}
    ],
    "generationConfig": {
      "thinkingConfig": {
        "thinkingLevel": "medium"
      },
      "maxOutputTokens": 4096
    }
  }'

To run Google's terminal coding agent Antigravity CLI (agy) against HopBase, set {"modelProvider": "gemini"} in ~/.gemini/antigravity-cli/settings.json, export your key and root base URL, and append a supported thinking suffix (-low, -medium, or -high—do not pick -xhigh):

export GEMINI_API_KEY=sk-your-key
export GOOGLE_GEMINI_BASE_URL=https://api.hop-base.com
agy --model gemini-4-neon-medium

For group capability tables, web search billing, and streaming behavior, see the Gemini chat protocol docs, the Antigravity CLI setup guide, and the Available models reference.

FAQ

How do I choose between Gemini 4 Argon, Carbon, Neon, and Hydrogen?

Start with gemini-4-neon ($3.00 / $15.00) as the balanced default for coding agents, tool use, and multimodal tasks. Drop to gemini-4-hydrogen ($1.50 / $7.50) for latency-sensitive sub-agents, classification, and high-throughput pipelines. Step up to the $4.00 / $20.00 flagships for your hardest reasoning problems: pick gemini-4-argon when level-based tuning (low / medium / high) fits your workflow, or gemini-4-carbon when you need explicit numeric thinking budgets.

Why does sending thinkingBudget to gemini-4-argon or xhigh to Neon return HTTP 400?

gemini-4-argon supports only discrete thinking levels (low, medium, high) and rejects thinkingBudget on the native API with HTTP 400; on OpenAI and Anthropic endpoints, HopBase maps numeric budgets and reasoning_effort to levels automatically. Meanwhile, the xhigh level is not supported yet on any Gemini 4 model—use low, medium, or high.

Are billing and prompt caching identical between OpenAI-compatible and native /v1beta endpoints?

Yes. Calling /v1/chat/completions, /v1/responses, /v1/messages, or /v1beta/models/{model}:generateContent uses the exact same official list prices and plan-group rates: thinking tokens bill as output, and implicit cache hits bill at the cached-input rate (for example, $0.15 per 1M tokens on gemini-4-neon).