GLM-5.2

by Z.ai

GLM-5.2 is Z.ai's flagship GLM-5 series model, a 744-billion-parameter mixture-of-experts system with 40 billion active parameters, built for agentic engineering and long-horizon coding, with open weights published on Hugging Face. Its standout capability is a 1M-token context window, a roughly fivefold jump over the GLM-5.1 generation's 200K, letting it reason across entire repositories, long plan-then-execute traces, and book-length inputs in a single pass. The model introduces IndexShare, a sparse-attention design that reuses one indexer across every four attention layers, which Z.ai reports cuts per-token compute by 2.9 times at full 1M context while preserving long-range recall. Selectable thinking-effort levels, High and Max, let developers trade reasoning depth against latency, and Z.ai's own benchmarks put it at 62.1 on SWE-bench Pro, up from 58.4 for GLM-5.1. Released under an MIT license, GLM-5.2 suits developers building coding agents, repository-scale tools, and reasoning-intensive applications who want frontier capability with downloadable, self-hostable weights.

Key info

Input
Output
Features
Context window
Max output
Input price
$1.60 /1M
Output price
$5.02 /1M
  • EU residency available
  • US residency available
  • Zero data retention on pay-as-you-go
  • No training by default
  • GDPR DPA available

Available routes

GLM-5.2 runs on 6 different routes through the Opper gateway. Compare residency, ZDR, and training posture at a glance — full data-handling detail per route below.

ProviderRegionZero data retentionTrainingInputOutput
EUZero data retentionNo$1.60$5.02
USEnterpriseNo$0.95$3.00
EUZero data retentionNo$1.43$5.70
USEnterpriseNo$1.40$4.40
EUEnterpriseNo$1.40$4.40
USEnterpriseNo$1.40$4.40

Training posture across routes: No training on prompts by default.

Data handling per route

Each route hosting GLM-5.2 has its own privacy posture, residency, and GDPR terms. Postures are maintained by Opper with a last-verification timestamp.

Berget Sweden🇸🇪

Zero data retention is on by default on Pay-as-you-go — no action required. No training on customer data. EU; DPA available.

Zero data retention
On by default on Pay-as-you-go.
Training
No training on customer data.
Logging
None
Third-party access
None disclosed
GDPR DPA
DPA available
Transfer mechanism
Not applicable — data stays in EU

DeepInfra United States🇺🇸

Zero data retention is available via Opper Enterprise contract. No training on customer data. US; unknown.

Zero data retention
Available via Opper Enterprise contract.
Training
No training on customer data.
Logging
Limited debug logs
Third-party access
None disclosed
GDPR DPA
No DPA
Transfer mechanism
unknown

Evroc Sweden🇸🇪

Zero data retention is on by default on Pay-as-you-go — no action required. No training on customer data. EU; DPA available.

Zero data retention
On by default on Pay-as-you-go.
Training
No training on customer data.
Logging
Abuse monitoring
Third-party access
None disclosed
GDPR DPA
DPA available
Transfer mechanism
Not applicable — data stays in EU

Fireworks United States🇺🇸

Zero data retention is available via Opper Enterprise contract. No training on customer data. US; SCCs; DPA available.

Zero data retention
Available via Opper Enterprise contract.
Training
No training on customer data.
Logging
None
Third-party access
None disclosed
GDPR DPA
DPA available
Transfer mechanism
SCCs

Nebius Finland🇫🇮

Zero data retention is available via Opper Enterprise contract. No training on customer data. EU; DPA available.

Zero data retention
Available via Opper Enterprise contract.
Training
No training on customer data.
Logging
Abuse monitoring
Third-party access
None disclosed
GDPR DPA
DPA available
Transfer mechanism
Not applicable — data stays in EU

Novita United States🇺🇸

Zero data retention is available via Opper Enterprise contract. No training on customer data. US; SCCs; DPA available.

Zero data retention
Available via Opper Enterprise contract.
Training
No training on customer data.
Logging
Abuse monitoring
Third-party access
None disclosed
GDPR DPA
DPA available
Transfer mechanism
SCCs

Benchmarks

Independent benchmark scores — composite indices for reasoning, coding, and math, plus individual eval scores where available.

Global rank#7 of 534 LLMs
TierFrontier
Output speed140 tok/s
First token0.79s
Intelligence Index51.1
Coding Index68.8
Reasoning & knowledge
GPQA Diamond
90%
Humanity's Last Exam
40%
Long-context reasoning
71%
Coding
SciCode
51%
Agentic & tool use
Terminal-Bench Hard
51%
τ²-Bench Telecom
99%
Math & instruction following
IFBench
73%

Get started

Call GLM-5.2 through the Opper gateway with one API key. Let your coding agent set it up, or call it directly — Opper is drop-in compatible with the OpenAI, Anthropic, and Google AI SDKs.

Set it up with your agent

Copy this and paste it into your coding agent — Claude Code, Cursor, Codex, and more — and it'll wire up Opper for you.

Or call it directly

import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.OPPER_API_KEY,
baseURL: "https://api.opper.click/v3/compat",
});
const completion = await client.chat.completions.create({
model: "berget/zai-org/GLM-5.2",
messages: [{ role: "user", content: "Hello" }],
});
console.log(completion.choices[0].message.content);

Compare GLM-5.2 with…

Side-by-side on privacy, EU hosting, pricing, and benchmarks.

Other models from Z.ai

Start building with 300+ models

One API key. Every major provider. Up and running in minutes.

Get startedView Documentation
GLM-5.2 by Z.ai — pricing, benchmarks, ZDR, EU/US hosting | Opper AI