GLM-5.1 是 Z.AI 面向长程任务设计的旗舰基础模型,官方描述称它能在单个任务上连续自主工作最长 8 小时,涵盖规划、执行、测试、修复和交付。
- 输入
- 文本 $1.4/M
- 输出
- 文本 $4.4/M
- 缓存读取
- $0.26/M
- 上下文
- 203K
- 对比 GPT-4o
- 便宜约 72%
价格在同类中的位置
价格在 68 个同类模型中的位置
这条线标出该模型的价格在 Synthorai 同类模型中的位置,两端分别是最便宜和最贵的模型。这里是基础价,批量、区域和缓存写入的折扣见价格页。
规格与限制
Token
| 上下文窗口(供应商规格) | 200,000 |
|---|---|
| 最大输出(供应商规格) | 131,072 |
提示词缓存
| 缓存方式 | 自动 |
|---|
思考
| 供应商参数 | thinking.type |
|---|---|
| 可选值 | enabled · disabled |
| 默认值 | enabled,由模型自动判断是否思考 请求未指定时生效 |
| 可关闭 | 支持 |
| 思考行为 | 思维链通过 reasoning_content 返回;此前轮次的思维链默认被清除(clear_thinking 为 true),交错思考块应予保留并与工具结果一并回传;没有 reasoning_effort 控制:文档将其列为仅 GLM-5.2 支持 |
| 参数 | reasoning_effort |
| 取值 | minimal · low · medium · high 这是网关侧的参数,实际以上方的供应商映射为准 |
模型
| 模态 | 文本 → 文本 |
|---|---|
| 参数量 | 总参数 744B · 激活 40B MoE(混合专家) |
| 许可证 | MIT |
- 新一代智能体工程旗舰(744B-A40B):单次运行可自主工作最长 8 小时,跨越数千次工具调用
- 200K 上下文 / 128K 最大输出
依据 Z.ai 官方文档 ↗
一条提示词,经网关实测
GLM-5.1 通过 · 3 sentences
Enabling reasoning shifts the LLM from generating quick answers to producing hidden "chain-of-thought" tokens that systematically explore multiple solution paths before responding. Because billing is based on total tokens processed, these invisible reasoning tokens drastically increase input and output volume per query, often adding thousands of compute-intensive tokens to a single prompt. Consequently, our bill doubled not from higher per-token rates or increased user volume, but from the exponentially deeper computational work required to deliver higher-quality, more reliable outputs.
输出 98 tok 延迟 7.8 s
指令遵循(恰好三句,数得出来)、受众适配(对 CFO 说话的口吻),以及下方 token 计数暴露出的隐藏思考计费差额。
GLM-5.1 通过 · 8/8 cases
```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 original function initialized `cur` and `best` to `0` and only incremented `cur` when a duplicate was found. This counts the number of *extra* equal items in a run rather than the total run length, so every run is reported as one shorter than it actually is—returning `0` for single-element lists and `L-1` for a run of length `L` (including those ending at the last index). The fix initializes `cur` and `best` to `1` (when the list is non‑empty) and resets `cur` to `1` on a mismatch, so `cur` tracks the full length of the current run and `best` records the true maximum.
输出 3823 tok (+3585 思考) 延迟 49.7 s
修复是否真的正确(能运行)、解释的信息密度,以及在一个范围明确的任务上的 token 效率。
GLM-5.1 通过 · 5/5 fields, guidance "withheld pending the Q4 close"
```json { "company": "Meridian Robotics", "quarter": "September quarter", "revenue_usd_m": 412, "growth_pct": "eleven and change", "guidance": "withheld pending the Q4 close" } ```
输出 1091 tok (+1028 思考) 延迟 15.2 s
是否严守 schema(不臆造字段)、能否顶住幻觉压力(原文明说暂不给出 guidance),以及结构化输出路径的差异。
GLM-5.1 通过 · 120 words, 0 banned, 1 question
We are excited to introduce Prompt Cache for our API Gateway. This new feature stores responses for identical prompts, routing subsequent requests directly to the cache instead of calling the underlying AI provider. Are you tired of paying multiple times for the exact same query? Prompt Cache solves this by recognizing duplicate inputs across all supported providers, drastically reducing latency and operational costs. When a user submits a request that matches a previously cached prompt, the gateway returns the stored answer instantly. You can configure cache expiration and scope rules via your dashboard to maintain data freshness. Stop wasting budget on redundant computational work. Upgrade to the latest gateway tier today to start saving time and money on every call.
输出 3935 tok (+3802 思考) 延迟 41.1 s
是否守住约束(字数预算、禁用词表、只能有一个问句)、文风特征,以及长度控制。
30 秒用上 GLM-5.1
兼容 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.1",
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.1",
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.1",
"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.1",
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.1")
.addUserMessage("Summarize this diff")
.reasoningEffort(ReasoningEffort.MEDIUM)
.build());
System.out.println(resp.choices().get(0).message().content().orElse(""));关于 GLM-5.1
- 它在 GLM-5 的基础上强调实验、分析、优化的循环而非一次性生成,从而在复杂工程环境中实现自主探索、持续改进和稳定交付。
- Z.AI 对这次升级的表述关乎耐力而非峰值能力:上一版本在智能体循环中很早就进入平台期,而 GLM-5.1 的文档称它能在数百轮和数千次工具调用中持续优化,并在模糊问题上判断更好。
- 该模型提供 200K 上下文窗口和最高 128K 输出 token,另有思考模式和函数调用。
- 被点名的负载超出代码之外,还包括通用对话、创意写作、前端与 artifact 生成,以及办公生产力。
- 思考通过与产品线其余成员相同的 thinking 对象切换,默认交由模型自行决定,轨迹返回在单独的 reasoning_content 字段中;注意 Z.AI 后来加入的推理力度控制项在文档中仅适用于 GLM-5.2,因此这个模型没有力度档位可调。
- MCP 工具、流式输出、JSON 输出和自动前缀缓存均受支持,权重以 MIT License 发布。
- Synthorai 把 GLM-5.1 置于其 OpenAI 兼容端点之后,可直接接入。
常见问题
GLM-5.1 API 可以免费试用吗?
可以。新账号有 10 次试用调用,免费额度最高 $1,无需绑卡。按输入 $1.4/M 计算,光这笔额度就够向 GLM-5.1 发约 89 次请求,每次 ~8K token。
GLM-5.1 最擅长什么?
可自主连续工作最长 8 小时、实验、分析、优化循环取代单次生成、覆盖规划到测试与交付。完整介绍见「关于」部分,内容取自供应商的官方发布说明。
GLM-5.1 的价格是多少?
在 Synthorai 上,GLM-5.1 的输入价为 $1.4/百万 token,输出价为 $4.4/百万 token。这就是供应商官网价,平台不加价。缓存命中的输入 token 按 $0.26/M 计费。
GLM-5.1 的上下文长度是多少?
GLM-5.1 的上下文长度(上下文窗口)是 203K token。单次回复最多输出 131,072 个 token。
GLM-5.1 支持提示词缓存(prompt caching)吗?
支持,而且全自动:经 Z.ai 处理的提示词会自动缓存,不用改代码。缓存命中的输入 token 按 $0.26/M 计费(未命中为 $1.4/M)。 提示词缓存指南 →
如何开通 GLM-5.1?
把现有 OpenAI SDK 的 base_url 指向 "https://synthorai.io/v1",model 设为 "glm-5.1" 即可。一个 API key 就能调用网关上的全部模型。
GLM-5.1 开源吗?
开源:权重以 MIT 许可证发布。不想自己备 GPU 也行:这里的托管版本按量付费,不需要自建基础设施。 运行开源权重模型 →
相关模型
对比
本页的每个数值都照录自供应商自己的文档(链接见上),并标有核对日期。价格是在整个目录范围内比较的;各家供应商定义不一样的规格项,只说明差异,不画图对比。这里没有任何一项是我们自己测的,也不打分。