返回模型列表

GPT-5 Mini

openaiopenai/gpt-5-mini

API 使用指南

Chat 调用

GPT-5 Mini 通过 TheRouter 的标准 chat completions endpoint 调用,与任何兼容 OpenAI 的模型一样。支持所有 GPT-5 参数。

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-mini",
    "messages": [
      {"role": "user", "content": "Classify the sentiment of this customer review as positive, negative, or neutral: \"The product arrived on time but the packaging was damaged.\""}
    ],
    "reasoning_effort": "low",
    "response_format": { "type": "json_object" }
  }'

流式输出

GPT-5 Mini 支持流式输出。配合低推理努力参数,可提供近乎即时的响应开始。

cURL
curl https://api.therouter.ai/v1/chat/completions \
  -H "Authorization: Bearer $THEROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: text/event-stream" \
  -d '{
    "model": "openai/gpt-5-mini",
    "messages": [
      {"role": "user", "content": "Summarize this article in three bullet points: <article text>"}
    ],
    "reasoning_effort": "low",
    "stream": true
  }'

推理努力参数

GPT-5 Mini 支持完整的 reasoning_effort 范围:minimal 用于简单任务的快速回答,low 用于结构化工作的平衡质量/速度,medium 为默认值,high 用于深度推理。

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-mini",
    "messages": [
      {"role": "user", "content": "Extract all email addresses, phone numbers, and dates from this text block."}
    ],
    "reasoning_effort": "minimal",
    "response_format": { "type": "json_object" }
  }'

工具调用

GPT-5 Mini 支持并行工具调用和带文法定制的 custom_tools。适合需要低延迟但可接受部分推理深度的工具编排 Agent。

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-mini",
    "messages": [
      {"role": "user", "content": "Look up weather for Shanghai and Tokyo, then compare"}
    ],
    "tools": [{
      "type": "function",
      "function": {
        "name": "get_weather",
        "description": "Get current weather for a city",
        "parameters": {
          "type": "object",
          "properties": { "city": { "type": "string" }, "country": { "type": "string" } }
        }
      }
    }],
    "tool_choice": "auto",
    "parallel_tool_calls": true
  }'

视觉

GPT-5 Mini 可将图片(JPEG、PNG、GIF、WebP)与文本提示一同输入。适用于文档处理管线的成本敏感型视觉任务。

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-mini",
    "messages": [
      {
        "role": "user",
        "content": [
          {"type": "text", "text": "Extract the table from this screenshot as JSON"}, 
          {"type": "image_url", "image_url": {"url": "https://therouter.ai/assets/vision-sample.png"}}
        ]
      }
    ],
    "response_format": { "type": "json_object" }
  }'
事实档案 — 本页每条断言可在此回溯来源
来源URL采集于
发布日期openai.com ↗2026-05-28已核实
知识截止日期artificialanalysis.ai ↗2026-05-28待核实
OpenAI 模型 IDplatform.openai.com ↗2026-05-28已核实
许可——已核实
SWE-bench Verifiedreddit.com / SWE-bench team AMA ↗2026-05-28待核实
AIME 2025openai.com ↗2026-05-28待核实
MMMU (Multimodal)openai.com ↗2026-05-28待核实
OpenAI 发布 GPT-5 系列:GPT-5、GPT-5 Mini、GPT-5 Nanoopenai.com ↗2026-05-28已核实
GPT-5 Mini 和 GPT-5 有什么区别?artificialanalysis.ai ↗2026-05-28待核实
帮助与联系