Back to Models

GPT-5

openaiopenai/gpt-5

API guide

Chat completion

Standard chat completion. GPT-5 supports the full OpenAI chat interface with reasoning_effort and verbosity parameters.

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

Streaming

GPT-5 supports streaming with reasoning tokens β€” use stream_options include_usage for token usage tracking.

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

Tool calling

GPT-5 excels at tool calling with reliable multi-step chaining. Supports parallel tool calls and the new custom_tools type with grammar constraints.

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 mode

Structured JSON output via response_format.

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

Recent coverage

Fact ledger β€” every claim on this page traces here
sourceURLretrieved
Release dateopenai.com β†—2026-05-28verified
OpenAI model idopenai.com/dev β†—2026-05-28verified
Training cutoffβ€”β€”unknown
Reasoning effort levelsopenai.com/dev β†—2026-05-28verified
Verbosity levelsopenai.com/dev β†—2026-05-28verified
Custom tool type supportopenai.com/dev β†—2026-05-28verified
Status in GPT-5 familyhelp.openai.com β†—2026-05-28verified
Licenseβ€”β€”verified
SWE-bench Verifiedopenai.com/dev β†—2026-05-28verified
Aider Polyglotopenai.com/dev β†—2026-05-28verified
AIME 2025openai.com β†—2026-05-28verified
MMMUopenai.com β†—2026-05-28verified
Ο„2-bench (telecom)openai.com/dev β†—2026-05-28verified
HealthBench Hardopenai.com β†—2026-05-28verified
GPQAopenai.com β†—2026-05-28verified
Scale MultiChallengeopenai.com/dev β†—2026-05-28verified
OpenAI launches GPT-5openai.com β†—2026-05-28verified
GPT-5 (Instant/Thinking) retired in ChatGPThelp.openai.com β†—2026-05-28verified
What's the difference between gpt-5 in the API and GPT-5 in ChatGPT?openai.com β†—2026-05-28to verify
How does original gpt-5 differ from GPT-5.2 / 5.4 / 5.5?help.openai.com β†—2026-05-28to verify
What are custom_tools and how do they work?openai.com β†—2026-05-28to verify
Help & contact