Zhipu

glm-5.2

Model IDglm-5.2

Integration docsMarkdown

Model introduction

GLM-5.2 is Z.AI's text model for long-horizon coding and engineering, with 1M context, 128K output, and configurable reasoning effort.

Model capabilities

Specifications come from the cited model material. Catalog tags help identify access features; use the source documentation for exact limits.

OpenAI compatibleResponses APIAnthropic compatibleGemini compatiblePrompt cacheReasoning

Verified specifications

Official positioning
Long-horizon coding and engineering
Context window
1,000,000 tokens
Maximum output
128,000 tokens
Verified capabilities
reasoning_effort, functions, structured output, MCP

Sources: B.AI GLM-5.2 model guide

Model pricing and access

Prices are read directly from the MoleAPI console catalog and shown by current billing group and context tier.

Your final charge follows the account group shown in the console.
Live pricing source

Pricing table

USD / 1M tokens
Standardx1defaultInput $0.87 · Output $3.48

Input

$0.87 / 1M tokens

Output

$3.48 / 1M tokens

Cache read

$0.19 / 1M tokens

Discountx0.8discountInput $0.696 · Output $2.784

Input

$0.696 / 1M tokens

Output

$2.784 / 1M tokens

Cache read

$0.152 / 1M tokens

Relayx0.3relayInput $0.261 · Output $1.044

Input

$0.261 / 1M tokens

Output

$1.044 / 1M tokens

Cache read

$0.057 / 1M tokens

Temporary (availability may vary)x0.1tempInput $0.087 · Output $0.348

Input

$0.087 / 1M tokens

Output

$0.348 / 1M tokens

Cache read

$0.019 / 1M tokens

Access protocols

Available billing groups: Standard, Discount, Relay, Temporary (availability may vary)

openai
POST
/v1/chat/completions
openai-response
POST
/v1/responses
anthropic
POST
/v1/messages
gemini
POST
/v1beta/models/{model}:generateContent

Complete model guide

Prepared from vendor sources and independently reviewed. · 2026-07-28

GLM-5.2 model guide

GLM-5.2 is Z.AI’s flagship text foundation model for long-horizon engineering and coding work, with an emphasis on repository-scale context, sustained task execution, and engineering-constraint adherence. [5][6] It supports configurable thinking modes, including reasoning_effort, for adjusting reasoning depth across tasks. [5][6]

Positioning and core capabilities

GLM-5.2 is positioned for long-running development workflows that span requirements, codebases, dependencies, implementation, testing, and deployable outputs. [5][6] Z.AI describes its 1M-token context as intended to preserve project architecture, dependencies, and task progress across extended engineering tasks. [5][6]

The model supports streaming responses, function calling, streaming tool calls, structured output, context caching, and MCP-connected tools and data sources. [5] Its thinking modes and reasoning_effort control provide configurable reasoning depth. [5][6]

Capabilities and specs

GLM-5.2 accepts text input and produces text output. [5] Its stated context window is 1M tokens, and its maximum output is 128K tokens. [5]

SpecificationValue
PositioningFlagship foundation model for long-horizon tasks [5][6]
Input modalityText [5]
Output modalityText [5]
Context window1M tokens [5]
Maximum output128K tokens [5]
Reasoning controlsThinking modes and configurable reasoning_effort [5][6]
Tool and integration supportFunction calling, streaming tool calls, structured output, context caching, and MCP [5]

Use cases

GLM-5.2 is positioned for project-level codebase analysis, dependency-aware refactoring, SDK migrations, and multi-file implementation work. [5] Z.AI also identifies test-fix-verify loops, mobile debugging with ADB and logcat, WeChat Mini Program migration, research reproduction, and code-driven video workflows as supported engineering scenarios. [5]

Its long context and tool integration are designed for agentic workflows that need to retain large bodies of project evidence while using external functions, MCP tools, or connected data sources. [5][6]

Material limitations

GLM-5.2 is specified as a text-input, text-output model. [5] Image, video, and GUI-understanding workloads require a separate vision-language model. [1]

Sources

Code examples

These examples use MoleAPI's Responses API endpoint and run after you replace the API key.

curl https://api.moleapi.com/v1/responses \
  -H "Authorization: Bearer $MOLEAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5.2",
    "input": "Explain this problem step by step."
  }'

Frequently asked questions

How is glm-5.2 priced?

This page reads prices from the MoleAPI console API and updates with model prices, context tiers, and account groups.

How can I access glm-5.2?

Protocols and endpoints come from the supported_endpoint_types field in the MoleAPI model catalog.

How do I switch an existing project to glm-5.2?

Keep the MoleAPI API address and key, replace the model parameter with the model ID on this page, then check protocol-specific parameter differences.

Where do the glm-5.2 model details come from?

Capabilities and limitations are checked against B.AI and the other cited pages. Pricing and available protocols come only from the MoleAPI console.