Skip to content

Model detail

GLM-5.2

Provided by GLM
Pay-as-you-go

GLM-5.2 is the latest model in Z.ai's GLM series, continuing the line's focus on coding and long-horizon agentic tasks. Like GLM-5.1, it is designed to plan, execute, and iterate autonomously on extended, engineering-grade tasks.

Model specs

Model ID
glm-5.2
Context length
1.048576M
Max output
163.84K
I/O modalities
Released
2026-06

02

API endpoints

One MixRoute gateway, OpenAI-compatible

  • OpenAI-compatible /v1/chat/completions POST

03

Pricing

Flat rate, unit: /1M Tokens

Input

$1.4000 /1M Tokens

Completion

$4.4000 /1M Tokens

Cache read

$0.2600 /1M Tokens

05

Selection summary

Quickly judge whether it fits your workload

What is this model good for?

Latest model in Z.ai's GLM series, continuing the line's focus on coding

GLM-5.2 is the latest model in Z.ai's GLM series, continuing the line's focus on coding and long-horizon agentic tasks. Like GLM-5.1, it is designed to plan, execute, and iterate autonomously on extended, engineering-grade tasks.

What should you check before using it?

1,048,576 context, 163,840 output tokens

GLM model that supports reasoning, tool calling, structured output, streaming, prompt caching and the OpenAI SDK. Released 2026-06-16.

Why use it through MixRoute?

Drop-in via OpenAI-compatible endpoint on MixRoute

Set the model parameter to "glm-5.2" and use your MixRoute API key. Compatible with OpenAI SDK and standard tool-calling patterns.

07

Capabilities & compatibility

Unconfirmed capabilities stay "Unknown," no guesses

Available:

Tool calling

GLM-5.2 supports function and tool calls.

EX Send a tools definition; the response returns tool_calls to execute and feed results back.
Available:

Structured output

GLM-5.2 can produce JSON-formatted output on demand.

EX response_format: { type: "json_schema" } forces valid JSON output.
Available:

Streaming

GLM-5.2 supports streamed responses.

EX stream: true streams tokens incrementally, so chat UIs render as they arrive.
Available:

Prompt caching

GLM-5.2 supports prompt caching under supported routing conditions.

EX Keep the system prompt and tool definitions at the start of the request; repeated prefixes are automatically billed at the cache-read rate.
Available:

OpenAI SDK

Call GLM-5.2 through MixRoute's OpenAI-compatible endpoint.

EX Change base_url to https://api.mixroute.ai/v1; everything else follows the OpenAI style.

08

Token cost estimator

Live estimate from this page's pricing, not an actual bill

Share of the same prefix read repeatedly, up to 100%

09

FAQ

GLM-5.2 supports context caching, which can significantly reduce latency and cost for repeated prefixes. Stable content such as system prompts and tool definitions benefits most.

One endpoint, a testable decision

Test this model and alternate routes with the same request format

Start from a real workload, then let quality, total cost, and failure conditions decide whether to send production traffic.