返回模型列表
GPT-5.4 Mini
openaiopenai/gpt-5.4-mini
API 使用指南
Chat 调用
GPT-5.4 Mini 支持完整的 chat completions API,包括工具调用、结构化输出、流式传输和推理强度控制。
cURL
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-5.4-mini",
"messages": [
{"role": "system", "content": "You are a helpful coding assistant."},
{"role": "user", "content": "Write a Python function to merge two sorted lists."}
],
"reasoning_effort": "medium"
}'流式传输
逐 token 流式响应,适合编程助手和聊天应用的实时交互。
cURL
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-5.4-mini",
"messages": [{"role": "user", "content": "Explain recursion in one sentence."}],
"stream": true
}'工具调用
GPT-5.4 Mini 擅长工具调用——MCP Atlas 57.7%、τ2-bench 93.4%,让它在复杂编排中表现可靠。
cURL
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-5.4-mini",
"messages": [{"role": "user", "content": "What is the weather in Tokyo?"}],
"tools": [{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get current weather for a city",
"parameters": {
"type": "object",
"properties": {
"city": {"type": "string"},
"units": {"type": "string", "enum": ["celsius", "fahrenheit"]}
},
"required": ["city"]
}
}
}],
"tool_choice": "auto"
}'视觉(图像输入)
GPT-5.4 Mini 接受图像与文本混合输入,用于多模态推理——截图分析、文档 OCR、UI 自动化。
cURL
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-5.4-mini",
"messages": [{
"role": "user",
"content": [
{"type": "text", "text": "Describe this image."},
{"type": "image_url", "image_url": {"url": "https://therouter.ai/assets/vision-sample.png"}}
]
}]
}'推理强度
控制 GPT-5.4 Mini 回答之前的思考深度。低强度追求速度,xhigh 在复杂编程和推理任务中追求最佳质量。
cURL
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-5.4-mini",
"messages": [{"role": "user", "content": "Solve this coding problem step by step."}],
"reasoning_effort": "xhigh"
}'事实档案 — 本页每条断言可在此回溯来源
| 来源 | URL | 采集于 | |
|---|---|---|---|
| 发布日期 | openai.com ↗ | 2026-05-29 | 已核实 |
| OpenAI 模型 id | developers.openai.com ↗ | 2026-05-29 | 已核实 |
| 训练数据截止 | — | — | 未知 |
| 推理强度档位 | openai.com ↗ | 2026-05-29 | 已核实 |
| 缓存输入价格 | developers.openai.com ↗ | 2026-05-29 | 已核实 |
| 可用渠道 | openai.com ↗ | 2026-05-29 | 已核实 |
| 许可 | — | — | 已核实 |
| SWE-bench Pro | openai.com ↗ | 2026-05-29 | 已核实 |
| Terminal-Bench 2.0 | openai.com ↗ | 2026-05-29 | 已核实 |
| GPQA Diamond | openai.com ↗ | 2026-05-29 | 已核实 |
| OSWorld-Verified | openai.com ↗ | 2026-05-29 | 已核实 |
| Toolathlon | openai.com ↗ | 2026-05-29 | 已核实 |
| MCP Atlas | openai.com ↗ | 2026-05-29 | 已核实 |
| τ2-bench (telecom) | openai.com ↗ | 2026-05-29 | 已核实 |
| HLE w/ tool | openai.com ↗ | 2026-05-29 | 已核实 |
| MMMUPro w/ Python | openai.com ↗ | 2026-05-29 | 已核实 |
| Graphwalks BFS 0K–128K | openai.com ↗ | 2026-05-29 | 已核实 |
| OpenAI 发布 GPT-5.4 Mini 与 Nano | openai.com ↗ | 2026-05-29 | 已核实 |
| GPT-5.4 Mini 与 GPT-5.4 相比如何? | openai.com ↗ | 2026-05-29 | 待核实 |
| GPT-5.4 Mini 支持哪些推理强度档位? | openai.com ↗ | 2026-05-29 | 待核实 |
| ChatGPT Free 是否可以使用 GPT-5.4 Mini? | help.openai.com ↗ | 2026-05-29 | 待核实 |
| 可以在 Codex 中使用 GPT-5.4 Mini 吗? | openai.com ↗ | 2026-05-29 | 待核实 |