基礎 URL、請求方法與必要請求頭,皆依當前模型的協議模板渲染。

GLM 4.7 Flash
超快中文處理,極其便宜。
價格
| 規格 | 價格 |
|---|---|
| 輸入 | $0.1/ M tokens |
| 輸出 | $0.43/ M tokens |
| 快取讀 | $0.01/ M tokens |
| 快取寫 | -- |
快速開始
可直接貼上執行下方範例程式碼。Gate.AI API 與 OpenAI 相容,多數 SDK 只需替換 base URL;切換模型時,只需修改模型 ID。
Get your API key
Sign in to the Gate.AI console and create a new key under "API Keys". Keep it safe and send it via the Authorization header on every request.
前往控制台建立金鑰Make a request
Send a POST request to the Chat Completions endpoint with a model ID and an array of messages to get a reply.
curl --location "https://api.gate.ai/openai/v1/chat/completions" \
--header "Authorization: Bearer {API_KEY}" \
--header "Content-Type: application/json" \
--data '{
"model": "glm-4.7-flash",
"messages": [
{"role": "user", "content": "Hello"}
]
}'Handle the response \\\\\& streaming
By default a full JSON response is returned. Add "stream": true to the request body to receive incremental chunks over SSE.
curl --no-buffer --location "https://api.gate.ai/openai/v1/chat/completions" \
--header "Authorization: Bearer {API_KEY}" \
--header "Content-Type: application/json" \
--data '{
"model": "glm-4.7-flash",
"messages": [
{"role": "user", "content": "Hello"}
],
"stream": true
}'端點
相關模型
GLM 5.3 FlashFlash tier of GLM-5.3: native multimodal inputs, suited for efficient coding and long-horizon agents with stable long-context behavior in production.
GLM 5.3Flagship-tier model for complex software engineering and long-horizon agent tasks, with stable execution across multi-turn tool calls and large-scale codebase refactoring.
GLM 5.2GLM 5.2 is a large-scale reasoning model with a 1M-token context window, suited for long-horizon agents, repo-level coding, and multi-step automation.
GLM 5.1Offers significantly improved coding and long-horizon task capabilities, autonomously planning, executing, and refining a single task for over eight hours to deliver complete, engineering-grade results.
GLM 5 Turbo專為 OpenClaw 等代理驅動場景而設計。
GLM 5有競爭力的通用中文模型。
GLM 4.7Balanced model with strong Chinese understanding.
GLM 4.6VMultimodal model with strong image + text understanding.
GLM 4.6Text-only model in the GLM-4 family with improved coding benchmarks and tool calls during reasoning, suited for software development and agent workflows.