GLM-5.2 is a mixture-of-experts model from Z.ai, released in June 2026 with about 753 billion parameters and open weights. Z.ai built it for long-horizon work and says it keeps a stable 1M-token context through long tasks. According to Z.ai's docs it first breaks a goal down, identifies dependencies and risks, then implements and checks the result in stages, which suits multi-file projects. In Jantaris GLM-5.2 has a 1,000,000-token context window and up to 131,072 output tokens.
Best for
- Project-level software engineering across many files
- Agent tasks that need a plan before execution
- Long document work where context drift is a problem
- A lower-cost alternative for coding agents
- Teams that prefer open-weight models
How to call it
Standard OpenAI SDK with the Jantaris URL:
from openai import OpenAI
client = OpenAI(base_url="https://jantaris.com/v1", api_key="sk-jt-...")
resp = client.chat.completions.create(
model="glm-5.2",
messages=[{"role": "user", "content": "Break this feature request into tasks with dependencies."}],
)
print(resp.choices[0].message.content)FAQ
How much does the GLM-5.2 API cost?
In Jantaris: $1.22 / $4.05 per 1M tokens. That puts it well below the flagship closed models, which is why it works as a default for long agent runs where token counts grow fast.
Does GLM-5.2 really handle 1M tokens?
The context window in Jantaris is 1,000,000 tokens, and Z.ai says the model stays stable across that length. Z.ai also changed its attention design to cut compute per token at 1M context. Still, the more you send, the more you pay, so pass only the files the task needs.
GLM-5.2 or GLM 5.3?
glm-5.3 is the newer Z.ai flagship and, per Z.ai, a large step up in coding. GLM-5.2 stays useful when you want a cheaper model or already tuned prompts for it.
How to call GLM-5.2 via API
from openai import OpenAI
client = OpenAI(base_url="https://jantaris.com/v1", api_key="sk-jt-...")
resp = client.chat.completions.create(
model="glm-5.2",
messages=[{"role": "user", "content": "Write a haiku about Baltic amber."}],
)
print(resp.choices[0].message.content)curl https://jantaris.com/v1/chat/completions \
-H "Authorization: Bearer $JANTARIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "glm-5.2", "messages": [{"role": "user", "content": "Write a haiku about Baltic amber."}]}'import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://jantaris.com/v1", apiKey: process.env.JANTARIS_API_KEY });
const resp = await client.chat.completions.create({
model: "glm-5.2",
messages: [{ role: "user", content: "Write a haiku about Baltic amber." }],
});
console.log(resp.choices[0].message.content);









