Gemma 4 31B IT vs gpt-oss-120b

Gemma 4 31B IT (Google DeepMind, April 2026) and gpt-oss-120b (OpenAI, August 2025), compared on price, context window, access and specs. They cost the same: free. Gemma 4 31B IT reads more at once: a 262K-token context window against 131K.

Updated 5 December 2026 · read each row across; the best value in a row is marked

At a glance

Released
2 April 2026
5 August 2025
Access
Open weights (restricted use)
Open weights (unrestricted)
Country
United States of America
United States of America

Price and API

Input, per 1M tokens
$0on Google AI StudioLowest
$0.03on Hugging Face
Output, per 1M tokens
$0on Google AI StudioLowest
$0.15on Hugging Face
Official API id
google/gemma-4-31b-it
Not listed
Context window
262K tokensLargest
131K tokens
Max output
33K tokens
131K tokensLargest
Takes
Text, Image
Text
Returns
Text
Text
Knowledge cutoff
Not listed
June 2024
Supports
ReasoningTool callingStructured outputFile inputOpen weights
ReasoningTool callingStructured outputOpen weights

Scale and training

Parameters
31B31,000,000,000
117B116,830,000,000Largest
Training compute
Not listed
4.9 × 10²⁴ FLOP
Training hardware
Not listed
NVIDIA H100 SXM5 80GB
Confidence
Likely
Confident

Notes

Parameters
Not listed
Total parameters: 116.83B
Training compute
Not listed
"The training run for gpt-oss-120b required 2.1 million H100-hours to complete" (2.1e6 hours)*(1,979 H100 FLOP/s)*(30% utilization)*(60*60) = 4.49e24 They also do post training similar to o3, which we assume adds at least 10% as much compute, so we multiply this estimate by 1.1 to get 4.94e24
Dataset size
Not listed
(pretraining FLOPs)/(6*5.1B active parameters)

In their own words

Abstract
We introduce Gemma 4, a new generation of open-weight, natively multimodal language models in the Gemma model family. Designed to advance compute efficiency and reasoning, the Gemma 4 model suite features dense and Mixture-of-Experts architectures, ranging from 2.3B to 31B parameters. Alongside improved vision and audio encoders for all model sizes, we propose a unified, encoder-free architecture for our 12B model, which ingests raw audio and image patches. Furthermore, we integrate a thinking mode, enabling Gemma models to generate reasoning traces prior to responding. We improve inference speed, memory, and compute efficiency, as well as long-context abilities through critical design choices. Gemma 4 establishes a leap in performance across STEM, multimodal, and long-context benchmarks, and rivals larger, frontier open models in human-rated tasks.Read all
Not listed
Authors
Sherif El Abd, Vaibhav Aggarwal, Robin Algayres, Alek Andreev, Olivier Bachem, Ian Ballantyne, Cormac Brick, Victor Cărbune and 314 more
Not listed

Which should you pick?

Long documents, codebases or transcripts
Gemma 4 31B IT · 262K tokens of context, 2× more than gpt-oss-120b.
Long answers in one response
gpt-oss-120b · Up to 131K output tokens per response.
Reading images and screenshots
Gemma 4 31B IT · Accepts image input through the API.

Questions people ask

Is Gemma 4 31B IT better than gpt-oss-120b?

It depends on the job. For long documents, codebases or transcripts, Gemma 4 31B IT has the edge: 262K tokens of context, 2× more than gpt-oss-120b. For long answers in one response, gpt-oss-120b has the edge: up to 131K output tokens per response. For reading images and screenshots, Gemma 4 31B IT has the edge: accepts image input through the API. Try them on your own prompts in the AIPortalX playground before you commit.

Which is cheaper: Gemma 4 31B IT or gpt-oss-120b?

They are priced the same, at free.

Which has the bigger context window?

Gemma 4 31B IT, with 262K tokens; gpt-oss-120b takes 131K. A larger window lets one request hold longer documents or conversations.

Where can I use Gemma 4 31B IT and gpt-oss-120b through one API?

DeepInfra, Amazon Bedrock, OpenRouter and Hugging Face serve all of them, so you can switch models without opening another account.

When were they released?

Gemma 4 31B IT in April 2026 and gpt-oss-120b in August 2025.

Other comparisons