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.
Starter is free forever - 1 Project, 100 credits/month, 1 MCP. No card.
Verdict
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
- 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
5 seats · 80 msgs/day
Switchy meters this against your org's shared credit pool - one plan, one balance for everyone.
Providers
| Provider | Context | Input | Output | P50 latency | Throughput | 30d uptime |
|---|---|---|---|---|---|---|
| 262k | $0.09/Mtok | $0.34/Mtok | — | — | — |
Performance
Benchmarks
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
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.
Review this pull request for security issues. Focus on authentication flows and data validation in the user registration endpoint.
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.
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.
Analyze this product photo and suggest three composition improvements to increase conversion rates for e-commerce listings.
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.
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.
Summarize this 90-minute board meeting video. Extract action items, decisions made, and unresolved questions. Flag any compliance concerns mentioned.
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.
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
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.
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.
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
- Google: Gemma 4 31B (free)google
- IBM: Granite 4.0 Microibm-granite
- IBM: Granite 4.2 8Bibm-granite
- Inception: Mercury 2inception
- Inception: Mercury 2.5inception
- inclusionAI: Ling 3.0 Flashinclusionai
- inclusionAI: Ling 3.0 Flash VLinclusionai
- inclusionAI: Ling 3.1 Flashinclusionai
- Inference.net: Schematron V2 Smallinference-net
- Inference.net: Schematron V2 Turboinference-net
- LiquidAI: LFM2.5-24B-A2Bliquid
- LiquidAI: LFM2.5-2.6B (free)liquid