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
| source | URL | retrieved | |
|---|---|---|---|
| Release date | openai.com β | 2026-05-28 | verified |
| OpenAI model id | openai.com/dev β | 2026-05-28 | verified |
| Training cutoff | β | β | unknown |
| Reasoning effort levels | openai.com/dev β | 2026-05-28 | verified |
| Verbosity levels | openai.com/dev β | 2026-05-28 | verified |
| Custom tool type support | openai.com/dev β | 2026-05-28 | verified |
| Status in GPT-5 family | help.openai.com β | 2026-05-28 | verified |
| License | β | β | verified |
| SWE-bench Verified | openai.com/dev β | 2026-05-28 | verified |
| Aider Polyglot | openai.com/dev β | 2026-05-28 | verified |
| AIME 2025 | openai.com β | 2026-05-28 | verified |
| MMMU | openai.com β | 2026-05-28 | verified |
| Ο2-bench (telecom) | openai.com/dev β | 2026-05-28 | verified |
| HealthBench Hard | openai.com β | 2026-05-28 | verified |
| GPQA | openai.com β | 2026-05-28 | verified |
| Scale MultiChallenge | openai.com/dev β | 2026-05-28 | verified |
| OpenAI launches GPT-5 | openai.com β | 2026-05-28 | verified |
| GPT-5 (Instant/Thinking) retired in ChatGPT | help.openai.com β | 2026-05-28 | verified |
| What's the difference between gpt-5 in the API and GPT-5 in ChatGPT? | openai.com β | 2026-05-28 | to verify |
| How does original gpt-5 differ from GPT-5.2 / 5.4 / 5.5? | help.openai.com β | 2026-05-28 | to verify |
| What are custom_tools and how do they work? | openai.com β | 2026-05-28 | to verify |