返回模型列表
GPT OSS 120B
openaiopenai/gpt-oss-120b
API 使用指南
Chat 调用
通过 TheRouter 使用标准 OpenAI 兼容的 chat completion。模型使用 harmony 聊天格式;TheRouter 会自动转换。
cURL
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-oss-120b",
"messages": [
{"role": "user", "content": "Explain the benefits of Mixture-of-Experts architecture in large language models."}
]
}'推理模式
通过系统消息设置推理努力级别。使用 'Reasoning: low'、'Reasoning: medium' 或 'Reasoning: high' 控制 CoT 长度和准确率。
cURL
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-oss-120b",
"messages": [
{"role": "system", "content": "Reasoning: high"},
{"role": "user", "content": "Prove that sqrt(2) is irrational."}
]
}'工具/函数调用
完全支持 OpenAI 兼容的工具和函数调用。使用标准 OpenAI 模式定义函数。
cURL
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-oss-120b",
"messages": [{"role": "user", "content": "What is the weather in Tokyo?"}],
"tools": [{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get current weather",
"parameters": {
"type": "object",
"properties": {"location": {"type": "string"}},
"required": ["location"]
}
}
}],
"tool_choice": "auto"
}'结构化输出
GPT OSS 120B 支持 OpenAI 结构化输出,确保 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-oss-120b",
"messages": [{"role": "user", "content": "List 3 machine learning frameworks."}],
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "framework_list",
"schema": {
"type": "object",
"properties": {
"frameworks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {"type": "string"},
"creator": {"type": "string"}
},
"required": ["name", "creator"]
}
}
},
"required": ["frameworks"]
}
}
}
}'事实档案 — 本页每条断言可在此回溯来源
| 来源 | URL | 采集于 | |
|---|---|---|---|
| 发布日期 | openai.com ↗ | 2026-05-29 | 已核实 |
| 架构 | arxiv.org ↗ | 2026-05-29 | 已核实 |
| 许可 | openai.com ↗ | 2026-05-29 | 已核实 |
| 知识截止日期 | arxiv.org ↗ | 2026-05-29 | 已核实 |
| 分词器 | arxiv.org ↗ | 2026-05-29 | 已核实 |
| 量化 | arxiv.org ↗ | 2026-05-29 | 已核实 |
| 检查点大小 | arxiv.org ↗ | 2026-05-29 | 已核实 |
| 训练算力 | arxiv.org ↗ | 2026-05-29 | 已核实 |
| 推理模式 | openai.com ↗ | 2026-05-29 | 已核实 |
| MMLU | arxiv.org ↗ | 2026-05-29 | 已核实 |
| AIME 2024 | arxiv.org ↗ | 2026-05-29 | 已核实 |
| AIME 2025 | arxiv.org ↗ | 2026-05-29 | 已核实 |
| Codeforces Elo | openai.com ↗ | 2026-05-29 | 待核实 |
| SWE-Bench Verified | arxiv.org ↗ | 2026-05-29 | 已核实 |
| GPQA Diamond | arxiv.org ↗ | 2026-05-29 | 已核实 |
| HLE | arxiv.org ↗ | 2026-05-29 | 已核实 |
| HealthBench | arxiv.org ↗ | 2026-05-29 | 已核实 |
| HealthBench Hard | arxiv.org ↗ | 2026-05-29 | 已核实 |
| Tau-Bench Retail | arxiv.org ↗ | 2026-05-29 | 已核实 |
| MMMLU (Average) | arxiv.org ↗ | 2026-05-29 | 已核实 |
| 我能否通过 TheRouter 的 API 使用 GPT OSS 120B,而无需自行托管? | openai.com ↗ | 2026-05-29 | 待核实 |
| GPT OSS 120B 使用什么许可证? | openai.com ↗ | 2026-05-29 | 待核实 |
| GPT OSS 120B 与 GPT-4o 相比如何? | arxiv.org ↗ | 2026-05-29 | 待核实 |
| 自行托管 GPT OSS 120B 需要什么硬件? | github.com ↗ | 2026-05-29 | 待核实 |