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...
Model details →Google: Gemma 4 31B (batch) vs xAI: Grok Code Fast 1
Google: Gemma 4 31B (batch) wins on 3 of 6 axes — pricing and capability skew in its favour for most workloads.
Grok Code Fast 1 is a speedy and economical reasoning model that excels at agentic coding. With reasoning traces visible in the response, developers can steer Grok Code for high-quality work flows.
Model details →Side-by-side comparison
| Capability | Google: Gemma 4 31B (batch) | xAI: Grok Code Fast 1 | Winner |
|---|---|---|---|
| Context window Maximum number of input tokens the model can attend to in a single request. | 262K | 256K | 🏆 Google: Gemma 4 31B (batch) |
| Input price (per 1M) Cost per million input tokens billed by the provider. | $0.39 | $0.20 | 🏆 xAI: Grok Code Fast 1 |
| Output price (per 1M) Cost per million output tokens billed by the provider. | $0.97 | $1.50 | 🏆 Google: Gemma 4 31B (batch) |
| Tool / function calling First-class support for emitting structured tool calls. | Yes | Yes | Tie |
| Vision input Accepts image inputs alongside text. | Yes | — | 🏆 Google: Gemma 4 31B (batch) |
| Reasoning mode Internal chain-of-thought / extended-thinking support. | Yes | Yes | Tie |
Frequently asked questions
Is Google: Gemma 4 31B (batch) better than xAI: Grok Code Fast 1?
Google: Gemma 4 31B (batch) wins on 3 of 6 axes — pricing and capability skew in its favour for most workloads.
What's the price difference between Google: Gemma 4 31B (batch) and xAI: Grok Code Fast 1?
Input: $0.39 vs $0.20 per 1M tokens. Output: $0.97 vs $1.50 per 1M tokens.
What context windows do Google: Gemma 4 31B (batch) and xAI: Grok Code Fast 1 support?
Google: Gemma 4 31B (batch) supports up to 262K tokens. xAI: Grok Code Fast 1 supports up to 256K tokens.
Do both Google: Gemma 4 31B (batch) and xAI: Grok Code Fast 1 support tool calling?
Google: Gemma 4 31B (batch): yes. xAI: Grok Code Fast 1: yes.