新用戶 免費註冊,送 10 次呼叫,最高 $1,免綁卡。

GLM-5

發布於 2026-02-12

chat程式碼推理工具呼叫提示詞快取

GLM-5 是 Z.AI 面向智慧體工程打造的新一代基礎模型,瞄準複雜系統工程與長程智慧體任務。

輸入
文字 $1/M
輸出
文字 $3.2/M
快取讀取
$0.2/M
上下文
200K
相較 GPT-4o
便宜約 80%

Benchmark 成績

高於同儕均值無人分數更高15 / 522 / 52
GLM-5 其他被測模型 同儕均值 無人分數更高
SWE-Bench Pro
55.1%
Cybergym
43.2%
SkillsBench Avg@5
無人分數更高 47.2%
GPQA Diamond
86%
BrowseComp
62%

廠商公布: Alibaba (Qwen) Anthropic ByteDance DeepSeek Google MiniMax Moonshot OpenAI Tencent Z.ai

價格在同類中的位置

價格在 60 個同類模型中的位置

輸入$1/M
$0.05 · Qwen3 VL Flash GPT-5.4 Pro · $30
輸出$3.2/M
$0.275 · DeepSeek V4 Flash GPT-5.4 Pro · $180
快取讀取$0.2/M
$0.0028 · DeepSeek V4 Flash GPT-5.4 Pro · $15

這條線顯示該模型的價格,在 Synthorai 上同類模型裡處於什麼位置。兩端標出了最便宜和最貴的那個。這裡是基礎價,批次、區域與快取寫入的折扣見價格頁。

規格與限制

Token

上下文視窗(廠商規格) 200,000
最大輸出(廠商規格) 131,072

提示詞快取

快取方式 自動

思考

廠商參數 thinking.type
可選值 enabled · disabled
預設值 enabled,在 GLM-5 上由模型自動判斷是否思考 請求未指定時生效
可關閉 支援
思考行為 思考軌跡透過 reasoning_content 回傳;先前輪次的軌跡預設會被清除(clear_thinking 為 true),交錯思考的 thinking 區塊則應保留並與工具結果一併回傳。
參數 reasoning_effort
取值 minimal · low · medium · high 閘道側參數面——以上方廠商映射為準

模型

模態 文字 → 文字
參數量 總參數 744B · 啟用 40B MoE
授權條款 MIT
  • 面向智慧體工程的旗艦:744B 參數的 MoE(啟用 40B),以 28.5T token 預訓練並採用 DeepSeek Sparse Attention
  • 200K 上下文 / 128K 最大輸出

依據 Z.ai 官方文件 ↗

單一提示詞 — 經由閘道測量

提示詞 Explain to a CFO, in exactly three sentences, why our LLM bill doubled after we enabled reasoning. 檢查 恰好 3 句

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 計量所暴露的隱藏思考計費缺口。

提示詞 This function is supposed to return the longest run of consecutive equal items, but callers report it is off by one on single-element inputs and misses runs that end at the last index. Fix it and explain the bug in one paragraph. 檢查 修復通過測試

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 效率。

提示詞 Extract a JSON object with fields {company, quarter, revenue_usd_m, growth_pct, guidance} from this text. Use null for anything not stated; add no other fields. 檢查 合法 JSON,schema 精確

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 明確被暫緩給出),以及結構化輸出路徑的差異。

提示詞 Write a 120-word product announcement for an API gateway feature that caches prompts across providers. Forbidden words: "seamless", "unlock", "game-changer", "revolutionize", "empower". Exactly one sentence must be a question. 檢查 120 詞,0 個禁用詞

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)

關於 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:這裡的託管版本按用量計費,無需自建基礎設施。 執行開放權重模型 →

相關模型

對比

本頁每個值都轉錄自廠商自己的文件(連結見上),並帶有核對日期。價格在全目錄範圍內比較;各廠商定義不同的規格值,只說明差異而不作圖表對比。此處沒有任何由我們測量的資料,也不做評分。

取得 API 金鑰 算算你的成本 →