z-ai/glm-5.2
发布时间: 2026-06-17
1,048,576 context · $1.40/M input tokens · $4.40/M output tokens
GLM 5.2 is Z.ai’s most advanced reasoning model, built for long-context, agentic, and engineering-intensive workloads. With support for a 1M-token context window and configurable High/XHigh reasoning modes, it delivers state-of-the-art performance in coding, tool use, and complex task execution.From requirements gathering and architecture design to implementation, testing, and multi-platform deployment, GLM 5.2 can maintain project-level context and consistently follow engineering best practices throughout the entire software development lifecycle.
按量付费
无需预付费用,仅按实际使用量付费
使用以下代码示例接入我们的 API:
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://llm.wavespeed.ai/v1"
)
response = client.chat.completions.create(
model="z-ai/glm-5.2",
messages=[
{"role": "user", "content": "Hello!"}
]
)
print(response.choices[0].message.content)GLM 5.2 is Z.ai’s latest large-scale reasoning model, designed for long-context understanding, advanced coding, and complex agent workflows. With support for a 1M-token context window and configurable reasoning levels, it can maintain project-scale context across extended interactions, making it well-suited for software engineering, research, automation, and multi-step problem solving.
The model supports both High and XHigh reasoning modes, with XHigh enabling its maximum reasoning capability. GLM 5.2 excels at code generation, tool use, structured outputs, and long-horizon task execution, allowing developers to build sophisticated AI agents and automation systems that operate reliably over large amounts of context.
This model is available through the WaveSpeed AI OpenAI-compatible API and can be integrated into existing applications with minimal changes.
| Specification | Value |
|---|---|
| Provider | chatglm |
| Model Type | Chat Completions |
| Architecture | Text → Text |
| Context Window | 1,048,576 tokens |
| Max Input | 786,432 tokens |
| Max Output | 262,144 tokens |
| Input | Text |
| Output | Text |
| Function Calling | Supported |
| Structured Outputs | Supported |
Base URL
https://llm.wavespeed.ai/v1
Endpoint
POST /chat/completions
Model ID
z-ai/glm-5.2
z-ai/glm-5.2chatglmz-ai/glm-5.2
GLM 5.2 is Z.ai’s most advanced reasoning model, built for long-context, agentic, and engineering-intensive workloads. With support for a 1M-token context window and configurable High/XHigh reasoning modes, it delivers state-of-the-art performance in coding, tool use, and complex task execution.From requirements gathering and architecture design to implementation, testing, and multi-platform deployment, GLM 5.2 can maintain project-level context and consistently follow engineering best practices throughout the entire software development lifecycle.
输入
$1.4 /M
输出
$4.4 /M
上下文
1049K
最大输出
262K
工具调用
支持
WaveSpeedAI 定价:输入每百万 token $1.40,输出每百万 token $4.40。Prompt 缓存和批处理单独计费,可显著降低长上下文、高重复任务的实际成本。
GLM 5.2 单次请求最多支持 1049K 上下文 token,输出最多 262K token。
是的。WaveSpeedAI 通过 https://llm.wavespeed.ai/v1 的 OpenAI 兼容端点提供 GLM 5.2。把官方 OpenAI SDK 的 base URL 指向该地址,使用 WaveSpeedAI 的 API Key 即可,无需任何其他代码改动。
登录 WaveSpeedAI,在 Access Keys 中生成 API Key,使用上方显示的 model id 向 https://llm.wavespeed.ai/v1/chat/completions 发送请求。新账户可获得免费额度,用于试用 GLM 5.2。