by Z.ai

GLM-5.2 review, pricing and limits

Z.ai's previous-generation flagship: a 1-million-token context window, 744B MoE open weights and an MIT license, now succeeded by GLM-5.3.

  • ga
  • open source
  • chat
  • GLM-5 family
Visit website

GLM-5.2 fits engineering teams running autonomous coding agents over large monorepos who want open MIT weights and no API lock-in. Vals AI measures 85.6% on GPQA Diamond and 82.8% on SWE-bench Verified. Z.ai now offers GLM-5.3 as its newer flagship at the same API price. Skip GLM-5.2 for voice or vision workloads, which need a separate model.

What changed

  • · Release GLM-5.2 Released: 1M-Token Context and Dual Thinking Modes source
  • · Release GLM-5.1 Released: 200K Context and Coding Improvements source
  • · Release GLM-5 Initial Release: 744B MoE Foundation Model source

All changes across HokAI this week

GLM-5.2 is Z.ai's open-source coding model, released in June 2026, with a 1-million-token context window and MIT-licensed weights on HuggingFace. Vals AI measures it at 82.8% on SWE-bench Verified, and Artificial Analysis scores it 34 on its Intelligence Index. It supports self-hosted or air-gapped deployment, though Z.ai has since released GLM-5.3 as its newer flagship.

Where it sits

  • $2.15/M$ per 1M tokensBlended price (3:1)Lower is better#48 / 88peer median $1.70/Mvendor price, checked by HokAI
  • 95 tok/stokens/sOutput speedHigher is better#23 / 51peer median 92 tok/scited: Artificial Analysis
  • 82.8%% solvedSWE-bench VerifiedHigher is better#7 / 37peer median 76.5%per source, see benchmark scores
  • 85.6%% correctGPQA DiamondHigher is better#36 / 60peer median 87.6%per source, see benchmark scores

Priced around the middle of the 88 GA models with a published price (rank 48), in the top third on SWE-bench Verified (rank 7 of 37), and one of 82 whose vendor states it does not train on customer data.

Ranks are against GA models on HokAI that publish the same figure; ties share a rank.

Provider: Z.ai · Family: GLM-5

More about Z.ai on HokAI

Context window: 1,000,000 tokens · Max output: 131,072

Input modalities: text, tool-calls · Output: text, tool-calls

About GLM-5.2

GLM-5.2 is an open-source large language model from Z.ai (formerly Zhipu AI), released in June 2026 as the fourth model in the GLM-5 generation, following GLM-5 (February 2026), GLM-5-Turbo (March 2026), and GLM-5.1 (April 2026). Z.ai has since shipped GLM-5.3 as its newer flagship, so GLM-5.2 is now the previous generation rather than the current one. It uses a Mixture-of-Experts Transformer architecture with 744 billion total parameters and roughly 40 billion active per forward pass, trained on 28.5 trillion tokens, and ships under the MIT license, which permits unrestricted commercial use, modification, and redistribution.

Independent evaluator Vals AI measures GLM-5.2 at 82.8% on SWE-bench Verified, 85.6% on GPQA Diamond, 86.7% on MMLU-Pro and 67.8% on Terminal-Bench 2.1. BenchLM lists a provider-reported 81.0% on Terminal-Bench 2.1 and 62.1% on SWE-bench Pro, and the earlier 91.72% MMLU and 86.67% AIME 2025 figures come from BenchLM as well. On Artificial Analysis the model sits at 34 on Intelligence Index v4.3.2 and runs at about 95 output tokens per second. Z.ai published no vendor benchmark sheet at launch, so every score here comes from third-party evaluators, and the harnesses differ, which is why the same benchmark can show two figures.

The context window reaches 1 million tokens, five times GLM-5.1's window, using DeepSeek Sparse Attention in layers four through 78 to avoid the quadratic cost of full dense attention; the first three layers stay dense. Maximum output per response is 131,072 tokens, quadruple GLM-5.1's cap. Z.ai has not published independent needle-in-haystack recall results at full depth, so long-context accuracy past roughly 500K tokens is unverified.

