Responses
Uses the Responses protocol format — a unified surface for reasoning, agentic loops, and tool use.
POST https://wrouter.ai/v1/responsesResponses and Chat Completions cover the same conversational ground, but Responses is better for:
- Reasoning models (GPT-5, o3) with multi-step thinking & tool loops
- Agentic flows that need to interleave tool results in a stream
- Server-side session state via
previous_response_id
Key parameters
| Parameter | Type | Required | Notes |
|---|---|---|---|
model | string | ✓ | Use Responses-capable models such as gpt-5, o3 |
input | string | array | Input content — string or message array | |
instructions | string | System-style instructions | |
max_output_tokens | integer | Max output tokens (note: not max_tokens) | |
temperature | number | ||
top_p | number | ||
stream | boolean | SSE | |
tools | array | Built-in tools (web_search, code_interpreter, …) or custom functions | |
tool_choice | string | object | ||
reasoning | object | {"effort":"low"|"medium"|"high"} | |
previous_response_id | string | Continue from a prior response, server holds the state | |
truncation | string | "auto" | "disabled" |
Example
python
from openai import OpenAI
client = OpenAI(api_key="sk-...", base_url="https://wrouter.ai/v1")
r = client.responses.create(
model="gpt-5",
input="Compute 2^32 and explain the reasoning.",
reasoning={"effort": "medium"},
)
print(r.output_text)Choosing between Chat Completions and Responses
| Scenario | Prefer |
|---|---|
| Simple chat, maximum compatibility | Chat Completions |
| Reasoning + tool use | Responses |
| Cross-vendor portability | Chat Completions |
| Flagship reasoning models with native Responses support | Responses |
For models without native Responses support, WRouter does its best to translate — but some advanced features may degrade.