Gemma 4 31B IT
Gemma 4 31B Instruct is Google DeepMind's 30.7B dense multimodal model supporting text and image input with text output.
gemma-4-31b-itReleased 2 Apr 2026 (Apr 2026)Where to run it
14 hosts serve Gemma 4 31B IT. The comparison is on blended price, 3 parts input to 1 part output.
| Host | In / out per 1M | Model id | |
|---|---|---|---|
Google AI StudioLab API gemma-4-31b-it | - | gemma-4-31b-it | |
W&B InferenceInference gemma-4-31B-it | $0.10 / $0.34 | gemma-4-31B-it | |
AIHubMixGateway gemma-4-31b-it | $0.14 / $0.40 | gemma-4-31b-it | |
SailCloud Gemma-4-31B-IT-NVFP4 | $0.14 / $0.40 | Gemma-4-31B-IT-NVFP4 | |
FriendliAIInference gemma-4-31B-it | $0.14 / $0.40 | gemma-4-31B-it | |
GMI CloudInference gemma-4-31b-it | $0.14 / $0.40 | gemma-4-31b-it | |
Novita AIInference gemma-4-31b-it | $0.14 / $0.40 | gemma-4-31b-it | |
LibertAICloud gemma-4-31b-it | $0.15 / $0.40 | gemma-4-31b-it | |
TensormeshCloud gemma-4-31B-it | $0.14 / $0.56 | gemma-4-31B-it | |
DeepInfraInference gemma-4-31B-it | $0.20 / $0.40 | gemma-4-31B-it | |
ai&Cloud gemma-4-31b-it | $0.20 / $0.50 | gemma-4-31b-it | |
Together AIInference gemma-4-31B-it | $0.39 / $0.97 | gemma-4-31B-it | |
SambaNovaInference gemma-4-31B-it | $0.38 / $1.15 | gemma-4-31B-it | |
NVIDIA NIMInference gemma-4-31b-it | - | gemma-4-31b-it |
Show 1 more listings: regions, snapshots and variantsHide regional listings
| Sail | |||||||
| Alias gemma-4-31B-it | $0.40 / $0.60 | gemma-4-31B-it | |||||
Capabilities
Core
- Streaming
- Function calling
- JSON mode
- Structured outputs
Multimodal
- Vision
- Image input
- Audio
- Image generation
- Video
Advanced
- Reasoning
- Tool calling
- MCP
- Prompt caching
- Batch API
- Embeddings
- Takes in
- TextImages
- Produces
- Text
- Open weights
- License: Gemma LicenseRuntimes: Ollama, llama.cpp, vLLM
Similar models
This model has no listed price, so these are current models with similar capabilities.
Smaller Google models
Other frontier labs
Open-weight picks
Call it
Using Google AI Studio's API.
from google import genai
client = genai.Client() # reads GEMINI_API_KEY
response = client.models.generate_content(model="gemma-4-31b-it", contents="Hello")
print(response.text)curl "https://generativelanguage.googleapis.com/v1beta/models/gemma-4-31b-it:generateContent" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"contents": [{"parts": [{"text": "Hello"}]}]}'from litellm import completion
response = completion(
model="gemini/gemma-4-31b-it",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)Quick answers
How much does Gemma 4 31B IT cost?
Its lowest listed price is at W&B Inference: $0.10 per million input tokens and $0.34 per million output tokens.
Which APIs offer Gemma 4 31B IT?
Gemma 4 31B IT runs on 14 APIs: Google AI Studio, W&B Inference, AIHubMix, Sail, FriendliAI, GMI Cloud, Novita AI, LibertAI, Tensormesh and 5 more.
What is Gemma 4 31B IT's context window?
262K tokens, with up to 33K tokens in one reply.
Is Gemma 4 31B IT being retired?
No retirement date is scheduled for it on any API we track.
When was Gemma 4 31B IT released?
Google released it on 2 Apr 2026.
What is Gemma 4 31B IT's API model id?
Use gemma-4-31b-it with Google AI Studio. Other hosts use their own ids: gemma-4-31B-it on W&B Inference, Gemma-4-31B-IT-NVFP4 on Sail, gemma-4-31B-it on FriendliAI, gemma-4-31B-it on Tensormesh.
Sources
- Sail pricing
- DeepInfra pricing
- FriendliAI pricing
- SambaNova pricing
- Tensormesh pricing
- Together AI pricing
- W&B Inference pricing
- ai& pricing
- AIHubMix pricing
- Google AI Studio pricing
- GMI Cloud pricing
- LibertAI pricing
- Novita AI pricing
- NVIDIA NIM pricing
- LiteLLM model map
Raw catalog entry for gemma-4-31b-it on Google AI Studio
{
"input_cost_per_token": 0,
"output_cost_per_token": 0,
"litellm_provider": "gemini",
"max_input_tokens": 262144,
"max_output_tokens": 32768,
"mode": "chat",
"supports_function_calling": true,
"supports_reasoning": true,
"supports_response_schema": true,
"supports_system_messages": true,
"supports_tool_choice": true,
"supports_vision": true,
"source": "https://ai.google.dev/gemini-api/docs/pricing"
}