Skip to content

Responses

Uses the Responses protocol format — a unified surface for reasoning, agentic loops, and tool use.

POST https://wrouter.ai/v1/responses

Responses 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

ParameterTypeRequiredNotes
modelstringUse Responses-capable models such as gpt-5, o3
inputstring | arrayInput content — string or message array
instructionsstringSystem-style instructions
max_output_tokensintegerMax output tokens (note: not max_tokens)
temperaturenumber
top_pnumber
streambooleanSSE
toolsarrayBuilt-in tools (web_search, code_interpreter, …) or custom functions
tool_choicestring | object
reasoningobject{"effort":"low"|"medium"|"high"}
previous_response_idstringContinue from a prior response, server holds the state
truncationstring"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

ScenarioPrefer
Simple chat, maximum compatibilityChat Completions
Reasoning + tool useResponses
Cross-vendor portabilityChat Completions
Flagship reasoning models with native Responses supportResponses

For models without native Responses support, WRouter does its best to translate — but some advanced features may degrade.