SUN, NOVEMBER 15, 2026
Independent · In‑Depth · Practitioner‑Tested
LLMs

Grok 4.7 vs Gemini 4 Hydrogen: API Cost Compared (2026)

One is cheaper on input, the other on output. The crossover sits at exactly 3:1.

🕐 8 min read 👁 17 views 📅 Nov 15, 2026
Straight answer
● Grok 4.7 $2.00 in / $6.00 out per 1M. 500k context.
● Gemini 4 Hydrogen $1.50 in / $7.50 out per 1M. 1M context.
● The rule Input over 3x your output? Hydrogen. Under? Grok 4.7.
● Cache Only Hydrogen has it, at $0.075 per 1M on a hit.

These two are priced in opposite directions, and almost every published comparison gets the conclusion wrong by quoting one number. Gemini 4 Hydrogen is cheaper on input and dearer on output. Grok 4.7 is cheaper on output and dearer on input. Which one wins depends entirely on the shape of your workload, and the crossover is exact.

The pricing, side by side

Per 1M tokensGrok 4.7Gemini 4 Hydrogen
Input$2.00$1.50
Output$6.00$7.50
Cached inputnot published$0.075
Context window500k1M

The crossover, worked out

Set the two costs equal and the algebra is clean. Grok costs 2I + 6O. Hydrogen costs 1.5I + 7.5O. They match when I = 3O — when you feed in exactly three times as many tokens as you get back.

The only number you need
● Input more than 3x output Gemini 4 Hydrogen is cheaper.
● Input less than 3x output Grok 4.7 is cheaper.
● Exactly 3:1 Identical cost. Pick on context window instead.

A worked pair: send 10 million input tokens and generate 1 million. Grok charges $20 + $6 = $26. Hydrogen charges $15 + $7.50 = $22.50. Now flip it — 1 million in, 1 million out. Grok charges $2 + $6 = $8. Hydrogen charges $1.50 + $7.50 = $9. Same two models, opposite winners, and nothing changed but the ratio.

Which workloads land where

Input-heavy, so Hydrogen: retrieval over long documents, summarising large reports, reading whole codebases, anything where you stuff context in and get a short answer back. The 1M window and the $0.075 cache hit compound the advantage — if you resend the same context repeatedly, cached input is roughly a twentieth of the normal rate and Grok publishes no equivalent.

Output-heavy, so Grok 4.7: drafting long copy, generating code from a short brief, bulk content work, agent loops that reason at length from a small prompt. The 500k window is still large enough for most of these, and you pay 20 percent less for every token produced.

What the pricing does not tell you

Hydrogen keeps pricing flat across the full 1M context, which matters because some competitors step the rate up past a threshold. It also reaches further: the Gemini API, AI Studio, Android Studio, the Gemini app including free users, and Google Search globally. Grok 4.7 has been the newest model in xAI's docs since 21 September; Musk has described 4.8 and 4.9 on X, but neither appears in the developer docs, so 4.7 is what you can actually build on today.

More on each: our Gemini 4 Hydrogen launch breakdown and the Grok 4.8 rebuild story. Both tools are listed: Grok and Gemini.

FAQ

Is Grok 4.7 or Gemini 4 Hydrogen cheaper?
It depends on your input-to-output ratio. Above 3:1 input to output, Hydrogen is cheaper. Below 3:1, Grok 4.7 is cheaper. At exactly 3:1 they cost the same.
What is Grok 4.7 API pricing?
$2.00 per million input tokens and $6.00 per million output tokens, with a 500k context window.
What is Gemini 4 Hydrogen API pricing?
$1.50 per million input and $7.50 per million output, flat across the full 1M context. Cache hits are $0.075 per million.
Which has the bigger context window?
Gemini 4 Hydrogen, at 1M tokens against Grok 4.7's 500k.
Does Grok 4.7 have prompt caching?
xAI does not publish cached-input pricing on its API page, so budget at the full input rate.
⚖ Our Verdict

No single winner. Above a 3:1 input-to-output ratio Gemini 4 Hydrogen costs less and brings a 1M window plus cached input at $0.075 per million. Below 3:1 Grok 4.7 costs less, because its $6 output rate is 20 percent under Hydrogen's $7.50.