概述
GLM-5.3 是智谱发布的编程能力最强开源模型,与 GLM-5.2 同基座、同参数规模(总参数 7430 亿),全部能力提升来自极致的后训练 Scaling。它在复杂软件工程、终端操作与长程 Agent 任务上取得显著突破,编程能力较 GLM-5.2 提升 50%;同时补齐网络安全能力,在白盒代码审查与漏洞发现等防御性安全任务中表现突出。配合百万上下文、多档思考强度、Function Calling 与 MCP 工具,可直接驱动项目级软件开发、安全审计与复杂自动化流水线。
百万上下文
1M token 上下文窗口,支持项目级代码库与超长文档一次性载入。
编程能力跃升
编程能力较 GLM-5.2 提升 50%,复杂软件工程与终端操作达开源第一。
网络安全能力
白盒代码审查与漏洞发现,防御性安全任务表现突出。
后训练 Scaling
IndexShare / SAO / Slime 框架,同基座持续推高智能上界。
功能
深度思考✓
流式输出✓
工具调用✓
上下文缓存✓
结构化输出✓
联网搜索✓
批量任务✕
前缀补全✕
微调✕
定价
输入$1.4/M tokens
输入(缓存命中)$0.26/M tokens
输出$4.4/M tokens
速率限制与上下文
上下文窗口1M
最大输出128K
RPM(请求 / 分钟)200
TPM(token / 分钟)3M
内置工具
code_interpreter
Responses API
web_extractor
Responses API
web_search
Responses API
API 参考
POST
https://api.tokenfab.com/v1/chat/completions请求示例
curl https://api.tokenfab.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKENFAB_API_KEY" \
-d '{
"model": "glm-5.3",
"thinking": { "type": "enabled" },
"reasoning_effort": "max",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Review the following Python code for security vulnerabilities and suggest fixes."}
]
}'import os
from openai import OpenAI
client = OpenAI(
api_key=os.getenv("TOKENFAB_API_KEY"),
base_url="https://api.tokenfab.com/v1"
)
response = client.chat.completions.create(
model="glm-5.3",
thinking={"type": "enabled"},
reasoning_effort="max",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Review the following Python code for security vulnerabilities and suggest fixes."}
]
)
print(response.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.TOKENFAB_API_KEY,
baseURL: "https://api.tokenfab.com/v1"
});
const response = await client.chat.completions.create({
model: "glm-5.3",
thinking: { type: "enabled" },
reasoning_effort: "max",
messages: [
{ role: "system", content: "You are a helpful assistant." },
{ role: "user", content: "Review the following Python code for security vulnerabilities and suggest fixes." }
]
});
console.log(response.choices[0].message.content);响应示例
{
"id": "chatcmpl-glm53-9d2k7f1",
"object": "chat.completion",
"created": 1784950000,
"model": "glm-5.3",
"choices": [{
"index": 0,
"message": {
"role": "assistant",
"content": "The review found two risks: 1) user input is not parameterized, which allows SQL injection; 2) sensitive data is written to logs in plain text. Use prepared statements and mask sensitive data before logging."
},
"finish_reason": "stop"
}],
"usage": {
"prompt_tokens": 42,
"completion_tokens": 156,
"total_tokens": 198
}
}请求参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | ✓ | 模型 ID,填glm-5.3 |
messages | array | ✓ | 对话消息列表,含 role 和 content |
thinking | object | — | 思考配置,{"type":"enabled"}(仅支持启用,不支持禁用) |
reasoning_effort | enum | — | 思考强度:low / high / max,默认 max |
temperature | float | — | 采样温度,0–2,默认 0.7 |
top_p | float | — | 核采样,0–1,默认 0.9 |
max_tokens | int | — | 最大输出 Token 数 |
stream | bool | — | 是否流式输出,默认 false |
tools | array | — | 工具定义列表,用于 Function Calling |
tool_choice | string | — | 工具调用策略,auto / none / 指定函数 |