Skip to content
OpenKey

Gemini 3.1 Pro Preview vs GLM 5

GoogleZ.aiboth via one key, provider price + 3%

Gemini 3.1 Pro Preview (Google, released 2026-02-19) and GLM 5 (Z.ai, released 2026-02-11, open-source) both target agentic coding and systems-design work, but they land in different price and capability tiers. Gemini is multimodal with a 1,048,576-token context window; GLM 5 is text-only with 202,752 tokens but costs a fraction as much per token. Both run through OpenKey with one API key and a flat 3% fee on top of provider list price.

Spec vs spec

SpecGemini 3.1 Pro PreviewGLM 5
Context window1.0M203K
Max output66K
Input modalitiesaudio, file, image, text, videotext
Output modalitiestexttext
ReleasedFeb 19, 2026Feb 11, 2026
Reasoningalways onoptional

Pricing

Per 1M tokens. Provider price plus the flat 3% fee — the sum is what you pay.

openkey.ai

google/gemini-3.1-pro-preview

Input · 1M tokens

$2.00 + 3%$2.06

Output · 1M tokens

$12.00 + 3%$12.36

Cache read · 1M tokens

$0.200 + 3%$0.206

Cache write · 1M tokens

$0.375 + 3%$0.386

FEE — FLAT, EVERY MODEL3%

openkey.ai

z-ai/glm-5

Input · 1M tokens

$0.600 + 3%$0.618

Output · 1M tokens

$1.92 + 3%$1.98

Cache read · 1M tokens

$0.120 + 3%$0.124

FEE — FLAT, EVERY MODEL3%

One workload, priced on both

10M input + 2M output tokens at each model's price, flat 3% fee included.

google/gemini-3.1-pro-preview

$45.32

$44.00 provider + 3%

z-ai/glm-5Cheaper

$10.14

$9.84 provider + 3%

Benchmarks

Design Arena categories where both models have results. Higher Elo and lower rank win.

Gemini 3.1 Pro PreviewGLM 5
CategoryEloRankEloRank
3D1303#171307#15
androidnative1059#251244#6
ASCII art1314#41192#26
Code1290#181295#16
Data viz1270#201269#22
Full-stack1139#161190#13
Game dev1264#261299#15
godotgamedev1220#61237#3
Mobile apps1176#221222#10
SVG1347#21225#19
UI components1322#81287#21
Websites1294#151290#18

Head-to-head preference voting. How we filter and rank

Pricing math

Gemini 3.1 Pro Preview costs $2.00/M input and $12.00/M output at provider rates; on OpenKey that's $2.06/M and $12.36/M after the 3% fee ($2.00 × 1.03, $12.00 × 1.03). GLM 5 costs $0.60/M input and $1.92/M output provider-side, or $0.618/M and $1.9776/M on OpenKey. Run the numbers on a 10M-input / 2M-output workload: Gemini 3.1 Pro Preview costs $44.00, GLM 5 costs $9.84 — Gemini is 3.33x more expensive on input tokens alone. If your workload is cost-sensitive and doesn't need Gemini's context or multimodality, GLM 5 is the clear pick.

Agentic and coding benchmarks

On Design Arena's agent-focused categories, GLM 5 comes out ahead more often than not: fullstack (rank 13, elo 1190 vs Gemini's rank 16, elo 1139), godotgamedev (rank 3, elo 1237 vs rank 6, elo 1220), mobileapps (rank 10, elo 1222 vs rank 22, elo 1176), and androidnative (rank 6, elo 1244 vs rank 25, elo 1059). Gemini also carries an artificial_analysis coding_index of 68.8 and agentic_index of 21.4 — no equivalent artificial_analysis scores exist for GLM 5 in this data, so that comparison stops there. For agent-style coding tasks specifically, GLM 5's Design Arena numbers are hard to ignore given the price gap.

Model-quality categories where Gemini leads

Flip to the general model-quality categories and Gemini 3.1 Pro Preview pulls ahead: svg (rank 2, elo 1347 vs GLM 5's rank 19, elo 1225), asciiart (rank 4, elo 1314 vs rank 26, elo 1192), uicomponent (rank 8, elo 1322 vs rank 21, elo 1287), and website (rank 15, elo 1294 vs rank 18, elo 1290). Dataviz is close — Gemini rank 20 (elo 1270) vs GLM 5 rank 22 (elo 1269). Gemini also holds an artificial_analysis intelligence_index of 46.5. If your work leans toward visual or UI-generation quality rather than agent workflows, Gemini's numbers hold up better.

Context and modality

Gemini 3.1 Pro Preview handles text, image, audio, video, and file input with a 1,048,576-token context window and up to 65,536 output tokens. GLM 5 is text-only in and out, with a 202,752-token context window — Gemini's window is 5.17x larger. If your workload involves documents beyond roughly 200K tokens, video/audio input, or mixed-media prompts, GLM 5 simply can't serve it regardless of price. GLM 5 does expose more sampling controls (top_k, min_p, logit_bias, logprobs, repetition_penalty) that Gemini's parameter list doesn't include, which matters for fine-grained generation control.

Which model for which job

Use casePickWhy
Budget-constrained coding agentGLM 5$9.84 vs $44.00 on a 10M-in/2M-out workload, and it beats Gemini on fullstack, godotgamedev, mobileapps, and androidnative
Long-document analysis (500K+ tokens)Gemini 3.1 Pro Preview1,048,576-token context vs GLM 5's 202,752 — 5.17x larger window
Multimodal input (image/audio/video)Gemini 3.1 Pro PreviewGLM 5 is text-only in and out; Gemini accepts audio, file, image, text, and video
SVG or ASCII-art generationGemini 3.1 Pro PreviewRanks 2 on svg (elo 1347) and 4 on asciiart (elo 1314) vs GLM 5's ranks 19 and 26
Android-native app generationGLM 5Rank 6 (elo 1244, 62% win rate) vs Gemini's rank 25 (elo 1059, 39.2% win rate)
Fine-grained sampling controlGLM 5Supports top_k, min_p, logit_bias, logprobs, repetition_penalty — not in Gemini's parameter list

Questions

Is GLM 5 cheaper than Gemini 3.1 Pro Preview?
Yes. GLM 5 is $0.618/M input and $1.9776/M output on OpenKey versus Gemini's $2.06/M input and $12.36/M output. On a 10M-input/2M-output workload, GLM 5 costs $9.84 total against Gemini's $44.00 — a 3.33x gap on input pricing alone.
Which model wins on agentic coding benchmarks?
GLM 5, on most Design Arena agent categories: fullstack (rank 13 vs rank 16), godotgamedev (rank 3 vs rank 6), mobileapps (rank 10 vs rank 22), and androidnative (rank 6 vs rank 25). Gemini's artificial_analysis agentic_index of 21.4 has no directly comparable GLM 5 figure in this data.
Does GLM 5 support image or video input?
No. GLM 5 is text-to-text only. Gemini 3.1 Pro Preview accepts audio, file, image, text, and video input, which makes it the only option of the two for multimodal workloads.
How much bigger is Gemini's context window?
Gemini 3.1 Pro Preview offers 1,048,576 tokens of context versus GLM 5's 202,752 tokens — a 5.17x ratio. That matters for large codebases or long documents that exceed GLM 5's window.

Go deeper