Back to Models

GPT-5 Mini

openaiopenai/gpt-5-mini

API guide

Chat completion

GPT-5 Mini is called via the standard chat completions endpoint through TheRouter, exactly like any OpenAI-compatible model. All GPT-5 parameters are supported: reasoning_effort, verbosity, response_format, tools, and stop sequences.

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" }
  }'

Streaming

GPT-5 Mini supports streaming for real-time token-by-token output. Combined with low reasoning effort, this gives near-instant start-of-response for classification and summary tasks.

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
  }'

Reasoning effort

GPT-5 Mini supports the full reasoning_effort spectrum: minimal for fast answers on simple tasks, low for balanced quality/speed on structured work, medium as the default, and high for deeper reasoning. The minimal setting eliminates chain-of-thought entirely for near-instant classification.

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" }
  }'

Tool calling

GPT-5 Mini supports parallel tool calls and the new custom_tools type with grammar-constrained plaintext. Ideal for tool orchestration agents that need low latency but can trade some reasoning depth.

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
  }'

Vision

GPT-5 Mini accepts image inputs (JPEG, PNG, GIF, WebP) alongside text prompts. The model can read charts, diagrams, screenshots, and photographs β€” outputting structured text or JSON. Ideal for document processing pipelines where cost per page matters.

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" }
  }'
Fact ledger β€” every claim on this page traces here
sourceURLretrieved
Release dateopenai.com β†—2026-05-28verified
Knowledge cutoffartificialanalysis.ai β†—2026-05-28to verify
OpenAI model idplatform.openai.com β†—2026-05-28verified
Licenseβ€”β€”verified
SWE-bench Verifiedreddit.com / SWE-bench team AMA β†—2026-05-28to verify
AIME 2025openai.com β†—2026-05-28to verify
MMMU (Multimodal)openai.com β†—2026-05-28to verify
OpenAI launches GPT-5 family: GPT-5, GPT-5 Mini, GPT-5 Nanoopenai.com β†—2026-05-28verified
How does GPT-5 Mini differ from GPT-5?artificialanalysis.ai β†—2026-05-28to verify
Help & contact