返回模型列表

o3

openaiopenai/o3

API 使用指南

Chat 调用

标准 OpenAI 兼容 chat 调用。o3 在 TheRouter 上通过 /v1/chat/completions 暴露——与 gpt-4o、gpt-5 完全一致的接口和 SDK。

cURL
curl https://api.therouter.ai/v1/chat/completions \
  -H "Authorization: Bearer $THEROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/o3",
    "messages": [
      {"role": "user", "content": "Prove that the sum of two odd numbers is even."}
    ]
  }'

Reasoning 强度控制

o3 支持 reasoning_effort = low | medium | high。更高的 effort 意味着更深的推理链与更多 reasoning token(按输出计费)。默认 medium。

cURL
curl https://api.therouter.ai/v1/chat/completions \
  -H "Authorization: Bearer $THEROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/o3",
    "reasoning_effort": "high",
    "messages": [
      {"role": "user", "content": "Walk through the failure modes of a 2-of-3 Raft cluster losing a leader."}
    ]
  }'

视觉输入

o3 接受文本 + 图像输入。在 user 消息中传 image_url 部分即可——与 gpt-4o 多模态调用结构一致,输出仅为文本。

cURL
curl https://api.therouter.ai/v1/chat/completions \
  -H "Authorization: Bearer $THEROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/o3",
    "messages": [
      {"role": "user", "content": [
        {"type": "text", "text": "What is wrong with this architecture diagram?"},
        {"type": "image_url", "image_url": {"url": "https://therouter.ai/assets/vision-sample.png"}}
      ]}
    ]
  }'

工具调用

o3 支持 OpenAI 风格的 function calling 与结构化输出。OpenAI 推理最佳实践建议:宁可少而精、把工具描述写清楚,避免一长串平铺工具。

cURL
curl https://api.therouter.ai/v1/chat/completions \
  -H "Authorization: Bearer $THEROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/o3",
    "messages": [{"role": "user", "content": "What is the weather in Tokyo right now?"}],
    "tools": [
      {
        "type": "function",
        "function": {
          "name": "get_weather",
          "description": "Get the current weather for a city.",
          "parameters": {
            "type": "object",
            "properties": {"city": {"type": "string"}},
            "required": ["city"]
          }
        }
      }
    ]
  }'
事实档案 — 本页每条断言可在此回溯来源
来源URL采集于
发布日期openai.com ↗2026-05-31已核实
快照版本developers.openai.com ↗2026-05-31已核实
知识截止日期developers.openai.com ↗2026-05-31已核实
上下文窗口developers.openai.com ↗2026-05-31已核实
最大输出 Tokendevelopers.openai.com ↗2026-05-31已核实
推理 Tokendevelopers.openai.com ↗2026-05-31已核实
状态developers.openai.com/deprecations ↗2026-05-31已核实
Codeforcesopenai.com ↗2026-05-31已核实
SWE-bench Verifiedopenai.com ↗2026-05-31已核实
AIME 2024openai.com ↗2026-05-31已核实
AIME 2025openai.com ↗2026-05-31已核实
GPQA Diamonddatacamp.com ↗2026-05-31待核实
MMMUopenai.com ↗2026-05-31待核实
o3-pro 在 API 与 ChatGPT Pro 上线OpenAI Help Center ↗2026-05-31已核实
OpenAI o3 与 o4-mini 发布openai.com ↗2026-05-31已核实
o3 现在弃用了吗?developers.openai.com ↗2026-05-31待核实
o3 的上下文窗口与最大输出是多少?developers.openai.com ↗2026-05-31待核实
o3 支持图像输入吗?developers.openai.com ↗2026-05-31待核实
o3 与 GPT-5 在价格上如何对比?developers.openai.com ↗2026-05-31待核实
帮助与联系