GLM-5.2 vs gpt-oss-20b
GLM-5.2 (Z.ai Zhipu AI, June 2026) and gpt-oss-20b (OpenAI, August 2025), compared on price, context window, access and specs. gpt-oss-20b is the cheaper API at $0.018 in and $0.09 out per million tokens, about 24× less than GLM-5.2 on a typical 3:1 input-to-output mix. GLM-5.2 reads more at once: a 1M-token context window against 131K.
Updated 5 December 2026 · read each row across; the best value in a row is marked
Z.ai Zhipu AI
At a glance
- Released
- 16 June 2026
- 5 August 2025
- Access
- Open weights (unrestricted)
- Open weights (unrestricted)
- Country
- China
- United States of America
Price and API
- Input, per 1M tokens
- $0.007on OpenRouterLowest
- $0.018on Hugging Face
- Output, per 1M tokens
- $1.80on DeepInfra
- $0.09on Hugging FaceLowest
- Where to run it
- DeepInfraHugging FaceOpenRouterAlibaba Cloud Model StudioAll 10 providersMost choice
- Hugging FaceDeepInfraAmazon BedrockGroqAll 6 providers
- Official API id
alibaba/glm-5.2- Not listed
- Context window
- 1M tokensLargest
- 131K tokens
- Max output
- 131K tokens
- 131K tokens
- Takes
- Text
- Text
- Returns
- Text
- Text
- Knowledge cutoff
- Not listed
- June 2024
- Supports
- ReasoningTool callingStructured outputOpen weights
- ReasoningTool callingStructured outputOpen weights
Scale and training
- Parameters
- 744B744,000,000,000Largest
- 21B20,910,000,000
- Training compute
- Not listed
- 5.5 × 10²³ FLOP
- Training hardware
- Not listed
- NVIDIA H100 SXM5 80GB
- Confidence
- Confident
- Confident
Notes
- Parameters
- 40 billion active
- Total parameters: 20.91B
- Training compute
- Not listed
- "The training run for gpt-oss-120b required 2.1 million H100-hours to complete, with gpt-oss-20b needing almost 10x fewer" assuming "almost 10x fewer" means ~9x fewer: 4.94e24/9 = 5.49e23
- Dataset size
- Not listed
- (pretraining FLOPs)/(6*3.6B active parameters)
In their own words
- Abstract
We're introducing GLM-5.2, our latest flagship model for long-horizon tasks. It marks a substantial leap in long-horizon task capability over its predecessor GLM-5.1 and, for the first time, delivers that capability on a solid 1M-token context. GLM-5.2's new capabilities include: Solid 1M Context: A solid 1M-token context that stably sustains long-horizon work Advanced Coding with Flexible Effort: Stronger coding capabilities with multiple thinking effort levels to balance performance and latency Improved Architecture: We propose IndexShare, which reuses the same indexer across every four sparse attention layers, reducing per-token FLOPs by 2.9× at a 1M context length. We also improve GLM-5.2’s MTP layer for speculative decoding, increasing the acceptance length by up to 20% Pure Open: An MIT open-source license — no regional limits, technical access without bordersRead all
- Not listed
Which should you pick?
- High-volume or budget workloads
- gpt-oss-20b · Lowest list price: $0.018 in and $0.09 out per million tokens via Hugging Face.
- Long documents, codebases or transcripts
- GLM-5.2 · 1M tokens of context, 7.6× more than gpt-oss-20b.
Questions people ask
Is GLM-5.2 better than gpt-oss-20b?
It depends on the job. For high-volume or budget workloads, gpt-oss-20b has the edge: lowest list price: $0.018 in and $0.09 out per million tokens via Hugging Face. For long documents, codebases or transcripts, GLM-5.2 has the edge: 1M tokens of context, 7.6× more than gpt-oss-20b. Try them on your own prompts in the AIPortalX playground before you commit.
Which is cheaper: GLM-5.2 or gpt-oss-20b?
gpt-oss-20b: $0.018 in and $0.09 out per million tokens at Hugging Face. GLM-5.2 starts at $0.56 in and $1.80 out per million tokens. These are list prices from the cheapest provider we track, and they change often.
Which has the bigger context window?
GLM-5.2, with 1M tokens; gpt-oss-20b takes 131K. A larger window lets one request hold longer documents or conversations.
Where can I use GLM-5.2 and gpt-oss-20b through one API?
DeepInfra, Hugging Face and OpenRouter serve all of them, so you can switch models without opening another account.
When were they released?
GLM-5.2 in June 2026 and gpt-oss-20b in August 2025.