DeepSeek-V4.1-Flash正式上线·1M 上下文、联网搜索、工具调用全支持
立即体验

GLM-5.3

glm-5.3
开源GLM 系列

概述

1M 上下文代码生成智能体深度思考

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 参考

POSThttps://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."}
    ]
  }'

响应示例

{
  "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
  }
}

请求参数

参数类型必填说明
modelstring✓模型 ID,填glm-5.3
messagesarray✓对话消息列表,含 role 和 content
thinkingobject—思考配置,{"type":"enabled"}(仅支持启用,不支持禁用)
reasoning_effortenum—思考强度:low / high / max,默认 max
temperaturefloat—采样温度,0–2,默认 0.7
top_pfloat—核采样,0–1,默认 0.9
max_tokensint—最大输出 Token 数
streambool—是否流式输出,默认 false
toolsarray—工具定义列表,用于 Function Calling
tool_choicestring—工具调用策略,auto / none / 指定函数