List input items
List the input items of a stored response, newest first by default. Unknown ids return 404.
GET
/v1/responses/{id}/input_itemsQuery parameters: limit (1–100, default 20), order (asc/desc, default desc), after (cursor), include. Requires API-key authentication; 503 redis_not_available without Redis.
Request
bash
curl "http://localhost:8080/v1/responses/resp_9f2c…/input_items?limit=2&order=asc" \
-H "Authorization: Bearer $LLM_PROXY_KEY"Request — OpenAI SDK
python
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8080/v1", api_key="sk-your-proxy-key")
items = client.responses.input_items.list("resp_9f2c…", limit=2, order="asc")
for item in items.data:
print(item.type)Response
json
{
"object": "list",
"data": [
{
"id": "msg_9f2c…",
"type": "message",
"role": "user",
"content": [{"type": "input_text", "text": "Hello!"}]
},
{
"id": "msg_8b1d…",
"type": "message",
"role": "assistant",
"status": "completed",
"content": [
{"type": "output_text", "text": "Hello! How can I help?", "annotations": []}
]
}
],
"first_id": "msg_9f2c…",
"last_id": "msg_8b1d…",
"has_more": false
}include values
include accepts:
file_search_call.resultsweb_search_call.resultsweb_search_call.action.sourcesmessage.input_image.image_urlcomputer_call_output.output.image_urlcode_interpreter_call.outputsreasoning.encrypted_contentmessage.output_text.logprobs
Stored items are returned as stored. reasoning.encrypted_content is stripped from stored reasoning items unless it is requested via include — the spec gates encrypted reasoning behind that value, and proxy-materialized input may carry a blob the client never received. Unknown values → 400 invalid_include. An after id that is not an input item of the response → 400 invalid_cursor.
Pagination
Pass the last item's id as after to fetch the next page while has_more is true.
Related
- Create response — storage model
- Retrieve response
Request
bash
curl "http://localhost:8080/v1/responses/resp_9f2c…/input_items?limit=2&order=asc" \
-H "Authorization: Bearer $LLM_PROXY_KEY"Request — OpenAI SDK
python
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8080/v1", api_key="sk-your-proxy-key")
items = client.responses.input_items.list("resp_9f2c…", limit=2, order="asc")
for item in items.data:
print(item.type)Response
json
{
"object": "list",
"data": [
{
"id": "msg_9f2c…",
"type": "message",
"role": "user",
"content": [{"type": "input_text", "text": "Hello!"}]
},
{
"id": "msg_8b1d…",
"type": "message",
"role": "assistant",
"status": "completed",
"content": [
{"type": "output_text", "text": "Hello! How can I help?", "annotations": []}
]
}
],
"first_id": "msg_9f2c…",
"last_id": "msg_8b1d…",
"has_more": false
}