
Flagship coding and agentic model with a 1M token context, 128K output, image, video, and file input, always-on reasoning at low, high, or max effort, native web search, and tool calling.
Flagship coding and agentic model with a 1M token context, 128K output, image, video, and file input, always-on reasoning at low, high, or max effort, native web search, and tool calling.
Notes: - Context window: 1M tokens - Maximum output: 128K tokens - Accepts text, image, video, and file input - Always reasons; thinking cannot be disabled - Reasoning effort: low, high, or max (max recommended for complex coding) - A request for a different effort, or to turn thinking off, is served at the nearest supported level - Built-in web search adds $0.033 per request when used - Supports function calling (tool choice auto or none), structured output (JSON mode), and streaming
也称为 Z.ai GLM 5.4
glm-5-4/v1/chat/completionsPOST/v1/responsesPOST/v1/messagesPOST/v1beta/models/glm-5-4:generateContentglm-5.4zai/glm-5.4zhipu/glm-5.4来自 EmpirioLabs 目录的实时按量计费价格。也可以选择包含每周用量额度的套餐。
GLM 5.4 提供 OpenAI 兼容的 Chat Completions API。用你的 EmpirioLabs API 密钥把任意 OpenAI SDK 指向 https://api.empiriolabs.ai/v1,并使用模型 ID glm-5-4。 在EmpirioLabs 控制台获取 API 密钥。
curl https://api.empiriolabs.ai/v1/chat/completions \
-H "Authorization: Bearer $EMPIRIOLABS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5-4",
"messages": [
{"role": "user", "content": "Write a haiku about the ocean."}
]
}'from openai import OpenAI
client = OpenAI(
base_url="https://api.empiriolabs.ai/v1",
api_key="YOUR_EMPIRIOLABS_API_KEY",
)
response = client.chat.completions.create(
model="glm-5-4",
messages=[{"role": "user", "content": "Write a haiku about the ocean."}],
)
print(response.choices[0].message.content)EmpirioLabs 上 GLM 5.4 API 支持的请求参数。省略字段时使用默认值。
| 参数 | 类型 | 默认值 | 范围 / 值 | 描述 |
|---|---|---|---|---|
| max_tokens | integer | 65536 | 1 到 131072 | Maximum number of output tokens to generate. |
| temperature | number | 1 | 0 到 1 | Controls randomness. Lower values make responses more deterministic. |
| top_p | number | 0.95 | 0.01 到 1 | Nucleus sampling cutoff. |
| reasoning_effort | enum | max | low, high, max | This model always reasons and cannot be turned off. low is lightweight, high is enhanced, and max is deep reasoning. max is recommended for complex coding. |
| preserve_thinking | boolean | false | - | Include the reasoning of earlier assistant turns in the model's input on /v1/chat/completions. Return each turn's reasoning unchanged in that assistant message's... |
| do_sample | boolean | true | - | Enable sampling. Turn off for greedy deterministic output (temperature and top_p are ignored). |
| tool_web_search | boolean | false | - | Enable built-in web search. Adds $0.033 per request when used. |
| search_recency_filter | enum | noLimit | oneDay, oneWeek, oneMonth, oneYear, noLimit | Limit web search results to a recency window. |
| count | integer | 10 | 1 到 50 | Number of web search results to retrieve when web search is enabled. |
| search_domain_filter | string | - | - | Restrict web search to a specific domain. |
| search_prompt | string | - | - | Optional prompt used to summarize retrieved web search results. |
| search_result | boolean | true | - | Return web search result metadata in the response when web search is enabled. |
| tool_stream | boolean | false | - | Stream function-call arguments incrementally when streaming. |
| tools | array | [] | - | OpenAI-compatible function calling tool definitions. A web_search tool sent here keeps its own search options as written, with count from 1 to 50. |
涵盖这个模型的公告、提示词测试和对比文章。
在 EmpirioLabs,GLM 5.4 按量计费:输入 $1.40 per 1M prompt tokens; 输出 $4.40 per 1M generated tokens; Web search $0.033 per request。也可以选择包含每周用量额度的套餐。本页的实时价格表始终与 API 的实际计费一致。
GLM 5.4 接受 文本, 图像, 视频, 文件 作为输入,并返回 文本。
GLM 5.4 支持 1M token 的上下文窗口,每次响应最多 131,072 个输出 token。
兼容。GLM 5.4 提供 OpenAI 兼容的 Chat Completions API,现有 OpenAI SDK 只需把 base_url 指向 https://api.empiriolabs.ai/v1 并把模型 ID 设为 glm-5-4 即可使用。
在请求中将 glm-5-4 作为 model 发送。备用 ID glm-5.4, zai/glm-5.4, zhipu/glm-5.4 同样可用。
Z.ai 于 2026年12月2日 发布了 GLM 5.4。
EmpirioLabs 上的 GLM 5.4 从 Singapore 提供服务。
可以。EmpirioLabs Playground在浏览器中以与 API 相同的参数运行 GLM 5.4,你可以在写代码之前先测试提示词。
创建 EmpirioLabs 账户,然后在控制台的 API Keys生成密钥。计费使用按量付费的额度,只为实际发出的请求付费。也可以选择包含每周用量额度的套餐。