z-ai/glm-5.2

Z.ai: GLM 5.2

Context length
1049K
Input / 1M tokens
$0.03
Output / 1M tokens
$7.00
Released
2026-06-16
Modality
text->text

About Z.ai: GLM 5.2

GLM 5.2 is a large-scale reasoning model from Z.ai. It supports text input and output with a 1M-token context window, and is suited for long-horizon agent workflows, project-level software engineering,...

Call Z.ai: GLM 5.2

Via OpenRouter: one base URL for every provider.

curl https://openrouter.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "z-ai/glm-5.2",
    "messages": [{"role": "user", "content": "Say hello"}]
  }'

Direct on Zhipu / Z.ai (GLM):

curl https://api.z.ai/api/paas/v4/chat/completions \
  -H "Authorization: Bearer $ZHIPU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5.2",
    "messages": [{"role": "user", "content": "Say hello"}]
  }'

Zhipu / Z.ai (GLM) keys

OpenRouter keys

OpenRouter keys work for z-ai/glm-5.2 regardless of the upstream provider.