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),交錯思考的 thinking 區塊則應保留並與工具結果一併回傳。無 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 的輸入價是每百萬 token $1.4,輸出價是每百萬 token $4.4。這就是供應商官網價,平台不加價。快取命中的輸入 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 金鑰就能呼叫閘道上的所有模型。
GLM-5.1 是開源的嗎?
是,權重以 MIT 授權釋出。不想自己準備 GPU 的話,這裡的託管版本按用量計費,不必自己架設基礎設施。 執行開放權重模型 →
相關模型
比較
本頁每一個數值都摘錄自供應商自己的文件(連結見上方),並附上查核日期。價格是放在整個目錄裡比較;各家供應商定義不一樣的規格,只說明差異,不畫成圖表比較。這裡沒有任何數據是我們自己量測的,也不做評分。