GLM 5.2

zai/glm-5.2

A chat model with a 1M-token context window, at $0.84 per million input tokens and $2.6775 per million output tokens.

Details

Maker
zai
Kind
Chat
Context window
1,000,000 tokens
Max output
128,000 tokens
Input
$0.84 per million tokens
Cached input
$0.168 per million tokens, 80% off
Cache write
Same as input
Output
$2.6775 per million tokens
Capabilities
Reasoning, tool use
Takes
Text
Returns
Text
Zero data retention
Not on every provider
No training on requests
Not on every provider
Released
2026-06-16
Newer model
zai/glm-5.3-flashxReleased later by the same maker, costs no more, and lists the same capabilities. Compare the two

Description

GLM-5.2 delivers powerful coding capabilities, usable 1M-context support, and continued strengths in long-horizon tasks.

Call it

curl
curl https://phantom.codes/v1/chat/completions \
  -H "Authorization: Bearer $PHANTOM_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "zai/glm-5.2",
    "messages": [
      {"role": "user", "content": "Hello"}
    ]
  }'

Set PHANTOM_KEY to your key. Any OpenAI client works with the base URL https://phantom.codes/v1.