Responses
OpenAI-compatible
Responses
POST /v1/responses — OpenAI’s newer unified response endpoint
POST
Responses
/v1/responses is OpenAI’s newer endpoint that manages multi-step conversations and tool calls with a unified response object, suited to agent scenarios.
OpenAI now positions the Responses API as the recommended default interface — prefer it for new projects; Chat Completions remains supported long-term with backward compatibility.
Differences from chat/completions
| Dimension | /v1/chat/completions | /v1/responses |
|---|---|---|
| Input | messages array | input (a string, message array, or previous_response_id) |
| State | Stateless, full history sent each time | Optionally stateful (store: true) |
| Tools | tools + tool_calls | Built-in web_search, file_search, code_interpreter |
| Model scope | All models | Mainly newer OpenAI models |
Request
Main parameters
| Field | Type | Description |
|---|---|---|
model | string | Model ID |
input | string | array | Input content, plain text or a multimodal array |
instructions | string | Equivalent to a system prompt |
previous_response_id | string | Continue from a previous response without resending history |
tools | array | Built-in tools or custom functions |
tool_choice | string | object | Tool selection strategy |
stream | boolean | Streaming output |
store | boolean | Whether to save conversation state server-side |
temperature / top_p | number | Sampling parameters |
max_output_tokens | integer | Maximum output tokens |
reasoning | object | { effort: "high" } reasoning effort |
metadata | object | Business labels |
user | string | End-user identifier |
Response
response.output_text (an SDK helper field).
Multi-turn conversation
The second turn doesn’t resend history — useprevious_response_id:
store: true in the first request so OpenPAI retains the state.
Reasoning
Built-in tools
web_search— search the webfile_search— retrieve from uploaded filescode_interpreter— execute code in a sandbox