GLM-5.2
z-ai/glm-5.2
Overview
Chat
Z.ai's GLM for long-horizon engineering, with a usable 1M-token context that keeps project-scale code coherent.
Made by Z.ai · released Jun 2026
Input
TextOutput
Text- Context
- 1.048.576
- Input, maximum
- 917.504
- Output, maximum
- 131.072
- Default output
- 4.096
- Reasoning Supported
- Tool calling Supported
- Prompt caching Supported
- Automatic fallback routes Supported
Routes and pricing
Providers are tried in the order listed below. We try these providers in order. If one fails, we move on to the next, and you pay the rate of the one that answers.
Alibaba Cloud
primary- Input
- Rp25.900per million tokens$1.4
- Output
- Rp81.400per million tokens$4.4
- Cache read
- Rp5.180per million tokens$0.28
Novita
fallback- Input
- Rp25.900per million tokens$1.4
- Output
- Rp81.400per million tokens$4.4
- Cache read
- Rp4.810per million tokens$0.26
Today's reference rate: Rp18.500/USD
Prices exclude the 5,5% service fee
Data and privacy
Alibaba Cloud Alibaba Cloud Model Studio privacy notice
- Used to train models
- No
- Retention
- Not stated in the policy.
- Processing location
- Singapore, the Model Studio region indoRouter uses.
Novita Novita AI Terms of Service, 10.2
- Used to train models
- No
- Retention
- Not kept beyond generating and delivering the answer: zero data retention by default.
- Processing location
- Not stated; data may be transferred to the United States.
- At indoRouter
- We don't store your prompts or responses. Files you upload, batches, and responses you send with
store: trueare kept encrypted for up to 30 days.
Code samples
Use this model ID with any OpenAI SDK. The base URL is the same for every model.
curl https://api.indorouter.ai/v1/chat/completions \
-H "authorization: Bearer $INDOROUTER_API_KEY" \
-H "content-type: application/json" \
-d '{"model": "z-ai/glm-5.2",
"messages": [{"role": "user", "content": "halo"}]}'
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.indorouter.ai/v1",
api_key=os.environ["INDOROUTER_API_KEY"],
)
reply = client.chat.completions.create(
model="z-ai/glm-5.2",
messages=[{"role": "user", "content": "halo"}],
)
print(reply.choices[0].message.content)
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.indorouter.ai/v1",
apiKey: process.env.INDOROUTER_API_KEY,
});
const reply = await client.chat.completions.create({
model: "z-ai/glm-5.2",
messages: [{ role: "user", content: "halo" }],
});
console.log(reply.choices[0].message.content);