AI model comparison

Gemma 4 31B IT vs GPT-5.1 Codex mini

Compare pricing, context limits, supported inputs and deployment options to choose a model for your workflow.

Gemma 4 31B IT from Google lists 262.14K context, 32.77K maximum output, $0.10 input per 1M tokens, $0.34 output per 1M tokens. GPT-5.1 Codex mini from OpenAI lists 400K context, 128K maximum output, $0.25 input per 1M tokens, $2.00 output per 1M tokens. Compare the inputs, outputs and deployment options below to see which fits your workflow.

Side-by-sideCapabilities and practical differences

Google

Gemma 4 31B IT

Gemma 4 31B IT from Google: Largest Gemma 4 instruction model for open, self-hosted chat and reasoning.

Context
262.14K
Max output
32.77K
Input / 1M tokens
$0.10
Output / 1M tokens
$0.34

Accepts

  • Text input
  • Image input

Produces

  • Text output
VS

OpenAI

GPT-5.1 Codex mini

GPT-5.1 Codex mini from OpenAI: Coding-optimized GPT model for repository edits, reviews, and agentic software work.

Context
400K
Max output
128K
Input / 1M tokens
$0.25
Output / 1M tokens
$2.00

Accepts

  • Text input
  • Image input

Produces

  • Text output

At a glance

Key differences

Compare the available figures below, then try both models on the work you need to do.

Gemma 4 31B IT

  • Input price: $0.10
  • Output price: $0.34

GPT-5.1 Codex mini

  • Context capacity: 400K
  • Maximum output: 128K

Context capacity

Higher listed limit

Gemma 4 31B IT:262.14K

GPT-5.1 Codex mini:400K

GPT-5.1 Codex mini

Maximum output

Higher listed limit

Gemma 4 31B IT:32.77K

GPT-5.1 Codex mini:128K

GPT-5.1 Codex mini

Input price

Lower listed token rate

Gemma 4 31B IT:$0.10

GPT-5.1 Codex mini:$0.25

Gemma 4 31B IT

Output price

Lower listed token rate

Gemma 4 31B IT:$0.34

GPT-5.1 Codex mini:$2.00

Gemma 4 31B IT

Specifications

Pricing, limits and capabilities

Specifications for Gemma 4 31B IT and GPT-5.1 Codex mini. Higher limits and lower prices describe these figures only.
SpecificationGemma 4 31B ITGPT-5.1 Codex mini
ProviderGoogleOpenAI
Listed pricing routeGoogleOpenAI
Model familygemmagpt-codex
Accepted inputstext, imagetext, image
Produced outputstexttext
Context window262.14K400KHigher
Max output32.77K128KHigher
Input price / 1M$0.10Lower$0.25
Output price / 1M$0.34Lower$2.00
Reasoning modeDocumentedDocumented
Tool callingDocumentedDocumented
Image inputDocumentedDocumented
Audio inputNot documentedNot documented
Structured outputDocumentedDocumented
LicenseOpen weightsProprietary

Workload guidance

Which model should you choose?

Consider Gemma 4 31B IT if you need a lower listed input rate or a lower listed output rate. Consider GPT-5.1 Codex mini if you need larger context or larger maximum output. Gemma 4 31B IT offers downloadable weights; GPT-5.1 Codex mini is listed as a proprietary model. Compare licence terms and operating costs before choosing a deployment. Test both on the same representative examples and judge the output against your acceptance criteria. Include tool failures, retries and the time to a completed task.

Documentation and model profiles

Explore each model’s features, API requirements and licence terms in the sources below.

Questions people ask

It brings together documented inputs and outputs, token limits, deployment terms and available pricing. When both models have source-linked, verified results on a shared benchmark, those results are shown with their individual sources. The comparison is a starting point for evaluating your own workload.

Compare a different pair

Search by model or provider to explore another comparison.

Open model comparison