LLMgoogle

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...

Anyone in the Project can @-mention Google: Gemma 4 31B with the team's shared context - pooled credits, one chat, one memory.

All models

Starter is free forever - 1 Project, 100 credits/month, 1 MCP. No card.

Verdict

Gemma 4 31B delivers strong multimodal reasoning at a price point that undercuts most frontier models. With a 262K token context window and native image/video support, it handles long documents and visual workflows without the cost overhead of GPT-4 or Claude. The 31B parameter count means it won't match 70B+ models on complex reasoning, but for teams that need vision capabilities and long-context work on a budget, this is the model to reach for. Best suited for production use cases where cost per token matters more than bleeding-edge performance.

Best for

  • Long-context document analysis with images
  • Cost-sensitive multimodal applications
  • Video frame analysis and summarization
  • Production workflows needing vision at scale
  • Teams migrating from GPT-4V for cost

Strengths

The 262K context window puts Gemma 4 31B in the same league as Gemini 1.5 for handling book-length documents or extensive conversation histories. Native video understanding means you can pass frames directly without preprocessing. At $0.09/$0.34 per Mtok, it costs roughly one-third of GPT-4o for comparable multimodal tasks. The model handles mixed text-image workflows smoothly, making it practical for document extraction, visual QA, and content moderation pipelines where cost accumulates quickly.

Trade-offs

The 31B parameter count shows up in complex reasoning tasks — expect it to trail Claude Sonnet 4.5 and GPT-4o on multi-step logic problems or nuanced instruction following. Without public benchmarks, you'll need to validate performance on your specific use case before committing. Video understanding, while present, likely lags specialized models like Gemini 1.5 Pro for frame-level detail. Teams needing maximum accuracy on hard reasoning tasks should test against larger alternatives first.

Specifications

Provider
google
Category
llm
Context length
262,144 tokens
Max output
16,384 tokens
Modalities
image, text, video
License
proprietary
Released
2026-04-02

Pricing

Input
$0.20/Mtok
Output
$0.40/Mtok
Model ID
google/gemma-4-31b-it

Per-token prices show what the model costs upstream. On Switchy your team draws from one shared org credit pool - one plan, one balance for everyone.

Team cost calculator

Estimated monthly spend
$4.58
17.6M tokens / month
5 seats · 80 msgs/day

Switchy meters this against your org's shared credit pool - one plan, one balance for everyone.

Providers

ProviderContextInputOutputP50 latencyThroughput30d uptime
google262k$0.09/Mtok$0.34/Mtok———

Performance

Performance snapshots are collected daily. Check back after the next ingestion run.

Benchmarks

Public benchmark scores are not available yet for this model. Check back after the next ingestion run.

Works well with

Top MCPs

Compatibility data comes from first-party telemetry; once we have enough co-usage signal, top MCPs for this model will appear here.

How Switchy teams use it

Not enough Projects have used this model yet to share anonymised team stats. We wait for at least 50 distinct Projects per week before publishing any aggregate.

Starter prompts

Extract Invoice Data

Extract the following fields from this invoice image: vendor name, invoice number, date, line items with quantities and prices, subtotal, tax, and total. Return as JSON.

Summarize Video Transcript

Here's a full transcript from a 90-minute product demo video. Summarize the five main features discussed, including timestamps and any visual demonstrations mentioned.

Compare Document Versions

I'm providing two versions of a 50-page contract. Identify all substantive changes between version 1 and version 2, focusing on terms, dates, and financial figures.

Analyze Screenshot UI

Review this mobile app screenshot. Identify usability issues, accessibility concerns, and suggest three specific improvements to the navigation flow.

Generate Alt Text

Write concise, descriptive alt text for this image. Focus on the main subject and context relevant for screen readers. Keep it under 125 characters.

Example outputs

Illustrative - representative of the model's voice and quality, not literal recordings.

Prompt

Review this pull request for security issues. Focus on authentication flows and data validation in the user registration endpoint.

Output

The registration endpoint has three concerns: First, password validation only checks length, not complexity—add entropy requirements. Second, the email verification token uses Math.random() instead of crypto.getRandomValues(), making it predictable. Third, the SQL query on line 47 concatenates user input directly—switch to parameterized queries to prevent injection. The rate limiting looks solid at 5 attempts per IP per hour. Consider adding CAPTCHA after 3 failed attempts.

Notes

Gemma 4 31B excels at structured code review with its 262K context window—it can hold entire codebases in memory for cross-file analysis. The model identifies specific line numbers and suggests concrete fixes rather than generic advice. However, at $0.34/Mtok output, extended back-and-forth debugging sessions cost more than smaller alternatives.

Prompt

Analyze this product photo and suggest three composition improvements to increase conversion rates for e-commerce listings.

Output

Current image shows the watch at a 45-degree angle with harsh overhead lighting creating glare on the crystal. Three improvements: First, shoot straight-on at eye level—luxury watches convert 23% better with frontal hero shots. Second, use diffused side lighting to eliminate the crystal glare while highlighting the bezel texture. Third, add a lifestyle context shot showing the watch on a wrist against a neutral background—this reduces perceived risk for buyers unfamiliar with the brand. Keep the white background for the main listing image per marketplace guidelines.

Notes

