GLM-5.2

Z.ai · GLM

Z.ai's 1M-context MIT-licensed open-weight flagship for coding and long-horizon agent work.

Part of GLM family · Other versions: GLM-5.1 , GLM-5
Type
language
Context
1M tokens
Max Output
N/A
Status
current
Input
$1.4/1M tok
Output
$4.4/1M tok
API Access
Yes
License
MIT
chinese reasoning coding agentic tool-use long-context open-weights flexible-effort sparse-attention
Released June 2026 · Updated July 10, 2026

Overview

Freshness note: Model capabilities, limits, and pricing can change quickly. This profile is a point-in-time snapshot last verified on July 10, 2026.

GLM-5.2 is Z.ai’s current flagship for long-horizon coding, reasoning, and agentic execution. Released on June 16, 2026, it extends the GLM line to a 1M-token context window while keeping both hosted API access and MIT-licensed public weights.

The model is text-only rather than multimodal. Its role is sustained engineering and tool work: large repositories, multi-step agent loops, long documents, and tasks where the model must preserve state across extended execution rather than solve a single isolated prompt.

Capabilities

Z.ai emphasizes coding, complex tool use, long-horizon planning, and bilingual Chinese-English work. GLM-5.2 supports flexible reasoning effort, allowing applications to spend more inference on difficult tasks and use lighter settings for routine work. Z.ai’s Coding Plan also exposes High and Max effort choices.

The 1M context makes the model relevant for repository-wide analysis and large document sets, but long context is still a capacity feature rather than a guarantee that every token will be used equally well. Retrieval, file selection, tests, and review checkpoints remain important in production agents.

Technical Details

Official anchors at this snapshot:

  • 1,000,000-token context window.
  • 753B-parameter official Hugging Face artifact.
  • Public weights under the permissive MIT license.
  • IndexShare, which reuses one indexer across groups of sparse-attention layers.
  • Improved multi-token prediction for speculative decoding.
  • Multiple reasoning-effort levels for different latency and quality budgets.

Z.ai reports that IndexShare reduces per-token FLOPs by 2.9× at 1M context and that the multi-token-prediction changes improve accepted speculative length by up to 20%. These are provider-reported architecture claims, not independent serving benchmarks.

No durable production maximum-output limit specific to GLM-5.2 is published in the official materials checked. Here, maxOutput: 0 means that no separate limit is published. Generation lengths shown in evaluations are not treated as API ceilings.

Pricing & Access

Z.ai’s current direct API pricing per 1M tokens is:

  • Input: $1.40.
  • Cached input: $0.26.
  • Output: $4.40.

Access is available through Z.ai’s API, chat and coding surfaces, Coding Plan, and the official Hugging Face release. The MIT license makes the weights comparatively straightforward for commercial self-managed deployments, although operating a 753B-parameter model still requires substantial infrastructure.

Best Use Cases

Choose GLM-5.2 for long-running coding agents, repository-scale analysis, bilingual Chinese-English engineering work, and private or customized deployments that benefit from MIT-licensed weights. It is particularly relevant when a team wants both an official hosted route and the option to own the serving layer.

It is less suitable for multimodal tasks, laptop-scale local inference, or small bounded jobs where a faster and cheaper model is sufficient. The large context should be budgeted carefully because input volume still affects latency and cost.

Comparisons

  • GLM-5.1: Older active GLM tier with a 203K context; 5.2 is the current long-context reference and adds the new sparse-attention architecture.
  • MiniMax M3: Lower-priced 1M-context peer with image and video input; GLM-5.2 offers the more permissive MIT license.
  • DeepSeek V4 Pro: Another 1M-context open-weight coding route with lower direct token prices; GLM-5.2 emphasizes flexible effort and MIT-licensed deployment.