GLM-5.2 is text-in, text-out: it supports function calling, structured JSON output, and streaming, but not native image, audio, or video input (vision is handled by the separate GLM-5V-Turbo model). It adds a dual thinking-effort system: High mode balances latency and quality for routine coding and review; Max mode runs extended chain-of-thought for architecture decisions and multi-step debugging where accuracy matters more than speed.

Z.ai aligns the model with supervised fine-tuning and reinforcement learning from human feedback; no Constitutional AI or equivalent documented method has been published. Weights are on HuggingFace in FP16, FP8, and NVFP4 formats plus community GGUF quantizations, with self-hosted VRAM needs from 241 GB (2-bit dynamic) to 476 GB (Q4_K_M). The Z.ai API is OpenAI-compatible, so teams on the OpenAI SDK can switch by changing the base URL and key; several managed cloud platforms carry it as well.

GLM-5.2 is the fourth Z.ai flagship in five months, and each release has widened context by a meaningful factor: 128K at GLM-5, 200K at GLM-5.1, and 1 million here. Z.ai is the first Chinese frontier AI lab listed on the Hong Kong Stock Exchange, which the company points to as capital continuity behind its roadmap of continued context scaling and multimodal support through the GLM-5V branch.

Where the alternatives win: DeepSeek-V4-Pro and Kimi K3 are the nearest open-weights rivals, and Claude Opus 4.8 is the pick when you need vendor compliance coverage and closed-model support rather than self-hosting. GLM-5.2 is also the wrong choice if you want Z.ai's newest coding gains, since Z.ai itself reports GLM-5.3 as a 50% improvement on its own Z.ai Code Bench. For a wider view of the field, see our guides on open models for local coding and how to run AI locally.

Pricing

$4.40 per 1M output tokens via the Z.ai API, with input pricing detailed in the cost FAQ below. Cached prompt prefixes cost $0.26 per 1M tokens, an 81% discount, and Z.ai lists cached-input storage as free for a limited time. [GLM-5.3](/hub/models/glm-5.3) lists the same $1.40 and $4.40 rates on the Z.ai pricing page. MIT-licensed weights are free to self-host; only GPU infrastructure costs apply. Compare per-token rates against other open-weights models before committing.

What a real job costs

JobInputOutputTotal
Summarise a 20-page PDF$0.042$0.0044$0.046
Support reply$0.0028$0.0013$0.0041
One coding agent run$0.280$0.088$0.368

Budgets: 20-page PDF = 30k in / 1k out · Support reply = 2k in / 300 out · Coding agent run = 200k in / 20k out. Computed from the vendor's per-token prices at render time; cached-input discounts are not applied.

Key Features

  • 1-Million-Token Context Window: Covers entire monorepos in a single request without retrieval chunking, using DeepSeek Sparse Attention to avoid quadratic scaling cost.
  • Dual Thinking Modes: High mode balances latency and quality for standard coding tasks; Max mode uses extended chain-of-thought for complex architecture and debugging.
  • MIT License with Open Weights: Full weights on HuggingFace in FP16, FP8, NVFP4, and GGUF formats, allowing self-hosting, air-gapped deployment, and unrestricted fine-tuning.
  • OpenAI-Compatible API: Drop-in replacement for OpenAI API calls by changing the base URL and key, with no SDK migration for existing GPT-based codebases.
  • 91.72% MMLU / 86.67% AIME 2025: General-knowledge and math-reasoning scores that place GLM-5.2 among the strongest open-weights models on academic benchmarks as of mid-2026.
  • 131K Max Output Tokens: Four times GLM-5.1's output cap, enabling full-file rewrites, long migration scripts, and multi-file diff generation in one response.

Pros

  • Strongest open-weights coding model as of June 2026: 62.1% SWE-bench Pro, top-of-class for MIT-licensed models.
  • 1M-token context at the lowest input price of any MIT-licensed frontier model makes it the most cost-efficient long-context option available.
  • MIT license and OpenAI-compatible API eliminate vendor lock-in and allow self-hosted, air-gapped, or fine-tuned deployments.

