返回模型列表
GPT-5
openaiopenai/gpt-5
API 使用指南
Chat 调用
标准 Chat 补全。GPT-5 支持完整的 OpenAI Chat 接口,包含 reasoning_effort 和 verbosity 参数。
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",
"messages": [{"role": "user", "content": "Explain how multi-agent coordination works"}],
"reasoning_effort": "medium",
"verbosity": "high"
}'流式输出
GPT-5 支持含推理 token 的流式输出——使用 stream_options include_usage 跟踪 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",
"messages": [{"role": "user", "content": "Explain quantum computing in 3 bullet points"}],
"stream": true,
"stream_options": {"include_usage": true}
}'工具调用
GPT-5 擅长工具调用,支持可靠的多步链式调用。支持并行工具调用和带文法约束的全新 custom_tools 类型。
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",
"messages": [{"role": "user", "content": "Book a flight from NYC to London"}],
"tools": [{
"type": "function",
"function": {
"name": "search_flights",
"description": "Search available flights",
"parameters": {
"type": "object",
"properties": {
"origin": {"type": "string"},
"destination": {"type": "string"},
"date": {"type": "string"}
},
"required": ["origin", "destination", "date"]
}
}
}],
"parallel_tool_calls": true
}'JSON 模式
通过 response_format 结构化 JSON 输出。
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","messages":[{"role":"user","content":"Extract: Invoice #1234 for $500"}],"response_format":{"type":"json_object"}}'近期动态
事实档案 — 本页每条断言可在此回溯来源
| 来源 | URL | 采集于 | |
|---|---|---|---|
| 发布日期 | openai.com ↗ | 2026-05-28 | 已核实 |
| OpenAI 模型 ID | openai.com/dev ↗ | 2026-05-28 | 已核实 |
| 训练数据截止 | — | — | 未知 |
| 推理强度档位 | openai.com/dev ↗ | 2026-05-28 | 已核实 |
| 详细程度档位 | openai.com/dev ↗ | 2026-05-28 | 已核实 |
| 自定义工具类型支持 | openai.com/dev ↗ | 2026-05-28 | 已核实 |
| 在 GPT-5 系列中的状态 | help.openai.com ↗ | 2026-05-28 | 已核实 |
| 许可 | — | — | 已核实 |
| SWE-bench Verified | openai.com/dev ↗ | 2026-05-28 | 已核实 |
| Aider Polyglot | openai.com/dev ↗ | 2026-05-28 | 已核实 |
| AIME 2025 | openai.com ↗ | 2026-05-28 | 已核实 |
| MMMU | openai.com ↗ | 2026-05-28 | 已核实 |
| τ2-bench (telecom) | openai.com/dev ↗ | 2026-05-28 | 已核实 |
| HealthBench Hard | openai.com ↗ | 2026-05-28 | 已核实 |
| GPQA | openai.com ↗ | 2026-05-28 | 已核实 |
| Scale MultiChallenge | openai.com/dev ↗ | 2026-05-28 | 已核实 |
| OpenAI 发布 GPT-5 | openai.com ↗ | 2026-05-28 | 已核实 |
| GPT-5 (Instant/Thinking) ChatGPT 退役 | help.openai.com ↗ | 2026-05-28 | 已核实 |
| API 的 gpt-5 和 ChatGPT 的 GPT-5 有何区别? | openai.com ↗ | 2026-05-28 | 待核实 |
| 原版 gpt-5 和 GPT-5.2/5.4/5.5 有何不同? | help.openai.com ↗ | 2026-05-28 | 待核实 |
| 什么是 custom_tools? | openai.com ↗ | 2026-05-28 | 待核实 |