Spiral gives your agent every tool with one account. Browse the tools →

Gemma 4 31B vs GLM 5.2 (Comparative Analysis)

Loading comparison form...
Comparative Analysis: Gemma 4 31B vs. GLM 5.2
Want to try out these models side by side?Sign up for Spiral

Overview

Gemma 4 31B was released 2 months before GLM 5.2.
Gemma 4 31BGemma 4 31B
GLM 5.2GLM 5.2
Model Provider
The organization behind this AI's development
Google logoGoogle
Z.AI logoZ.AI
Input Context Window
Maximum input tokens this model can process at once
262.1K
tokens
1M
tokens
Output Token Limit
Maximum output tokens this model can generate at once
16.4K
tokens
943.7K
tokens
Release Date
When this model first became publicly available
April 2nd, 2026
June 16th, 2026

Capabilities & Features

Compare supported features, modalities, and advanced capabilities
Gemma 4 31B
GLM 5.2
Input Types
Supported input formats
🖼️Image📝Text🎬Video
📝Text
Reasoning Controls
Defaults and configurable reasoning effort
Optional
Enabled by defaultEffort: Extra High, High, NoneDefault: High
Output Types
Supported output formats
📝Text
📝Text
Tokenizer
Text encoding system
GemmaOther
Key Features
Advanced capabilities
✓Function Calling✓Structured Output✓Reasoning ModeContent Moderation
✓Function Calling✓Structured Output✓Reasoning ModeContent Moderation
Open Source
Model availability
Available on HuggingFace →Available on HuggingFace →

Pricing

Gemma 4 31B is roughly 28.6x more expensive compared to GLM 5.2 for input tokens and roughly 0.07x less expensive for output tokens.
Gemma 4 31BGemma 4 31B
GLM 5.2GLM 5.2
Input Token Cost
Cost per million input tokens
$0.20
per million tokens
$0.0070
per million tokens
Output Token Cost
Cost per million output tokens
$0.40
per million tokens
$5.80
per million tokens
Cache Read Cost
Cost to reuse cached input tokens
Not specified
$0.0060
per million tokens

Benchmarks

Compare relevant benchmarks between Gemma 4 31B and GLM 5.2.
Gemma 4 31BGemma 4 31B
GLM 5.2GLM 5.2
Intelligence Index
Overall model quality across independent evaluations
4
(Artificial Analysis index; higher is better)
Benchmark not available.
Best Design Arena Score
Highest human-preference Elo score across design arenas
Benchmark not available.
1,328 Elo
(#30 in Code Categories (50.3% win rate))

At a Glance

Quick overview of what makes Gemma 4 31B and GLM 5.2 unique.
Google logoGemma 4 31B by Google understands both text and images, analyzes video, can use external tools and APIs, offers advanced reasoning, generates structured data. It can handle standard conversations with its 262.1K token context window. Very affordable at $0.20/M input and $0.40/M output tokens. Released April 2nd, 2026.
Z.AI logoGLM 5.2 by Z.AI can use external tools and APIs, offers advanced reasoning, generates structured data. It can handle standard conversations with its 1M token context window. Reasonably priced at $0.0070/M input and $5.80/M output tokens. Released June 16th, 2026.

Explore More Comparisons

Compare your models with top performers across different categories