Responses
The Responses API is suitable for clients, coding agents, and new application frameworks that use the OpenAI Responses protocol. It is commonly used when a unified input structure, tool calling, reasoning controls, or more complex response structures are needed.
Endpoint
Section titled “Endpoint”POST /v1/responsesFull URL:
https://www.routeapi.ai/v1/responsesRequest example
Section titled “Request example”curl https://www.routeapi.ai/v1/responses \ -H "Authorization: Bearer $ROUTEAPI_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-4o", "input": "Explain the main purpose of RouteAPI" }'Common parameters
Section titled “Common parameters”| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model ID |
input | string/array | Yes | Input content |
instructions | string | No | System-level instructions |
stream | boolean | No | Whether to stream output |
tools | array | No | Tool definitions |
tool_choice | string/object | No | Tool choice strategy |
temperature | number | No | Sampling temperature |
max_output_tokens | number | No | Maximum output token count |
Differences from Chat Completions
Section titled “Differences from Chat Completions”| Item | Chat Completions | Responses |
|---|---|---|
| Input structure | messages | input + instructions |
| Compatibility range | Most traditional OpenAI SDK compatible clients | More common in new protocol clients and coding agents |
| Tool calling | Supported, depends on the selected model | Supported, usually more expressive |
| Recommended scenarios | General chat and compatible access | New projects, coding agents, complex tasks |
Integration suggestions
Section titled “Integration suggestions”- If the client explicitly requires the OpenAI Responses protocol, use
/v1/responses. - If the client only supports traditional OpenAI Chat Completions, use
/v1/chat/completions. - Whether the same model supports Responses depends on RouteAPI model configuration and service capabilities.