Textby Google

Gemma 4 31B

Gemma 4 31B Instruct is Google DeepMind's 30.7B dense multimodal model supporting text and image input with text output. Features a 256K token context window, configurable thinking/reasoning mode, native function...

  • By price it is in the cheaper half of the 345 text models GenMagic runs (77th cheapest).
  • It scores 4.4 on the Artificial Analysis Intelligence Index, 115th of the 120 text models with a score.
  • It has scores on 21 public benchmarks, listed below with their sources.
  • It was listed on Apr 2, 2026.

Data last changed Nov 13, 2026 · tracked since Oct 29, 2026 · Every model change

Try Gemma 4 31B

Generate with Gemma 4 31B right here. Verify your email to start with free credits.

<$0.01
Try

Specifications

Context window

262K tokens

Max output

16K tokens

Input price

$0.30 / 1M tokens

Output price

$0.60 / 1M tokens

Benchmarks

How Gemma 4 31B scores on public benchmarks. Each card links to the benchmark explainer and to the original source.

4.2

source date 2026-11-11
Source: openrouter

43.4

source date 2026-11-11
Source: openrouter

4.4

source date 2026-11-11
Source: openrouter
AIMEMathematics

73.3%± 6.7

minimalsource date 2026-08-06
Source: epoch
Chess PuzzlesReasoning & Knowledge

5%± 2.2

minimalsource date 2026-08-06
Source: epoch
DTBenchReasoning & Knowledge

82.7%

Source: epoch
GPQA DiamondReasoning & Knowledge

82%± 1.4

source date 2026-10-31
Source: openrouter
LMArena (Coding)Instruction & Preference

1459 Elo

source date 2026-11-11
Source: lmarena
LMArena: Creative WritingInstruction & Preference

1415 Elo

source date 2026-11-11
Source: lmarena
LMArena: Hard PromptsInstruction & Preference

1447 Elo

source date 2026-11-11
Source: lmarena

1445 Elo

source date 2026-11-11
Source: lmarena
LMArena: MathMathematics

1464 Elo

source date 2026-11-11
Source: lmarena
LMArena: Multi-TurnInstruction & Preference

1452 Elo

source date 2026-11-11
Source: lmarena
LMArena (Overall)Instruction & Preference

1443 Elo

source date 2026-11-11
Source: lmarena
LMCAReasoning & Knowledge

39.3

Source: epoch
SimpleQA VerifiedReasoning & Knowledge

10.4%± 1.0

source date 2026-08-27
Source: epoch
tau-bench (Airline)Agentic & Tool Use

75.3%± 3.1

source date 2026-10-31
Source: openrouter
WebDev ArenaAgentic & Tool Use

1364 Elo

Source: epoch
WeirdMLCoding

52.3%± 0.0

Source: epoch

Compare against every model in the full benchmark matrix.

Capabilities

Reasoning

Works through multi-step problems before answering, for harder tasks.

Vision input

Accepts images alongside text, so you can prompt with pictures and screenshots.

Tool use

Can call functions and tools, enabling agentic and structured workflows.

Structured output

Returns validated JSON that conforms to a schema you define.

Use Gemma 4 31B through the API

The model id is google/gemma-4-31b-it. Requests bill your GenMagic balance at the price above, and each response reports what it cost.

curl
curl https://genmagic.co/api/v1/chat/completions \
  -H "Authorization: Bearer $GENMAGIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google/gemma-4-31b-it",
    "messages": [{ "role": "user", "content": "Explain vector databases in two sentences." }]
  }'
Python (openai SDK)
from openai import OpenAI

client = OpenAI(base_url="https://genmagic.co/api/v1", api_key="YOUR_GENMAGIC_API_KEY")

resp = client.chat.completions.create(
    model="google/gemma-4-31b-it",
    messages=[{"role": "user", "content": "Explain vector databases in two sentences."}],
)
print(resp.choices[0].message.content)

From an AI agent, call generate_text with "model": "google/gemma-4-31b-it" on the GenMagic MCP server. Keys, limits and every endpoint are in the API documentation.

Use Gemma 4 31B in n8n

  1. In n8n, open the nodes panel, search for GenMagic and install it (a verified community node), then add it to your workflow.
  2. Set Resource to Text and Operation to Generate.
  3. In Model Name or ID, pick Google: Gemma 4 31B, or enter google/gemma-4-31b-it as an expression.
  4. Connect your GenMagic API key (get one free). Each run is billed at the price above, and the node returns what it cost.

Ready-to-import workflows that already use the node are on GenMagic for n8n.

Similar-priced text models from other providers

Other text models GenMagic runs at a comparable price, on the same balance and API key.

ModelProviderPriceContext
Google: Gemma 4 31B (this model)Google$0.30 in / $0.60 out per 1M tokens262K
Meta: Muse EmberMeta$0.15 in / $0.75 out per 1M tokens1M
Anthropic: Claude Haiku 5.5Anthropic$0.15 in / $0.75 out per 1M tokens1M
OpenAI: GPT-6 Luna ProOpenAI$0.15 in / $0.75 out per 1M tokens1.1M
NVIDIA: Nemotron 3.5 Super VLNVIDIA$0.23 in / $0.70 out per 1M tokens1M
Qwen: Qwen3.8 Omni FlashQwen$0.23 in / $0.70 out per 1M tokens1M

Compare Gemma 4 31B

More from Google

All 41 Google models

Price and listing history

Every change GenMagic has recorded for Gemma 4 31B since it began tracking the model on Oct 29, 2026. Prices are GenMagic's, the same the studio and the API charge.

DateChangeBeforeAfter
Nov 6, 2026Updated: intelligence index--
Nov 1, 2026Price up 36%$0.22 in / $0.44 out per 1M tokens$0.30 in / $0.60 out per 1M tokens

Where these figures come from

  • Price: GenMagic's own price, what the studio and the API charge, recomputed from the provider's price list every few minutes and recorded daily. How pricing works.
  • Specs and description: as Google publishes them (model card on Hugging Face), checked daily.
  • Benchmarks: 21 scores from Artificial Analysis and OpenRouter, Epoch AI, LMArena, re-read daily. Each score above links to its source.
  • Changes: the data on this page last changed on Nov 13, 2026, tracked since Oct 29, 2026. Every model's new listings, price changes and retirements are in the model changes log, and how every figure on GenMagic is sourced is on our sources page.

Generate with Gemma 4 31B today

One GenMagic plan unlocks Gemma 4 31B and every other model across text, image, audio, and video.