Skip to main content
GET
Related guide: Responses API guide. See the Responses API guide for a walkthrough with examples.
Lists the input items stored for a response. The response must have been created with store: true (the default); responses created with store: false return 404, as do responses that were deleted or are out of the API key’s project scope.

What is listed

The list contains the input stored for the response, which depends on how the response was created:
  • previous_response_id: the full chain, including the items carried over from earlier responses.
  • conversation: only the new turn sent with this response. Earlier turns are listed by GET /v3/conversations/{id}/messages, which requires the conversation list permission.
  • Compacted history: the dropped history appears as one compaction item.
Items of an earlier background response that was deleted no longer appear in the lists of later responses. Background responses that have not completed have no stored input yet, so the list is empty. Check status with Retrieve Response. A user message that uses {{var}} variables is listed as the template, not the rendered text. Redacted PII is restored in the listed text and file names; uploaded file contents keep their redaction placeholders. Media URLs expire after one hour.

Pagination

The response is { "object": "list", "data", "first_id", "last_id", "has_more" }. first_id and last_id are null on an empty page. The OpenAI SDKs paginate automatically when iterating the result. Item IDs are the IDs of the stored items. A function call inside a stored assistant message is listed as fc_<message_id>_<n>. Tool items run by the provider, such as web search, are listed under their stored ID, not the provider ID that the response output shows.

include

Pass include to select extra fields. Repeat the parameter, use include[], or separate values with commas. Unknown values return 400. Each of these fields is omitted unless its value is listed:
  • code_interpreter_call.outputs
  • computer_call_output.output.image_url
  • file_search_call.results
  • message.input_image.image_url
  • message.output_text.logprobs
  • reasoning.encrypted_content
  • web_search_call.action.sources
  • web_search_call.results

Media

Stored files are returned as presigned URLs valid for one hour. Image URLs on input messages are returned only with include=message.input_image.image_url. A file or image the API key cannot access, or that cannot be signed, is returned without a URL. Download media promptly, or list the items again for fresh URLs. file_id values are not stored and are not returned.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

response_id
string
required

The ID of the response to retrieve

Query Parameters

after
string

Cursor: return items after this item id.

limit
integer<int64>
default:20

Maximum number of items to return, 1 to 100.

Required range: 1 <= x <= 100
order
enum<string>
default:desc

Sort order by item position. Defaults to desc.

Available options:
asc,
desc
include
enum<string>[] | null

Additional fields to include. Each listed field is omitted unless requested. Accepts the OpenAI includables: code_interpreter_call.outputs, computer_call_output.output.image_url, file_search_call.results, message.input_image.image_url, message.output_text.logprobs, reasoning.encrypted_content, web_search_call.action.sources and web_search_call.results.

Available options:
code_interpreter_call.outputs,
computer_call_output.output.image_url,
file_search_call.results,
message.input_image.image_url,
message.output_text.logprobs,
reasoning.encrypted_content,
web_search_call.action.sources,
web_search_call.results

Response

Input items retrieved successfully.

data
any[]
required

Input items on the current page.

first_id
string | null
required

ID of the first item on the page. Null when the page is empty.

has_more
boolean
required

Whether further items exist beyond this page.

last_id
string | null
required

ID of the last item on the page. Null when the page is empty.

object
string
required

Object type, always list.