Zhipu AI (Z.ai) · GLM
GLM-5.2 API
The latest release of Zhipu’s GLM.
GLM-5.2 is made by Zhipu AI (Z.ai). On PixCode it is billed at the upstream official list price with zero markup: $1.40 input and $4.40 output per million tokens, with a 1M context window.
It speaks both the Anthropic and OpenAI protocols, so Claude Code, opencode, Cline and Zed can all use it directly.
1M
Context window
$1.40
Input / 1M tokens
$4.40
Output / 1M tokens
Anthropic + OpenAI
Protocols
Rates
USD per million tokens, read live from the gateway — the same data your charges come from.
| Item | Standard |
|---|---|
| Cache read | $0.26 |
| Input | $1.40 |
| Output | $4.40 |
Which tools can use it
It depends on the protocol. Claude Code only speaks Anthropic; Roo Code, Kilo Code and Goose use OpenAI; opencode, Cline, Zed and Factory Droid can be configured either way.
- Claude CodeAnthropic endpoint
- opencodeAnthropic endpoint
- ClineAnthropic endpoint
- Roo CodeOpenAI endpoint
- Kilo CodeOpenAI endpoint
- Factory DroidAnthropic endpoint
- ZedAnthropic endpoint
- GooseOpenAI endpoint
Setup
Replace sk-px-... with the API key from your dashboard. Other tools are covered in the docs.
export ANTHROPIC_BASE_URL="https://api.pixcode.ai/anthropic"
export ANTHROPIC_AUTH_TOKEN="sk-px-..."
export ANTHROPIC_MODEL="glm-5.2"
export API_TIMEOUT_MS=3000000
claude{
"provider": {
"pixcode": {
"npm": "@ai-sdk/anthropic",
"name": "PixCode",
"options": {
"baseURL": "https://api.pixcode.ai/anthropic/v1",
"apiKey": "sk-px-..."
},
"models": {
"glm-5.2": { "name": "GLM-5.2" }
}
}
},
"model": "pixcode/glm-5.2"
}curl https://api.pixcode.ai/v1/chat/completions \
-H "Authorization: Bearer sk-px-..." \
-H "Content-Type: application/json" \
-d '{"model": "glm-5.2", "messages": [{"role": "user", "content": "Hello"}]}'Across the family
Every GLM model on PixCode, in USD per million tokens.
| Model | Context | Input | Output |
|---|---|---|---|
| glm-5.2this page | 1M | $1.40 | $4.40 |
| glm-5 | 203K | $1.00 | $3.20 |
| glm-4.7 | 200K | $0.60 | $2.20 |
| glm-4.6 | 200K | $0.55 | $2.20 |
| glm-4.5v | 64K | $0.60 | $1.80 |
| glm-4.6v | 128K | $0.30 | $0.90 |
One base URL, 60 models.
A monthly Pass converts 1:1 into crystals, billed at the upstream official list price with zero markup. Purchased crystals never expire.