GLM-5.3-Flash 是 Z.ai 推出的原生多模态模型,适用于高效编码和长时程智能体任务。其混合稀疏与线性注意力架构在显著降低服务成本的同时,保持了精准的长上下文行为。320B 总参数 / 18B 激活参数,1M token 上下文,支持文本、图像、视频输入,文本输出。
使用任意兼容 OpenAI 的 SDK,或直接发送 HTTP 请求。 获取 API Key
export ORCAROUTER_API_KEY=…https://api.orcarouter.ai/v1原生接口: Anthropic SDK https://api.orcarouter.ai
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.orcarouter.ai/v1",
api_key=os.environ["ORCAROUTER_API_KEY"],
)
response = client.chat.completions.create(
model="z-ai/glm-5.3-flash-free",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content){
"id": "chatcmpl-…",
"object": "chat.completion",
"created": 1763280000,
"model": "z-ai/glm-5.3-flash-free",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! How can I help you today?"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 9,
"completion_tokens": 10,
"total_tokens": 19
}
}choices[0].message.content — 模型的回答。finish_reason — "stop" 表示回答已完整结束;"length" 表示达到 max_tokens 被截断。usage — 本次调用计费的输入和输出 token 数。返回 HTTP 200 且 finish_reason 为 "stop",说明调用成功。
| 参数 | 作用 |
|---|---|
max_tokens | 模型最多生成的 token 数。 |
temperature | 采样随机性:越低越稳定,越高越多样。 |
tools | 模型可调用的函数,用 JSON Schema 描述。 |
response_format | 强制输出 JSON,可指定 JSON Schema。 |
reasoning_effort | 回答前的推理强度:low、medium 或 high。 |
top_p | 核采样:只从累计概率在此范围内的 token 中选取。 |
stop | 遇到这些序列时模型停止生成。 |
tool_choice | 控制模型必须、可以或不得调用工具。 |
reasoning | 配置模型推理:推理强度、token 预算或关闭。 |
include_reasoning | 随回答一并返回模型的推理过程文本。 |
stream | 以 SSE 流式返回,边生成边发送。 |
真人偏好与真实任务
嵌入此徽章
@misc{orcarouter_glm_5_3_flash_free,
title = {GLM 5.3 Flash (Free) API},
author = {Z.ai},
year = {n.d.},
howpublished = {OrcaRouter},
url = {https://www.orcarouter.ai/models/z-ai/glm-5.3-flash-free}
}Z.ai. (n.d.). GLM 5.3 Flash (Free) API. OrcaRouter. https://www.orcarouter.ai/models/z-ai/glm-5.3-flash-free