GLM-5.2

Zhipu AIMCP Tool CallReasoning
zhipuai/glm-5.2Open Weights

Open flagship GLM for long-horizon coding agents and million-token context work

Benchmark Pricing$1.20 / 1M in$4.18 / 1M out$0.30 cache read
Context: 1,000,000 tokens•Max Output: 131,072 tokens•Released: 2026-06-13

TECHNICAL SPECIFICATIONS

Context Window1,000,0001M tokens
Max Output131,072131.1K tokens
LicenseOpen SourceSelf-hostable
Input Modalities
Text
Function / Tool CallingSupported (MCP Ready)
Structured OutputsGuaranteed Schema

MODEL CONTEXT PROTOCOL (MCP) READINESS

✓ GLM-5.2 natively supports OpenAI / Anthropic format tool calling and is fully compatible with MCP servers and agent loops.

MCP Context Window Recommendations

With a context capacity of 1,000,000 tokens, this model can handle extremely large MCP resource manifests, complete database schemas, and multiple active server tool definitions simultaneously without degradation.

STANDARDIZED BENCHMARKS & EVALS

SWE-Bench Proresolve rate
62.1
Terminal-Benchsuccess rate
82.7
FrontierSWEdominance
74.4
Humanity's Last Examaccuracy
40.5
Humanity's Last Examaccuracy
54.7
CritPtaccuracy
20.9
AIMEaccuracy
99.2
HMMTaccuracy
94.4
HMMTaccuracy
92.5
IMOAnswerBenchaccuracy
91
GPQA Diamondaccuracy
91.2
NL2Reporesolve rate
48.9
DeepSWEresolve rate
46.2
Program Benchscore
63.7
Terminal-Benchsuccess rate
81
PostTrainBenchscore
34.3
SWE Marathonresolve rate
13
MCP Atlasscore
76.8
Tool-Decathlonscore
48.2

API CALL INVOCATION EXAMPLE

// Example: Calling GLM-5.2 via OpenAI SDK
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.ZHIPUAI_API_KEY,
});

const response = await client.chat.completions.create({
  model: "zhipuai/glm-5.2",
  messages: [{ role: "user", content: "Hello! Can you inspect MCP tools?" }],
});

console.log(response.choices[0].message.content);

PRICING BY PROVIDER

15 providers
Zhipu AIglm-5.2
$1.20 / $4.18$0.30 cache
Cortecsglm-5.2
$0.90 / $3.24$0.19 cache
SiliconFlow (China)zai-org/GLM-5.2
$1.20 / $4.18$0.30 cache
DInferenceglm-5.2
$1.25 / $3.89
Z.AI Coding Planglm-5.2-highspeed
$0.00 / $0.00$0.00 cache
ClinePasscline-pass/glm-5.2
$1.40 / $4.40$0.26 cache
NanoGPTz-ai/glm-5.2:thinking
$0.42 / $1.32$0.08 cache
Scalewayglm-5.2
$2.02 / $6.17
Vultrglm-5.2
$0.75 / $3.00
GreenPTglm-5.2-honey-ultra
$1.74 / $5.16$0.45 cache
OpenCode Goglm-5.2
$1.40 / $4.40$0.26 cache
Mistralglm-5-2
$1.40 / $4.40$0.14 cache
TokenGoz-ai/glm-5.2
$1.40 / $4.40$0.26 cache
Jalapeno CloudGLM-5.2
$1.40 / $4.40$0.26 cache
Charm Hyperglm-5.2
$1.52 / $4.79$0.15 cache

Rates in USD per 1M tokens. Rates synchronized from models.dev public catalog.

Prompt Caching Active

This model supports prompt caching at $0.30 / 1M tokens, saving up to 75% on repetitive MCP tool definitions and system instructions.