GLM-5.2 是 Z.AI 面向长程任务时代打造的旗舰模型,把上下文窗口扩展到 1M token,输出最高 128K;文档强调让 1M 上下文在项目级工作中真正可用。
- 输入
- 文本 $1.4/M
- 输出
- 文本 $4.4/M
- 缓存读取
- $0.26/M
- 上下文
- 1M
- 对比 GPT-4o
- 便宜约 72%
Benchmark 成绩
厂商公布: Alibaba (Qwen) Anthropic ByteDance DeepSeek Google MiniMax Moonshot OpenAI Tencent Z.ai
价格在同类中的位置
价格在 60 个同类模型中的位置
这条线显示该模型的价格,在 Synthorai 上同类模型里处于什么位置。两端标出了最便宜和最贵的那个。这里是基础价,批量、区域和缓存写入的折扣见价格页。
规格与限制
Token
| 上下文窗口(厂商规格) | 1,000,000 |
|---|---|
| 最大输出(厂商规格) | 131,072 |
提示词缓存
| 缓存方式 | 自动 |
|---|
思考
| 厂商参数 | thinking.type + reasoning_effort |
|---|---|
| 可选值 | thinking.type enabled · disabled; reasoning_effort none · minimal · low · medium · high · xhigh · max (none and minimal skip thinking, low and medium map to high, xhigh maps to max) |
| 默认值 | enabled,reasoning_effort 为 max:唯一带力度旋钮的 GLM,且默认就在最高档 请求未指定时生效 |
| 可关闭 | 支持 |
| 思考行为 | 思维链通过 reasoning_content 返回;在标准 API 端点上,此前轮次的思维链默认被清除,交错思考要生效则必须把思考块与工具结果一并回传 |
| 参数 | reasoning_effort |
| 取值 | minimal · low · medium · high 网关侧参数面——以上方厂商映射为准 |
模型
| 模态 | 文本 → 文本 |
|---|---|
| 参数量 | 总参数 744B · 激活 40B MoE(混合专家) |
| 许可证 | MIT |
长程旗舰(744B-A40B),提供可用的 1M token 上下文 / 128K 最大输出、可配置的思考力度档位,以及 1M 上下文下 IndexShare 稀疏注意力带来的效率。
依据 Z.ai 官方文档 ↗
单个 Prompt —— 通过网关实测
GLM-5.2 通过 · 3 sentences
Enabling reasoning means the LLM now generates thousands of invisible "thinking" tokens to systematically work through complex problems before producing a final answer. Because our cloud providers bill for these internal processing steps at the same rate as standard output, our billable token volume per query has doubled. While this increases our direct API costs, it drastically reduces error rates and manual review labor, ultimately lowering our total cost per resolved transaction.
输出 1223 tok (+1138 思考) 延迟 17.1 s
指令遵循(恰好三句,可数)、受众适配(面向 CFO 的语气),以及下方 token 计量所暴露的隐藏思考计费缺口。
GLM-5.2 未命中 · 1/8 cases (fails [1])
```python def longest_run(xs): if not xs: return 0 best = 1 cur = 1 for i in range(1, len(xs)): if xs[i] == xs[i - 1]: cur += 1 […]
输出 4097 tok (+4036 思考) 延迟 58.4 s
修复是否真的正确(可运行)、解释的信息密度,以及在一个边界明确的任务上的 token 效率。
GLM-5.2 通过 · 5/5 fields, guidance "withheld"
```json { "company": "Meridian Robotics", "quarter": "September quarter", "revenue_usd_m": 412, "growth_pct": 11, "guidance": "withheld" } ```
输出 1947 tok (+1893 思考) 延迟 30.9 s
schema 服从度(不臆造字段)、幻觉压力(guidance 明确被暂缓给出),以及结构化输出路径的差异。
GLM-5.2 通过 · 120 words, 0 banned, 1 question
We are introducing Caching for our API Gateway, the smartest way to optimize your workflows. Why pay for the exact same response twice? Now, you can automatically store and reuse prompt results across multiple AI providers, drastically reducing latency and overall operational costs. If a user submits a duplicate query, the gateway serves the cached answer instantly, regardless of whether you route to OpenAI, Anthropic, or others. This directly translates to faster applications and significantly lower monthly API bills. You can easily configure your specific caching rules within the developer dashboard and watch your efficiency soar. Stop wasting your valuable tokens on completely redundant computations. Upgrade to the latest gateway version today and experience the future of intelligent prompt management.
输出 11125 tok (+10984 思考) 延迟 114.8 s
约束服从度(字数预算、禁用词表、唯一的那句问句)、文风指纹,以及长度控制。
30 秒用上 GLM-5.2
OpenAI 兼容:换掉 base_url,SDK 不用改。POST /v1/chat/completions
from openai import OpenAI
client = OpenAI(
base_url="https://synthorai.io/v1",
api_key="sk-syn-...",
)
resp = client.chat.completions.create(
model="glm-5.2",
messages=[{"role": "user", "content": "Summarize this diff"}],
reasoning_effort="medium",
)
print(resp.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://synthorai.io/v1",
apiKey: "sk-syn-...",
});
const resp = await client.chat.completions.create({
model: "glm-5.2",
messages: [{ role: "user", content: "Summarize this diff" }],
reasoning_effort: "medium",
});
console.log(resp.choices[0].message.content);curl https://synthorai.io/v1/chat/completions \
-H "Authorization: Bearer sk-syn-..." \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.2",
"messages": [{"role": "user", "content": "Hello"}],
"reasoning_effort": "medium"
}'package main
import (
"context"
"fmt"
"github.com/openai/openai-go/v3"
"github.com/openai/openai-go/v3/option"
)
func main() {
client := openai.NewClient(
option.WithBaseURL("https://synthorai.io/v1"),
option.WithAPIKey("sk-syn-..."),
)
resp, _ := client.Chat.Completions.New(context.TODO(), openai.ChatCompletionNewParams{
Model: "glm-5.2",
Messages: []openai.ChatCompletionMessageParamUnion{
openai.UserMessage("Summarize this diff"),
},
ReasoningEffort: openai.ReasoningEffortMedium,
})
fmt.Println(resp.Choices[0].Message.Content)
}import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.chat.completions.*;
import com.openai.models.ReasoningEffort;
OpenAIClient client = OpenAIOkHttpClient.builder()
.baseUrl("https://synthorai.io/v1")
.apiKey("sk-syn-...")
.build();
ChatCompletion resp = client.chat().completions().create(
ChatCompletionCreateParams.builder()
.model("glm-5.2")
.addUserMessage("Summarize this diff")
.reasoningEffort(ReasoningEffort.MEDIUM)
.build());
System.out.println(resp.choices().get(0).message().content().orElse(""));关于 GLM-5.2
- 相比 GLM-5.1,官方页面突出更稳定的长程任务执行、在超长上下文中更一致地遵循工程规范、支持多文件重构的项目级理解,以及面向移动与客户端开发的完整真机调试闭环,还有小程序与小游戏开发和研究复现。
- 更长窗口背后的效率手段也已公布:IndexShare 方案让一个轻量索引器服务每四个 transformer 层,削减 1M 上下文下的单 token 算力,改进的多 token 预测层则提高了投机解码的接受率。
- 它也是产品线中唯一带 reasoning_effort 控制项的模型,文档给出的一组档位在实践中收敛为跳过思考、high 档和最大档,而托管 API 默认取最大档,因此一个什么都不设的请求就是一个深度思考的请求。
- 思考在其他方面与 GLM-5 产品线一致,轨迹在单独字段中返回,工具调用、MCP、JSON 输出和自动缓存也一并沿用。
- 权重以 MIT 许可发布。
- 在 Synthorai 上调用 GLM-5.2,OpenAI 兼容端点让它成为长上下文智能体负载的直接替换升级。
常见问题
GLM-5.2 API 可以免费试用吗?
可以。新账号可获得 10 次试用调用和最高 $1 的免费额度,无需绑卡。按输入 $1.4/M 计算,仅这笔额度就足够对 GLM-5.2 发起约 89 次 ~8K token 的请求。
GLM-5.2 最擅长什么?
上下文扩展至可用的 1M token、项目级理解与多文件重构、移动开发的真机调试闭环。完整能力请见「关于」部分,内容取自厂商官方发布说明。
GLM-5.2 的价格是多少?
在 Synthorai 上,GLM-5.2 输入 $1.4/百万 token、输出 $4.4/百万 token,即厂商牌价,无平台加价。缓存命中的输入 token 按 $0.26/M 计费。
GLM-5.2 支持提示词缓存(prompt caching)吗?
支持,且全自动:经 Z.ai 提供的提示词自动缓存,无需改代码。缓存命中的输入 token 按 $0.26/M 计费(未命中 $1.4/M)。 提示词缓存指南 →
如何开通 GLM-5.2?
把现有 OpenAI SDK 的 base_url 指向 "https://synthorai.io/v1",model 设为 "glm-5.2" 即可。一把 API key 通用网关上的全部模型。
GLM-5.2 开源吗?
开源:权重以 MIT 许可证 发布(官方仓库链接见「关于」部分)。也可以省去 GPU:这里的托管版本按量付费,无需自建基础设施。 运行开源权重模型 →
相关模型
对比
本页每个值都转录自厂商自己的文档(链接见上),并带有核对日期。价格在全目录范围内比较;各厂商定义不同的规格值,只说明差异而不作图表对比。此处没有任何由我们测量的数据,也不做评分。