Returns a list of input items for a given response.

GET /responses/{response_id}/input_items

Path parameters

  • response_id string Required

    The ID of the response to retrieve input items for.

Query parameters

  • limit integer

    A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.

    Default value is 20.

  • order string

    The order to return the input items in. Default is asc.

    • asc: Return the input items in ascending order.
    • desc: Return the input items in descending order.

    Values are asc or desc.

  • after string

    An item ID to list items after, used in pagination.

  • before string

    An item ID to list items before, used in pagination.

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • object string Required

      The type of object returned, must be list.

      Value is list.

    • data array[object] Required

      A list of items used to generate this response.

      Content item used to generate a response.

      Content item used to generate a response.

      One of:

      A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role.

      Hide attributes Show attributes
      • type string Discriminator

        The type of the message input. Always set to message.

        Value is message.

      • role string Required

        The role of the message input. One of user, system, or developer.

        Values are user, system, or developer.

      • status string

        The status of item. One of in_progress, completed, or incomplete. Populated when items are returned via API.

        Values are in_progress, completed, or incomplete.

      • content array[object] Required

        A list of one or many input items to the model, containing different content types.

        One of:

        A text input to the model.

        Hide attributes Show attributes
        • type string Required

          The type of the input item. Always input_text.

          Value is input_text.

        • text string Required

          The text input to the model.

      • id string Required

        The unique ID of the message input.

    • has_more boolean Required

      Whether there are more items available.

    • first_id string Required

      The ID of the first item in the list.

    • last_id string Required

      The ID of the last item in the list.

GET /responses/{response_id}/input_items
curl \
 --request GET 'https://api.openai.com/v1/responses/{response_id}/input_items' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "object": "list",
  "data": [
    {
      "type": "message",
      "role": "user",
      "status": "in_progress",
      "content": [
        {
          "type": "input_text",
          "text": "string"
        }
      ],
      "id": "string"
    }
  ],
  "has_more": true,
  "first_id": "string",
  "last_id": "string"
}