On our own GPUs
GLM-5.2 API
750B sparse MoE, a 1M window, MIT licensed — tuned hard for software engineering.
Context
1M
Max output
131K
Serving precision
BF16 / FP8
Licence
MIT
GLM-5.2 is Z.ai’s open-weight flagship, released in June 2026. Roughly 750B parameters in a sparse mixture-of-experts design with about 40B active per token, paired with a new IndexShare sparse-attention scheme that keeps 1M-context inference affordable. The window is 1 million tokens and a single response can return up to 131,072. Weights ship in both BF16 and FP8 under an MIT licence, and the tuning leans heavily toward software engineering, multi-step reasoning and tool use.
Open weights, deployed in facilities we build out and lease directly, operated by us. We resell nobody else’s account quota.
Specifications
- Model ID
- glm-5.2
- Published by
- Z.ai (Zhipu AI)
- How it is served
- On our own GPUs
- Licence
- MIT
- Total parameters
- 750B MoE
- Active parameters
- 40B
- Context
- 1M
- Max output
- 131K
- Serving precision
- BF16 / FP8
- Input modalities
- Text
- Released
- 2026-06-13
- Price
- See pricing
What it is good at
- 131K tokens in a single response
- Enough to emit an entire technical design, a whole module, or a full translation in one shot. For generation-heavy work, every stitch you remove is one fewer place for the output to break.
- MIT — no legal detour
- Commercial use, redistribution and private fine-tuning carry no extra licensing burden. That is also precisely what lets us run it in our own facilities and publish the weight version we serve.
- Strong on both Chinese and code
- Tuned for Chinese-language semantics and code generation at the same time, with steady instruction following. A cost-effective default for products that serve Chinese users and still need structured output.
Where it fits
- Primary product traffic: chat, summarisation, structured extraction
- One-shot generation of long documents, designs and code
- Multi-step tool calling and agent orchestration
- Deployments where a permissive licence is a procurement requirement
Three steps
Change one line of base_url, put the model ID below in the `model` field, and leave the rest of your code alone.
model: "glm-5.2"
curl https://api.nexaix.net/v1/chat/completions \
-H "Authorization: Bearer $NEXAIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.2",
"stream": true,
"messages": [
{ "role": "user", "content": "Summarise this contract." }
]
}'import os
from openai import OpenAI
client = OpenAI(
# the only new line
base_url="https://api.nexaix.net/v1",
api_key=os.environ["NEXAIX_API_KEY"],
)
# everything below is your existing code
stream = client.chat.completions.create(
model="glm-5.2",
stream=True,
messages=[
{"role": "user", "content": "Summarise this contract."}
],
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.nexaix.net/v1", // the only new line
apiKey: process.env.NEXAIX_API_KEY,
});
// everything below is your existing code
const stream = await client.chat.completions.create({
model: "glm-5.2",
stream: true,
messages: [
{ role: "user", content: "Summarise this contract." }
],
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}About this model
Do you serve GLM-5.2 in BF16 or FP8?
Both weight sets are published by the vendor. The precision we currently serve is stated on this page, and changes go through the changelog. Pin a prompt set and re-run it at different times — the distribution should hold.
What does the MIT licence mean for me as an API user?
Nothing extra on your side. It matters on the supply side: we can legally run these weights on our own hardware, so we never resell anyone else’s account quota and your service does not die when somebody else gets banned.
What changed since GLM-5.1?
Most visibly the context window went from 200K to 1M and the single-response output ceiling rose sharply; beyond that, the tuning focused on software engineering and multi-step reasoning. Run your own eval for what it means on your tasks.
Also worth a look
- On our own GPUsKimi K32.8T mixture-of-experts, a 1M-token window, and vision built into the base.kimi-k3
- On our own GPUsDeepSeek V4 Pro1.6 trillion parameters, thinking and non-thinking modes, MIT licensed.deepseek-v4-pro
- On our own GPUsDeepSeek V4 Flash284B total, 13B active per token — the lowest unit cost in the V4 generation.deepseek-v4-flash
Run your own eval on it
Take the trial credit, run the evals you already have against this model, and then decide whether it gets your production traffic.
