All models

GLM-5.2: Z.AI's 1M-token context model

1M tokens · Text / Code · Prompt cache

Okou no longer runs GLM-5.2. This page is kept as a reference for its specs, pricing and benchmarks. For the same kind of work, use GPT 5.6 Luna.

See GPT 5.6 Luna

Use it for large codebases, large document sets, and cost-sensitive long-context planning where Sonnet-class pricing is unnecessary. GLM-5.1 remains available for compatibility, but new Z.AI routes should start on GLM-5.2 unless a workflow has been tuned specifically against 5.1.

What is GLM-5.2?

June 2026

The route is Anthropic-compatible, so Claude-style agents can keep the same runtime interface. Existing GLM-5.1 agents do not need to migrate immediately, but new Z.AI-backed agents should prefer GLM-5.2.

Specs at a glance

FamilyGLM-5 series
ModalitiesText, code
LanguagesMultilingual
Context windowUp to 1M tokens
Prompt cachingSupported

GLM-5.2 pricing

Provider list price, per 1M tokens.

Input$1.40
Output$4.40
Cache read$0.26
Cache write$1.40

How GLM-5.2 behaves in practice

Observed behaviour from production agent runs.

Long-context work

GLM-5.2 is best used when the agent needs a large working set: repositories, documentation folders, design notes, or long research material.

Best agent tasks for GLM-5.2

Whole-repo review on a budget

Use GLM-5.2 when the agent needs to inspect a large codebase and produce concrete file-level recommendations without paying for a premium reasoning model on every pass.

When to skip GLM-5.2

Skip GLM-5.2 for workflows that depend on vision input, or when maximum English-language reasoning and tool routing quality matter more than context size and cost.

GLM-5.2 vs other models

GLM-5.2 vs Kimi K2.7 Code

Both sit in cost-saving territory. Kimi is the Moonshot default and a strong code-focused alternative; GLM-5.2 is the preferred Z.AI long-context route.

GLM-5.2 vs Claude Sonnet 4.6

Sonnet 4.6 remains the stronger default for premium tool-routing quality. GLM-5.2 is cheaper and better suited when context size dominates.

Frequently asked questions

Is GLM-5.2 the default for direct Z.AI API keys?

Yes. The Z.AI provider defaults to glm-5.2 while keeping glm-5.1 available.

Availability of GLM-5.2 on Okou

GLM-5.2 has been removed from the Okou lineup, so it can no longer be selected in chat or in a workflow, and it is not available with your own API key. GPT 5.6 Luna covers the same cost-saving tier.