20% off all GPT ๐ŸŽ‰ 30% off DeepSeekLearn more

Z.ai: GLM-5.2

Chat
z-ai/glm-5.2

GLM-5.2 is the flagship reasoning model on Z.ai's international platform (api.z.ai), built on an open-weights MoE architecture with a 1M-token context window. It features embedded thinking (reasoning_content), prompt caching, tool calling, and web search, with strong coding and long-horizon agentic execution. Available via OpenAI-compatible and Anthropic protocols.

Context Window
1M
Max Output Tokens
128K
Released
2026-06-16
Capabilities
Function CallingReasoningPrompt CachingWeb Search
Available Providers
AliyunAlibaba CloudVolcengineZ.ai
Supported Protocols
openaianthropic

Providers

Alibaba Cloudprovider.type: "alicloud"
Input Tokens
$1.4/M
Output Tokens
$4.4/M
Cache Read
$0.26/M
Web Search
$0.01/R
Protocols
openai/v1/chat/completions
anthropic
Aliyunprovider.type: "aliyun"
Input Tokens
$1.4/M
Output Tokens
$4.4/M
Cache Read
$0.26/M
Web Search
$0.01/R
Protocols
openai/v1/chat/completions
anthropic
Volcengineprovider.type: "volcengine"
Input Tokens
$1.4/M
Output Tokens
$4.4/M
Cache Read
$0.26/M
Web Search
$0.01/R
Protocols
openai/v1/chat/completions/v1/responses
anthropic
Z.aiprovider.type: "zai"
Input Tokens
$1.4/M
Output Tokens
$4.4/M
Cache Read
$0.26/M
Web Search
$0.01/R
Protocols
openai/v1/chat/completions
anthropic

Code Examples

from openai import OpenAI
client = OpenAI(
base_url="https://api.ofox.run/v1",
api_key="YOUR_OFOX_API_KEY",
)
response = client.chat.completions.create(
model="z-ai/glm-5.2",
messages=[
{"role": "user", "content": "Hello!"}
],
)
print(response.choices[0].message.content)

Uptime & Status

Benchmarks

LMArena โ†—Evaluated as glm-5.2 (max)

Z.ai: GLM-5.2 scores 1464 in the Overall category of the LMArena text leaderboard (style control), ranking #35 of 374 models based on 14,228 human preference votes (updated 2026-07-12).

Benchmark scores for glm-5.2 (max) on LMArena
CategoryArena Score95% CIRankVotes
Overall14641458โ€“1471#35 of 37414,228
Hard Prompts14871480โ€“1494#32 of 3749,331
Coding15111501โ€“1521#33 of 3693,968
Math14771455โ€“1499#22 of 362708
Creative Writing14431431โ€“1455#38 of 3722,561
Instruction Following14611452โ€“1470#29 of 3744,852
Chinese15041481โ€“1526#29 of 344728

Source: LMArena ยท CC BY 4.0 ยท Updated 2026-07-12 ยท Methodology โ†— ยท Ranks compare models within each category of the LMArena text leaderboard (style control). Scores come from third-party human preference evaluations, not from OFOX.

Further Reading on GLM-5.2

Frequently Asked Questions

Z.ai: GLM-5.2 on Ofox.ai costs $1.4/M per million input tokens and $4.4/M per million output tokens. Pay-as-you-go, no monthly fees.