Z AibalancedTool use

GLM 5.2

GLM-5.2 is Z.ai’s flagship model for the era of long-horizon tasks. With a truly usable 1M-token context window, it can handle project-level engineering context, execute long-running tasks more reliably, follow...

1.0M context·~786K words·131K max output
Context window1.0Mtokens
Max output131Ktokens

Context window

This model accepts 1.0M tokens in one request (~786K words of text).

Context window size1.0M tokens
4K32K128K1M10M

What fits in one request

  • Short document
    About 1,500 words of text
    Fits
  • Long document
    About 37K words of text
    Fits
  • Small codebase
    About 150K words of text
    Fits
  • Full novel
    About 375K words of text
    Fits

Specifications

Context size, pricing, and release info in one place.

Context window
1,048,576 tokens (1.0M)
Max output tokens
131,072 tokens (131K)
Speed tier
balanced
Provider
Z Ai
Release date
Jun 2026

Capabilities

See which features this model supports, such as vision, tools, and streaming.

Supported (5)
Tool use
Supported
Function calling
Supported
Extended thinking
Supported
Streaming
Supported
Prompt caching
Supported
Not supported (3)
Vision
Not supported
Web search
Not supported
Batch API
Not supported

Best for

Jump to a guide or ranking that matches each workload.

Compare GLM 5.2

Open a side-by-side comparison with one click.

Frequently asked questions

Short answers about context size and how this model behaves.

GLM 5.2 has a context window of 1M tokens (1,048,576 tokens). This million-token window can process entire codebases, long legal documents, or book-length texts in a single pass.

More from Z Ai

Other models by Z Ai in our catalog.

Powered by Mem0

Use a smaller model.
Get better results.

Mem0 gives your AI long-term memory so you stop re-sending context on every call. That means you can use a smaller, faster, cheaper model — and still get better answers.

Example: a multi-turn chat session

Without Mem0~128K tokens sent
Full history
Repeated info
Old context
With Mem0~20K tokens sent
Key memories
Current turn

80% less to send — works with any model