GLM-5.2 vs gpt-oss-120b

GLM-5.2 (Z.ai Zhipu AI, June 2026) and gpt-oss-120b (OpenAI, August 2025), compared on price, context window, access and specs. gpt-oss-120b is the cheaper API at $0.03 in and $0.15 out per million tokens, about 15× 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

GLM-5.2

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.03on Hugging Face
Output, per 1M tokens
$1.80on DeepInfra
$0.15on Hugging FaceLowest
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
117B116,830,000,000
Training compute
Not listed
4.9 × 10²⁴ FLOP
Training hardware
Not listed
NVIDIA H100 SXM5 80GB
Confidence
Confident
Confident

Notes

Parameters
40 billion active
Total parameters: 116.83B
Training compute
Not listed
"The training run for gpt-oss-120b required 2.1 million H100-hours to complete" (2.1e6 hours)*(1,979 H100 FLOP/s)*(30% utilization)*(60*60) = 4.49e24 They also do post training similar to o3, which we assume adds at least 10% as much compute, so we multiply this estimate by 1.1 to get 4.94e24
Dataset size
Not listed
(pretraining FLOPs)/(6*5.1B 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-120b · Lowest list price: $0.03 in and $0.15 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-120b.

Questions people ask

Is GLM-5.2 better than gpt-oss-120b?

It depends on the job. For high-volume or budget workloads, gpt-oss-120b has the edge: lowest list price: $0.03 in and $0.15 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-120b. Try them on your own prompts in the AIPortalX playground before you commit.

Which is cheaper: GLM-5.2 or gpt-oss-120b?

gpt-oss-120b: $0.03 in and $0.15 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-120b takes 131K. A larger window lets one request hold longer documents or conversations.

Where can I use GLM-5.2 and gpt-oss-120b through one API?

DeepInfra, Hugging Face, OpenRouter and Google Vertex AI 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-120b in August 2025.

Other comparisons