/v1/responses endpoint implements the OpenAI Responses API, which supports stateful multi-turn conversations with built-in conversation history management. It is an alternative to /v1/chat/completions for workflows that require OpenAI’s newer response format. Pass a previous_response_id to continue a conversation without resending full message history.
Endpoint
When to use this endpoint
Use/v1/responses if:
- Your application is built on the OpenAI Responses API
- You need stateful conversation management
- You use the
previous_response_idparameter for multi-turn conversations
/v1/chat/completions is the recommended endpoint and has broader model support.
Request
Headers
Body parameters
Model ID to use. Only models that support the Responses API format are valid here.
The user input for this turn. Can be a string or an array of content objects.
System-level instructions for the model (equivalent to the
system message in chat completions).The
id of a previous response. When provided, the model continues the conversation from that point without the client needing to send history.Maximum number of tokens to generate.
If
true, returns a stream of server-sent events. Default: false.Example request
python
Multi-turn with previous_response_id
python
Response
Response fields
Unique identifier for this response. Pass it as
previous_response_id to continue the conversation.Always
"response".Unix timestamp of when the response was created.
The model that generated the response.
Array of output objects produced by the model.
Token counts for billing.