GLM-5 是 Z.AI 面向智能体工程打造的新一代基础模型,瞄准复杂系统工程和长程智能体任务。
- 输入
- 文本 $1/M
- 输出
- 文本 $3.2/M
- 缓存读取
- $0.2/M
- 上下文
- 200K
- 对比 GPT-4o
- 便宜约 80%
Benchmark 成绩
厂商公布: Alibaba (Qwen) Anthropic ByteDance DeepSeek Google MiniMax Moonshot OpenAI Tencent Z.ai
价格在同类中的位置
价格在 60 个同类模型中的位置
这条线显示该模型的价格,在 Synthorai 上同类模型里处于什么位置。两端标出了最便宜和最贵的那个。这里是基础价,批量、区域和缓存写入的折扣见价格页。
规格与限制
Token
| 上下文窗口(厂商规格) | 200,000 |
|---|---|
| 最大输出(厂商规格) | 131,072 |
提示词缓存
| 缓存方式 | 自动 |
|---|
思考
| 厂商参数 | thinking.type |
|---|---|
| 可选值 | enabled · disabled |
| 默认值 | enabled,且在 GLM-5 上由模型自动判断是否思考 请求未指定时生效 |
| 可关闭 | 支持 |
| 思考行为 | 思维链通过 reasoning_content 返回;此前轮次的思维链默认被清除(clear_thinking 为 true),交错思考块应予保留并与工具结果一并回传 |
| 参数 | reasoning_effort |
| 取值 | minimal · low · medium · high 网关侧参数面——以上方厂商映射为准 |
模型
| 模态 | 文本 → 文本 |
|---|---|
| 参数量 | 总参数 744B · 激活 40B MoE(混合专家) |
| 许可证 | MIT |
- 面向智能体工程的旗舰:744B 参数 MoE(激活 40B),使用 DeepSeek Sparse Attention 在 28.5T token 上预训练
- 200K 上下文 / 128K 最大输出
依据 Z.ai 官方文档 ↗
单个 Prompt —— 通过网关实测
GLM-5 通过 · 3 sentences
Enabling reasoning forces the model to perform multiple hidden steps to "think" through a problem, drastically increasing the volume of data processed per query compared to a standard response. Because our billing is directly tied to this processing volume, the additional computational work required for higher accuracy has proportionally doubled our consumption. Essentially, the spike reflects a trade-off where we are paying a higher variable cost to secure significantly better analytical outcomes.
输出 1393 tok (+1308 思考) 延迟 36.0 s
指令遵循(恰好三句,可数)、受众适配(面向 CFO 的语气),以及下方 token 计量所暴露的隐藏思考计费缺口。
GLM-5 通过 · 8/8 cases
Here is the fixed code: ```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 best = max(best, cur) else: cur = 1 return best ``` **Explanation:** The bug stems from initializing `best` and `cur` to zero, which causes the function to count the number of *transitions* between adjacent elements rather than the total number of items in the run, resulting in a return value that is always one less than the actual length (reporting 0 for a single element and 1 for a pair). By initializing the counters to 1 and resetting `cur` to 1 when a streak breaks, the logic correctly counts the items themselves; adding an explicit check for an empty list ensures the function handles the zero-element edge case correctly.
输出 2907 tok (+2694 思考) 延迟 73.7 s
修复是否真的正确(可运行)、解释的信息密度,以及在一个边界明确的任务上的 token 效率。
GLM-5 通过 · 5/5 fields, guidance "withheld pending the Q4 close"
```json { "company": "Meridian Robotics", "quarter": "September quarter", "revenue_usd_m": 412, "growth_pct": 11, "guidance": "withheld pending the Q4 close" } ```
输出 3620 tok (+3561 思考) 延迟 91.8 s
schema 服从度(不臆造字段)、幻觉压力(guidance 明确被暂缓给出),以及结构化输出路径的差异。
GLM-5 通过 · 119 words, 0 banned, 1 question
We are thrilled to introduce Global Prompt Caching, a powerful new capability within our API gateway designed to optimize your AI operations. By intelligently storing prompt responses across every supported provider, this feature drastically reduces latency and cuts operational costs. Instead of processing identical requests repeatedly, our system serves cached results instantly, ensuring consistent performance even during high-traffic periods. Why pay full price for repeated inference on the same inputs? This update gives developers fine-grained control over cache lifetimes and hit rates, allowing for predictable budgeting and faster application response times. You can activate this functionality directly in your dashboard settings today. Start maximizing your efficiency now and deliver a snappier experience to your end-users without unnecessary API expenditure.
输出 715 tok (+571 思考) 延迟 18.9 s
约束服从度(字数预算、禁用词表、唯一的那句问句)、文风指纹,以及长度控制。
30 秒用上 GLM-5
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",
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",
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",
"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",
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")
.addUserMessage("Summarize this diff")
.reasoningEffort(ReasoningEffort.MEDIUM)
.build());
System.out.println(resp.choices().get(0).message().content().orElse(""));关于 GLM-5
- 相比前代,Z.AI 把参数从 355B(激活 32B)扩展到 744B(激活 40B),预训练数据从 23T 增至 28.5T token,并加入稀疏注意力和 Slime 异步强化学习框架。
- 它提供 200K 上下文窗口、最高 128K 输出 token、思考模式、函数调用、上下文缓存和开放权重,Z.AI 称其具备开源领域最先进的编码与智能体表现。
- 除代码之外,模型页还点名了自家团队瞄准的文档密集型工作:从合同和财务文档中抽取结构化数据、专业翻译、客服质检,以及必须保持人设的角色扮演或分镜写作。
- 思考通过 thinking 对象设置,这一代的 enabled 默认值意味着模型自行决定是否先推理再作答,而不是被强制推理;思考轨迹返回在单独的 reasoning_content 字段中,先于答案流式输出,此前轮次的轨迹默认会被剥离。
- 工具调用最多接受 128 个函数,并支持工具参数的增量流式输出,外部 MCP 工具可直接接入,支持 JSON object 输出,重复前缀的缓存自动生效。
- 权重以 MIT License 发布。
- Synthorai 通过其 OpenAI 兼容端点提供 GLM-5,现有 SDK 无需改动即可使用。
常见问题
GLM-5 API 可以免费试用吗?
可以。新账号可获得 10 次试用调用和最高 $1 的免费额度,无需绑卡。按输入 $1/M 计算,仅这笔额度就足够对 GLM-5 发起约 125 次 ~8K token 的请求。
GLM-5 最擅长什么?
扩展至 744B 参数,激活 40B、稀疏注意力加异步强化学习、开源权重,200K 上下文窗口。完整能力请见「关于」部分,内容取自厂商官方发布说明。
GLM-5 的价格是多少?
在 Synthorai 上,GLM-5 输入 $1/百万 token、输出 $3.2/百万 token,即厂商牌价,无平台加价。缓存命中的输入 token 按 $0.2/M 计费。
GLM-5 支持提示词缓存(prompt caching)吗?
支持,且全自动:经 Z.ai 提供的提示词自动缓存,无需改代码。缓存命中的输入 token 按 $0.2/M 计费(未命中 $1/M)。 提示词缓存指南 →
如何开通 GLM-5?
把现有 OpenAI SDK 的 base_url 指向 "https://synthorai.io/v1",model 设为 "glm-5" 即可。一把 API key 通用网关上的全部模型。
GLM-5 开源吗?
开源:权重以 MIT 许可证 发布。也可以省去 GPU:这里的托管版本按量付费,无需自建基础设施。 运行开源权重模型 →
相关模型
对比
本页每个值都转录自厂商自己的文档(链接见上),并带有核对日期。价格在全目录范围内比较;各厂商定义不同的规格值,只说明差异而不作图表对比。此处没有任何由我们测量的数据,也不做评分。