List input items
responses.input_items.list(strresponse_id, InputItemListParams**kwargs) -> SyncCursorPage[ResponseItem]
GET/responses/{response_id}/input_items
Returns a list of input items for a given response.
List input items
from openai import OpenAI
client = OpenAI()
response = client.responses.input_items.list("resp_123")
print(response.data)
{
"object": "list",
"data": [
{
"id": "msg_abc123",
"type": "message",
"role": "user",
"content": [
{
"type": "input_text",
"text": "Tell me a three sentence bedtime story about a unicorn."
}
]
}
],
"first_id": "msg_abc123",
"last_id": "msg_abc123",
"has_more": false
}
Returns Examples
{
"object": "list",
"data": [
{
"id": "msg_abc123",
"type": "message",
"role": "user",
"content": [
{
"type": "input_text",
"text": "Tell me a three sentence bedtime story about a unicorn."
}
]
}
],
"first_id": "msg_abc123",
"last_id": "msg_abc123",
"has_more": false
}