Gemma 4 31B

Multimodal long-context work with thinking control

Chat
Multi-Modal
Thinking
JSON Mode
Tool Calling

Pricing

Run instantly. Pay only for what you use.

Input
$0.10/ M
Output
$0.30/ M
Cache read
$0.04/ M

About Gemma 4 31B

Gemma 4 31B is the dense flagship of Google DeepMind's Gemma 4 family, released under Apache 2.0: 30.7B parameters, a 256K-token context window, native text + image input, and pre-training across 140+ languages, with a configurable thinking mode.

What sets it apart is human preference: at 1452 ELO on LMArena it is the top-ranked open dense model — ahead of open models several times its size — so answers read well to users, not just to benchmarks.

With thinking enabled it posts 85.2% on MMLU-Pro, 89.2 on AIME 2026, and 80.0 on LiveCodeBench v6, with strict function calling and JSON output for production pipelines.

1452LMArena ELO

The top-ranked open dense model in human preference evaluations.

256Ktoken context window

Holds long documents, retrieved passages, and multi-turn sessions in one prompt.

140+languages in pre-training

35+ supported out of the box — one deployment serves a global user base.

Key capabilities

Gemma 4 31B is strongest where answer quality is judged by people — assistants, document analysis, and multilingual products that need flagship reasoning with native vision.

Flagship reasoning

85.2% on MMLU-Pro and 89.2 on AIME 2026 with thinking enabled — reasoning depth on demand, direct replies with it off.

Native vision

76.9 on MMMU-Pro — screenshots, PDFs, and diagrams are read alongside text, no separate vision model to route to.

Strong coding

80.0 on LiveCodeBench v6 — reviews, patches, and test generation with 256K of repository context in scope.

Reliable structured output

Strict function calling and JSON mode — tool arguments and extraction pipelines that parse the first time.

Where this model fits

Best for
  • Human-facing assistants and chat products

    The top Arena-ranked open dense model — responses users actually prefer, in 35+ languages out of the box.

  • Multimodal document analysis at long context

    Native vision at 76.9 on MMMU-Pro over a 256K window — contracts, reports, and image-heavy files in one prompt.

  • Math-heavy and structured reasoning

    89.2 on AIME 2026 with thinking enabled — step-by-step depth on demand, direct replies with it off.

  • Document and image extraction to JSON

    Strict function calling and JSON mode return schema-valid output for ticket, form, and invoice pipelines.

Avoid for
  • Throughput-first, cost-dominated fleets

    Every token runs all 30.7B parameters. When per-token cost dominates, Gemma 4 26B A4B keeps near-flagship quality at 3.8B-active pricing.

  • The heaviest legacy-code refactors

    Community testing shows it trailing dedicated coding agents on complex architectural work — compare DeepSeek V4 Flash or Qwen 3.6 27B for repo-scale refactors.

  • Audio input or speech understanding

    Inputs are text and image only. Transcribe audio upstream before sending it to the model.

Estimate your Savings

Compare Entrim’s pricing, powered by an optimized inference runtime, against other providers using the same token counts per request.

Performance and
benchmarks

Entrim performance for Gemma 4 31B under production load in the past few days.

Throughput (tokens / sec)

avg. 58.6tokens/s

Time to first token (TTFT)

avg. 850ms

Public model benchmarks

85.2%MMLU-Pro

Graduate-level knowledge and reasoning across 14 domains.

89.2AIME 2026

Competition mathematics measuring multi-step reasoning.

80.0LiveCodeBench v6

Competitive coding problems unseen at training time.

Run Gemma 4 31B in minutes

Test this model with $25 free credit. Use Entrim's OpenAI-compatible API to call Gemma 4 31B, compare output quality, latency, and request cost, then decide if it fits your workload.

Code examples

curl -X POST "https://api.entrim.ai/v1/chat/completions" \  -H "Content-Type: application/json" \  -H "Authorization: Bearer $ENTRIM_API_KEY" \  -d '{    "model": "google/gemma-4-31B-it",    "messages": [      {        "role": "user",        "content": "Why do they call it a building if it is already built?"      }    ]  }'

SDKs & docs

Use familiar SDK patterns with quickstart examples for common production setups.

OpenAI-compatible

Keep the request format your team already knows.

No cold starts

Production requests are served without model spin-up delays.

Not sure this is the right model?

Explore related models that may be a better fit for your workload.

Gemma 4 quality at 4B-active speed

256K
FP8
Vision
Multilingual
Input / M
$0.05
Output / M
$0.25
Cached / M
$0.025

Dense agentic coding with thinking control

262K
FP8
Vision
Multimodal
Video
Input / M
$0.10
Output / M
$0.40
Cached / M
$0.04

DeepSeek V4 Flash

Version 0731

High-throughput agentic work with 1M context

1M
FP4
Thinking
Tool Calling
Input / M
$0.09
Output / M
$0.17
Cached / M
$0.015

Run Gemma 4 31B with the Most Cost-Effective LLM Inference

Use $25 free credits to test prompts, token sizes, latency, throughput, output quality, and request cost before moving traffic.
All services are online

© 2026. Entrim. All Rights Reserved.

Privacy policyTerms of service