z-ai/glm-5

Z.ai: GLM 5

Context length
205K
Input / 1M tokens
$1.00
Output / 1M tokens
$3.20
Released
2026-02-11
Modality
text->text

About Z.ai: GLM 5

GLM-5 is Z.ai’s flagship open-source foundation model engineered for complex systems design and long-horizon agent workflows. Built for expert developers, it delivers production-grade performance on large-scale programming tasks, rivaling leading...

Call Z.ai: GLM 5

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",
    "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",
    "messages": [{"role": "user", "content": "Say hello"}]
  }'

Zhipu / Z.ai (GLM) keys

OpenRouter keys

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