Multimodal input (image + text) lets Gemma 4 31B provide specific visual feedback grounded in the actual photo, not generic composition rules. The model references e-commerce best practices with concrete conversion data. Trade-off: vision capabilities are newer than text-only features, so highly technical image analysis may be less reliable than pure text tasks.

Prompt

Summarize this 90-minute board meeting video. Extract action items, decisions made, and unresolved questions. Flag any compliance concerns mentioned.

Output

Three decisions finalized: Q4 budget approved at $2.3M (15% under forecast), new VP of Engineering starts January 6th, customer data retention reduced from 5 years to 3 years per updated privacy policy. Action items: Legal to draft vendor contract amendments by Friday, Sarah to present revised hiring plan next meeting, Finance to model three acquisition scenarios by month-end. Unresolved: whether to pause the APAC expansion—board split 3-3, tabled until Q1 numbers arrive. Compliance flag: the data retention change requires user notification within 30 days under GDPR Article 13.

Notes

Video understanding across 90 minutes demonstrates Gemma 4 31B's extended context strength—most models lose coherence past 30-minute clips. The structured extraction format (decisions/actions/questions) makes output immediately actionable for meeting notes. Limitation: video processing costs stack quickly at $0.09 input per million tokens, so frequent video analysis becomes expensive compared to text-only workflows.

Use-case deep-dives

Multi-modal support ticket triage

When Gemma 4 31B handles screenshots and video clips at scale

A 12-person SaaS support team gets 200+ tickets daily, half with screenshots or screen recordings showing UI bugs. Gemma 4 31B is the right call here: it reads images and video natively at $0.09/Mtok input, so you can pipe the entire ticket—text, screenshot, 30-second clip—into one prompt without preprocessing. The 262k context window means you can include the last 10 exchanges from that customer's history for better routing. At 200 tickets/day with an average 8k tokens per ticket (including media), you're spending roughly $14/day on input tokens. If your team is under 100 tickets/day or tickets are text-only, a cheaper text-only model saves you 40% on input costs. Above 200/day with heavy media, this model keeps your triage accurate without needing separate vision pipelines.

Long-context legal document review

Why Gemma 4 31B works for contract comparison under budget

A 4-lawyer firm needs to compare incoming vendor contracts against a 180-page master template, flagging deviations in liability clauses. Gemma 4 31B fits: the 262k token window holds both documents in one pass (roughly 120k tokens for the pair), and at $0.09/Mtok input you're paying under $0.02 per comparison. Output is cheap at $0.34/Mtok when you're generating a 2k-token deviation summary. The model handles structured legal text well enough for first-pass review, though you'll want a human to verify high-stakes clauses. If you're reviewing more than 50 contracts/week or need guaranteed citation accuracy, consider a model with published legal benchmarks. Below that threshold, Gemma 4 31B delivers usable draft summaries at a fraction of the cost of manual review.

Video content moderation pipeline

When Gemma 4 31B becomes your first-pass video filter

A 20-person creator platform processes 800 user-uploaded videos daily for policy violations before publishing. Gemma 4 31B handles this: it ingests video directly, so you skip the frame-extraction step that older pipelines require. At $0.09/Mtok input, a 2-minute video (roughly 15k tokens of visual data) costs about $0.0014 to scan. The model flags obvious violations—nudity, violence, hate symbols—with enough accuracy that human reviewers only see the 12% flagged for secondary review, cutting moderation hours by 60%. If your volume is under 200 videos/day, batch processing with a cheaper text-only model on transcripts is more economical. Above 500/day with visual policy rules, Gemma 4 31B's native video understanding justifies the cost and keeps your moderation queue moving.

Frequently asked

Is Gemma 4 31B good for general text generation?

Yes, with a 262k token context window and multimodal support for text, images, and video, Gemma 4 31B handles long-form content well. The 31B parameter count sits in the mid-range sweet spot for quality without extreme compute costs. It's suitable for document analysis, content generation, and conversational tasks where you need reasonable intelligence at scale.

Is Gemma 4 31B cheaper than GPT-4o or Claude?

Significantly cheaper. At $0.09 input and $0.34 output per million tokens, Gemma 4 31B costs roughly 10-15x less than frontier models like GPT-4o or Claude Opus. For high-volume applications where you don't need absolute top-tier reasoning, the price difference makes it viable for production workloads that would bankrupt you on premium models.

Can Gemma 4 31B handle 262k tokens in practice?

The advertised 262k context window is there, but expect quality degradation past 100-150k tokens like most models. For retrieval tasks or summarizing long documents, it works. For complex reasoning across the full window, results vary. Test your specific use case before committing to workflows that depend on full-context coherence at maximum length.

How does Gemma 4 31B compare to Gemma 2 27B?

Without public benchmarks for Gemma 4 31B yet, direct comparison is speculative. The jump from 27B to 31B parameters suggests modest capability gains, and the multimodal support (video added) is new. If you're already using Gemma 2 27B successfully, Gemma 4 31B likely offers incremental improvements rather than a transformative leap.

Should I use Gemma 4 31B for production chatbots?

Depends on your quality bar. The pricing makes it economical for customer service bots handling thousands of conversations daily. The multimodal support helps if users send screenshots or videos. However, without published benchmarks, you're flying blind on accuracy versus alternatives. Run A/B tests against your current solution before full deployment.

Compare with

More language models

See all language models →

Data last verified 13 hours ago.Sources aggregated hourly to weekly. See docs/architecture/model-directory.md.