The Responses API is currently supported for providers that implement the OpenAI Responses API contract. Check your provider’s documentation to confirm compatibility.
Create a model response
POST /v1/responses
Creates a new model response. The request body is forwarded to the provider.
Request
string
required
The provider to route the request to (e.g.
openai).string
required
Your Portkey API key or provider API key.
string
required
The model to use for the response (e.g.
gpt-4o).string | array
required
The input for the model. Can be a plain text string or an array of message objects.
string
The ID of a previous response to continue from. Enables multi-turn stateful conversations.
string
System-level instructions to guide the model’s behavior.
array
A list of tools the model may call. Follows the OpenAI tool definition format.
boolean
default:"false"
Whether to stream the response. When
true, the gateway returns server-sent events.number
Maximum number of tokens in the output.
Response
string
Unique identifier for the response.
string
Always
response.string
The model that generated the response.
string
Response status. Values:
completed, in_progress, failed, cancelled.array
Array of output items generated by the model.
object
Get a response
GET /v1/responses/:id
Retrieves a previously created model response by its ID.
Request
string
required
The ID of the response to retrieve.
string
required
The provider to route the request to.
string
required
Your Portkey API key or provider API key.
Response
Returns the response object. See Create a model response for the full field list.Delete a response
DELETE /v1/responses/:id
Deletes a stored model response.
Request
string
required
The ID of the response to delete.
string
required
The provider to route the request to.
string
required
Your Portkey API key or provider API key.
Response
string
The ID of the deleted response.
string
Always
response.boolean
true if the response was successfully deleted.List response input items
GET /v1/responses/:id/input_items
Returns the input items that were included in a response. This is useful for inspecting the full context that was sent to the model.
Request
string
required
The ID of the response whose input items to list.
string
required
The provider to route the request to.
string
required
Your Portkey API key or provider API key.
number
default:"20"
Maximum number of input items to return.
string
Cursor for pagination.
Response
string
Always
list.array
Array of input item objects representing the messages and context sent in the request.
boolean
Whether additional input items are available.