by Z.ai

GLM-5.2 review, pricing and limits

Z.ai's coding-first flagship with a 1-million-token context window, 744B MoE open weights, and MIT license: the strongest open-source model on SWE-bench Pro as of June 2026.

  • ga
  • open source
  • chat
  • GLM-5 family
checked

GLM-5.2 fits engineering teams running autonomous coding agents over large monorepos who want to avoid API vendor lock-in. It scores 80.3% on GPQA Diamond, the highest published result for an open-weights model, and its MIT license suits self-hosted or fine-tuned deployments. Skip it for voice or vision workloads, which need a separate model.

GLM-5.2 is Z.ai's flagship open-source coding model, released June 13, 2026, with a 1-million-token context window and MIT-licensed weights on HuggingFace. It leads open-weights models on SWE-bench Pro at 62.1%, ahead of every other MIT-licensed release as of mid-2026, and supports self-hosted or air-gapped deployment with no vendor API dependency.

Where it sits

  • $2.15/M$ per 1M tokensBlended price (3:1)Lower is better#35 / 64peer median $1.70/Mvendor price, checked by HokAI
  • 113 tok/stokens/sOutput speedHigher is better#15 / 39peer median 90 tok/scited: Artificial Analysis
  • 62.1%% solvedSWE-bench VerifiedHigher is better#24 / 28peer median 78.3%per source, see benchmark scores
  • 80.3%% correctGPQA DiamondHigher is better#28 / 44peer median 88.3%per source, see benchmark scores

Priced around the middle of the 64 GA models with a published price (rank 35), in the bottom third on SWE-bench Verified (rank 24 of 28), and one of 65 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 June 13, 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). 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.

On academic benchmarks, GLM-5.2 scores 91.72% on MMLU and 80.63% on MMLU-Pro, both ahead of its own GLM-5.1 predecessor. On coding, it reaches 81.0% on Terminal-Bench 2.1, up from GLM-5.1's 62.0%, without any increase in parameter count. Z.ai published no vendor benchmark sheet at launch, so every third-party score above comes from independent evaluators rather than a company-authored table.

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.

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. MIT-licensed weights are free to self-host; only GPU infrastructure costs apply.

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% vendor-reported · 13 Jun 2026 — General-knowledge exam across 57 subjects, % correct.
  • MMLU-Pro: 80.6% vendor-reported · 13 Jun 2026 — A harder version of the 57-subject knowledge exam, % correct.
  • AIME 2025: 86.7% vendor-reported · 13 Jun 2026 — Competition-level maths problems from the 2025 exam, % solved.
  • GPQA Diamond: 80.3% vendor-reported · 13 Jun 2026 — PhD-level science questions that are hard to search for, % correct.
  • SWE-bench Verified: 62.1% vendor-reported · 13 Jun 2026 — Real GitHub issues fixed end to end, % solved.
  • AA blended price: $0.9/M cited: Artificial Analysis · 16 Jun 2026 — Price per 1M tokens at a 3:1 input to output blend, as listed by Artificial Analysis.
  • Output speed: 113 tok/s cited: Artificial Analysis · 16 Jun 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 through the Z.ai API and providers like Fireworks AI, OpenRouter, AWS Bedrock, and Google Vertex AI. Prompt prefixes that hit the cache cost $0.26 per million tokens, an 81 percent discount. Self-hosting the MIT-licensed weights avoids API fees entirely, 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, both MIT-licensed with comparable context windows and higher published GPQA Diamond scores. Claude Opus 4.8 leads on raw coding benchmarks and compliance certifications but costs several times more per token and ships closed weights. Z.ai's own GLM-5.3 supersedes GLM-5.2 within the same lineup, though its benchmarks are not yet public.

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

Both are MIT-licensed open-weights models with roughly 1-million-token context windows, but DeepSeek-V4-Pro scores higher on GPQA Diamond, while GLM-5.2 charges a lower input-token price and is available on more managed platforms, including AWS Bedrock and Google Vertex AI. 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; pick GLM-5.2 if you need published, independently verified benchmark scores, since GLM-5.3's have not been released yet.

HokAI guides covering GLM-5.2

More AI Models on HokAI

Visit GLM-5.2 Official Page