Gemma 4 31B vs Phi 4

For a typical chat reply (2,000 tokens in, 400 out), Gemma 4 31B costs 1.6× as much as Phi 4: $0.316 against $0.196 per 1,000 requests at list price on 2026-09-28.

1.6× the price of Phi 4, per chat reply

Cost per 1,000 chat replies, to scale
Phi 4$0.196
Gemma 4 31B$0.316
Gemma 4 31B vs Phi 4
Gemma 4 31BPhi 4
Input, per 1M tokens$0.09$0.07
Output, per 1M tokens$0.34$0.14
Context window262K16K
Classification or routing (600 tokens in, 10 out), per 1,000$0.0574$0.0434
Chat reply (2,000 in, 400 out), per 1,000$0.316$0.196
Retrieval-augmented answer (8,000 in, 500 out), per 1,000$0.89$0.63
Confidence signalyesno
Tool callingyesno
Banking test, right of 400304not tested

The marked cell in each row is the cheaper, larger or more accurate of the two.

Which one should carry your traffic?

If Phi 4 answers your requests as well as Gemma 4 31B, moving that traffic saves 38% on chat-shaped requests. Averages cannot tell you whether it does for your requests. Phi 4 does not report how sure it is through OpenRouter, so Gimbix would test it as a full replacement rather than a first answer.

Measure Phi 4 against Gemma 4 31B on your requests

A pilot runs both on a copy of your traffic and shows where they differ.

Request an AI cost review