Gemma 4 31B IT vs Grok 4.7
Gemma 4 31B IT (Google DeepMind, April 2026) and Grok 4.7 (xAI, September 2026), compared on price, context window, access and specs. They cost the same: free. Grok 4.7 reads more at once: a 500K-token context window against 262K. Gemma 4 31B IT has open weights, so you can also run it on your own hardware.
Updated 5 December 2026 · read each row across; the best value in a row is marked
Google DeepMind
At a glance
- Tasks
Language modeling
Language generation
Question answering
Language modeling
Language generation
Question answering
- Released
- 2 April 2026
- 21 September 2026
- Access
- Open weights (restricted use)
- API access
- Country
- United States of America
- United States of America
Price and API
- Input, per 1M tokens
- $0on Google AI StudioLowest
- $2.00on xAI
- Output, per 1M tokens
- $0on Google AI StudioLowest
- $6.00on xAI
- Where to run it
- Google AI StudioDeepInfraAmazon BedrockOpenRouterAll 6 providersMost choice
- xAIGoogle Vertex AIAmazon BedrockAzure AI FoundryAll 5 providers
- Official API id
google/gemma-4-31b-itxai/grok-4.7- Context window
- 262K tokens
- 500K tokensLargest
- Max output
- 33K tokens
- 500K tokensLargest
- Takes
- Text, Image
- Text, Image, PDF
- Returns
- Text
- Text
- Knowledge cutoff
- Not listed
- May 2026
- Supports
- ReasoningTool callingStructured outputFile inputOpen weights
- ReasoningTool callingStructured outputFile input
Scale and training
- Parameters
- 31B31,000,000,000Largest
- 2.1B2,100,000,000
- Confidence
- Likely
- Likely
Notes
- Parameters
- Not listed
- Not confirmed in official release but Elon said "Grok 4.7 will be the 2.1T model released a few weeks later. This will be better than 4.6 in every way, except slightly slower to serve, albeit with even better token efficiency." on July 28, 2026. On Sepetember 14 he said "It’s unequivocally better than the 2.1T that was trained with Jax [...]", which presumably refers to 4.7's size.
In their own words
- Abstract
We introduce Gemma 4, a new generation of open-weight, natively multimodal language models in the Gemma model family. Designed to advance compute efficiency and reasoning, the Gemma 4 model suite features dense and Mixture-of-Experts architectures, ranging from 2.3B to 31B parameters. Alongside improved vision and audio encoders for all model sizes, we propose a unified, encoder-free architecture for our 12B model, which ingests raw audio and image patches. Furthermore, we integrate a thinking mode, enabling Gemma models to generate reasoning traces prior to responding. We improve inference speed, memory, and compute efficiency, as well as long-context abilities through critical design choices. Gemma 4 establishes a leap in performance across STEM, multimodal, and long-context benchmarks, and rivals larger, frontier open models in human-rated tasks.Read all
Grok 4.7 is our most capable model for coding and knowledge work. It works longer on difficult tasks, checks its own work more carefully, and comes with our best-calibrated safeguards to date. Served at the same price and speed as Grok 4.6, it is highly competitive in its class.Read all
- Authors
- Sherif El Abd, Vaibhav Aggarwal, Robin Algayres, Alek Andreev, Olivier Bachem, Ian Ballantyne, Cormac Brick, Victor Cărbune and 314 more
- Not listed
Which should you pick?
- Long documents, codebases or transcripts
- Grok 4.7 · 500K tokens of context, 91% more than Gemma 4 31B IT.
- Long answers in one response
- Grok 4.7 · Up to 500K output tokens per response.
- Self-hosting or fine-tuning
- Gemma 4 31B IT · Open weights: you can download them and run them on your own GPUs.
Questions people ask
Is Gemma 4 31B IT better than Grok 4.7?
It depends on the job. For long documents, codebases or transcripts, Grok 4.7 has the edge: 500K tokens of context, 91% more than Gemma 4 31B IT. For long answers in one response, Grok 4.7 has the edge: up to 500K output tokens per response. For self-hosting or fine-tuning, Gemma 4 31B IT has the edge: open weights: you can download them and run them on your own GPUs. Try them on your own prompts in the AIPortalX playground before you commit.
Which is cheaper: Gemma 4 31B IT or Grok 4.7?
They are priced the same, at free.
Which has the bigger context window?
Grok 4.7, with 500K tokens; Gemma 4 31B IT takes 262K. A larger window lets one request hold longer documents or conversations.
Where can I use Gemma 4 31B IT and Grok 4.7 through one API?
Amazon Bedrock and OpenRouter serve all of them, so you can switch models without opening another account.
When were they released?
Gemma 4 31B IT in April 2026 and Grok 4.7 in September 2026.