google/gemma-4-31b-itOpen WeightsLargest Gemma 4 instruction model for open, self-hosted chat and reasoning
Benchmark Pricing$0.22 / 1M in$0.39 / 1M out
Context: 262,144 tokens•Max Output: 32,768 tokens•Knowledge: 2025-01•Released: 2026-04-02
TECHNICAL SPECIFICATIONS
Context Window262,144262.1K tokens
Max Output32,76832.8K tokens
LicenseOpen SourceSelf-hostable
Input Modalities
TextVision
Function / Tool CallingSupported (MCP Ready)
Structured OutputsGuaranteed Schema
MODEL CONTEXT PROTOCOL (MCP) READINESS
✓ Gemma 4 31B IT natively supports OpenAI / Anthropic format tool calling and is fully compatible with MCP servers and agent loops.
MCP Context Window Recommendations
With a context capacity of 262,144 tokens, this model can handle moderately large MCP tool definitions and multi-turn conversation logs comfortably.
API CALL INVOCATION EXAMPLE
// Example: Calling Gemma 4 31B IT via OpenAI SDK
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.GOOGLE_API_KEY,
});
const response = await client.chat.completions.create({
model: "google/gemma-4-31b-it",
messages: [{ role: "user", content: "Hello! Can you inspect MCP tools?" }],
});
console.log(response.choices[0].message.content);PRICING BY PROVIDER
Cortecsgemma-4-31b-it
$0.22 / $0.39
AMDGemma-4-31B-IT
$0.00 / $0.00$0.00 cache
NanoGPTgemma-4-31b-it-darkidol
$0.10 / $0.45$0.05 cache
Novita AIgoogle/gemma-4-31b-it
$0.14 / $0.40
ai&google/gemma-4-31b-it
$0.20 / $0.50$0.05 cache
Lilacgoogle/gemma-4-31b-it
$0.11 / $0.35
LLM Gatewaynovita/gemma-4-31b-it
$0.14 / $0.40
QVACgemma4-31b
$0.00 / $0.00
Friendligoogle/gemma-4-31B-it
$0.14 / $0.40
AI/ML APIgoogle/gemma-4-31b-it
$1.36 / $2.05$1.36 cache
Venice AIgoogle-gemma-4-31b-it
$0.12 / $0.36$0.09 cache
Abacusgoogle/gemma-4-31b-it
$0.14 / $0.40
Vercel AI Gatewaygoogle/gemma-4-31b-it
$0.14 / $0.40
UnoRoutergemma-4-31b-it:free
$0.00 / $0.00
Merge Gatewaygoogle/gemma-4-31b-it
$0.14 / $0.40
Rates in USD per 1M tokens. Rates synchronized from models.dev public catalog.
MODEL RESOURCES
More Models by Google
Alternative and family models from the same lab
Gemini 3.6 Flash
google/gemini-3.6-flash•Google
Fast Gemini model balancing multimodal reasoning, tool use, and cost
65.5K out maxVisionPDFSWE-Bench Pro: 58.7 resolve rate
In: $0.75 • Out: $3.75
GoogleGemini 2.5 Flash
google/gemini-2.5-flash•Google
Fast Gemini workhorse for multimodal apps where latency and price matter
65.5K out maxVisionPDFAider Polyglot: 55.1 percent correct
In: $0.30 • Out: $2.50
GoogleGemini Omni 1.1 Flash
google/gemini-omni-1.1-flash•Google
Video generation and editing model for scene extension, frame interpolation, and reference-guided multimodal control
57.9K out maxVision
In: $1.52 • Out: $9.09
Google