一個驗證,對應所有 provider
一組 RunAPI key 即可解鎖整個 catalog。無需分開帳戶,亦無需為每個整合輪換密鑰。
It looks like you may prefer a different language. Switch anytime.
透過 RunAPI 使用 GLM API,包含 model skill、統一驗證與按用量計費。
# Base URL
https://runapi.ai
# Endpoints
POST /v1/chat/completions
POST /v1/responses
POST /v1/messages
POST /v1beta/models/{model}:generateContent
POST /v1beta/models/{model}:streamGenerateContent
curl https://runapi.ai/v1/chat/completions \
-H "Authorization: Bearer $RUNAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.3",
"messages": [
{
"role": "user",
"content": "閱讀呢個多檔案 repository,搵出失敗嘅整合測試,並提出 patch,同時解釋根本原因。"
}
]
}'
from openai import OpenAI
client = OpenAI(
base_url="https://runapi.ai/v1",
api_key="your-runapi-key"
)
response = client.chat.completions.create(
model="glm-5.3",
messages=[{"role": "user", "content": "閱讀呢個多檔案 repository,搵出失敗嘅整合測試,並提出 patch,同時解釋根本原因。"}]
)
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://runapi.ai/v1",
apiKey: "your-runapi-key"
});
const response = await client.chat.completions.create({
model: "glm-5.3",
messages: [{ role: "user", content: "閱讀呢個多檔案 repository,搵出失敗嘅整合測試,並提出 patch,同時解釋根本原因。" }]
});
GLM 係 Z.ai 嘅 MIT 授權 Mixture-of-Experts 語言模型家族。GLM-4.5(總參數 355B / 啟用 32B、128K 上下文)以旗艦版同較輕量 Air 版本開啟開放權重 MoE 系列。GLM-4.6 同 4.7 將上下文延伸到 200K,並加強程式碼生成,4.7 喺 SWE-bench 達到 73.8%。GLM-5 系列(744B / 啟用 40B、200K 上下文)進一步達到 77.8% SWE-bench Verified,而 GLM-5.1 以 58.4% 取得 SWE-bench Pro 開放權重最高分。全部都可以透過 RunAPI 用一把金鑰同按 token 計費使用。
| Endpoint | Protocol |
|---|---|
POST /v1/chat/completions | OpenAI compatible |
POST /v1/responses | OpenAI Responses |
POST /v1/messages | Anthropic compatible |
POST /v1beta/models/{model}:generateContent | Gemini generateContent |
POST /v1beta/models/{model}:streamGenerateContent | Gemini streamGenerateContent |
| 變體 | 計費 | 定價 | |
|---|---|---|---|
| glm-4.5 | 1K tokens | Input $0.41 / 1M tokens | Output $1.61 / 1M tokens | 查看 → |
| glm-4.5-air | 1K tokens | Input $0.10 / 1M tokens | Output $0.55 / 1M tokens | 查看 → |
| glm-4.6 | 1K tokens | Input $0.60 / 1M tokens | Output $1.22 / 1M tokens | 查看 → |
| glm-4.7 | 1K tokens | Input $0.60 / 1M tokens | Output $1.19 / 1M tokens | 查看 → |
| glm-5 | 1K tokens | Input $1.00 / 1M tokens | Output $1.60 / 1M tokens | 查看 → |
| glm-5-turbo | 1K tokens | Input $1.20 / 1M tokens | Output $2.00 / 1M tokens | 查看 → |
| glm-5.1 | 1K tokens | Input $1.40 / 1M tokens | Output $2.20 / 1M tokens | 查看 → |
| glm-5.2 | 1K tokens | Input $0.70 / 1M tokens | Output $2.20 / 1M tokens | 查看 → |
| glm-5.3 | 1K tokens | Input $1.40 / 1M tokens | Output $4.40 / 1M tokens | 查看 → |
| Endpoint | 解析度 | 時長 | 價格 | |
|---|---|---|---|---|
| chat_completion | — | — | Input $0.41 / 1M tokens | Output $1.61 / 1M tokens |
以下為 glm-4.5 的定價。其他變體保留各自的 endpoint 定價。
挑選符合輸出類型、品質門檻與延遲目標的模型與變體。
設定 RunAPI key,並在 coding workspace 安裝 model skill。
使用 skill 指引,在你的 app 內加入模型功能。
透過 task ID 查詢、在支援時串流,或處理 webhook callback。
一組 RunAPI key 即可解鎖整個 catalog。無需分開帳戶,亦無需為每個整合輪換密鑰。
按次以 USD 收費,每月結算。失敗的生成不會收費。
型別化 schema 與 setup 備註打包在 model skill 內,讓實作從正確契約開始。
程式碼同代理式工具使用。GLM-5.1 喺 SWE-bench Pro 領先開放權重模型(58.4%),並喺 AIME 2026 取得 95.3%。成個系列都擅長多步驟工具呼叫、大型 codebase 嘅程式碼生成,以及數學推理。
glm-4.5 係 355B 旗艦模型(32B 啟用參數),具備 128K 上下文;glm-4.5-air 係較輕量嘅 106B MoE(12B 啟用),適合更快、成本更低嘅日常工作。
GLM-5 擴展到總參數 744B / 啟用 40B、256 位專家;GLM-4.7 則係 358B / 32B。SWE-bench Verified 由 73.8% 升到 77.8%。兩者都支援 200K 上下文。
將 OpenAI SDK(Chat Completions 或 Responses)或者 Anthropic Messages SDK 指向 RunAPI,並傳入 GLM model id;proxy 會幫你調整協定。
按 token、按用量計費,採用 RunAPI 為每個 GLM 模型公布嘅輸入同輸出費率,毋須訂閱。
先選最平而且符合你質素要求的版本。大多數團隊會先用快速版本,之後再升級到 pro 用於正式生產。