Cons

  • No native vision, audio, or video input; multimodal tasks require a separate GLM-5V-Turbo call or a different model.
  • No published SOC 2, HIPAA, or ISO 27001 certification, ruling it out for regulated healthcare, legal, or financial workloads.
  • 2.24s time-to-first-token is higher than latency-optimized smaller models, making it a poor fit for real-time interactive chat.

Benchmarks

  • MMLU: 91.7% independent · 07 Oct 2026 — General-knowledge exam across 57 subjects, % correct.
  • MMLU-Pro: 86.7% independent · 07 Oct 2026 — A harder version of the 57-subject knowledge exam, % correct.
  • AIME 2025: 86.7% independent · 07 Oct 2026 — Competition-level maths problems from the 2025 exam, % solved.
  • GPQA Diamond: 85.6% independent · 07 Oct 2026 — PhD-level science questions that are hard to search for, % correct.
  • SWE-bench Verified: 82.8% independent · 07 Oct 2026 — Real GitHub issues fixed end to end, % solved.
  • AA Intelligence Index: 34 independent · 07 Oct 2026 — Composite of 10 evaluations run by Artificial Analysis, 0 to 100.
  • AA blended price: $2.15/M independent · 07 Oct 2026 — Price per 1M tokens at a 3:1 input to output blend, as listed by Artificial Analysis.
  • Output speed: 95 tok/s independent · 07 Oct 2026 — Median tokens written per second as measured by Artificial Analysis.

A benchmark is an exam, not the job. Scores transfer unevenly between tasks, so weigh the one closest to your workload and read every figure with its source.

Frequently Asked Questions

How much does GLM-5.2 cost in 2026?

GLM-5.2 costs $1.40 per million input tokens and $4.40 per million output tokens on the Z.ai API pricing page, and Artificial Analysis lists the same rates. Cache-hit input costs $0.26 per million tokens, an 81 percent discount. Self-hosting the MIT-licensed weights avoids API fees, at the cost of your own GPU infrastructure.

Does GLM-5.2 have a free plan?

GLM-5.2 has no free API tier; Z.ai bills every request from the first token. The closest equivalent is self-hosting the MIT-licensed weights from HuggingFace, which carries no license fee, only the cost of your own GPU hardware.

Which tools compete with GLM-5.2 in 2026?

DeepSeek-V4-Pro and Kimi K3 are the closest open-weights rivals with comparable context windows. Claude Opus 4.8 offers vendor compliance coverage but ships closed weights and costs more per token. Z.ai's own GLM-5.3, released 18 August 2026, supersedes GLM-5.2 within the same lineup at the same listed API price.

What separates GLM-5.2 from DeepSeek-V4-Pro?

Both are open-weights models with roughly 1-million-token context windows, and the pair differ mainly on price and published benchmark scores, so check the current comparison table before choosing. Neither publishes an independent long-context recall benchmark past 500K tokens.

How do you get started with GLM-5.2?

For hosted use, create a Z.ai developer account, generate an API key, and point an OpenAI-compatible SDK at the Z.ai base URL. For self-hosting, download the MIT-licensed weights from HuggingFace's zai-org/GLM-5.2 repository and run them with vLLM on GPUs meeting the 241 GB minimum VRAM for a 2-bit quantization.

Top Alternatives

  • DeepSeek-V4-Pro: Pick GLM-5.2 for the lower input-token price and wider hosted availability across Bedrock, Vertex, and Fireworks; pick DeepSeek-V4-Pro for its higher GPQA Diamond score at a similar 1M-token context.
  • Kimi K3: Pick Kimi K3 if raw reasoning benchmark score matters most; pick GLM-5.2 for roughly half the input price and a standard, unmodified MIT license.
  • Claude Opus 4.8: Pick Claude Opus 4.8 if you need vendor SOC 2 and HIPAA coverage plus the higher coding benchmark score; pick GLM-5.2 for open MIT-licensed weights at a fraction of the input price.
  • GLM-5.3: Pick GLM-5.3 for Z.ai's newest coding- and cybersecurity-focused post-training at the same listed API price; pick GLM-5.2 only if you are already integrated and want a model with independently measured scores.

HokAI guides covering GLM-5.2

More AI Models on HokAI

Visit GLM-5.2 Official Page