Returns the input items used to generate the specified Response. For multi-turn conversations chained by previous_response_id , the returned list also includes user inputs and assistant replies from earlier turns. A Response ID can be queried only when the create request was sent with store=true .
Replace {WorkspaceId} with your actual workspace ID.
China (Beijing)
SDK base_url: https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/compatible-mode/v1
HTTP request URL: GET https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/compatible-mode/v1/responses/{response_id}/input_items
Path parametersresponse_id The Response ID to query input items for, in the format Query parametersafter A cursor for pagination. Returns items that come after the specified item ID (in the format limit The maximum number of items to return. Value range: [1, 100]. Default: 20. order Sort order. Supported values: | Default requestFiltered request |
Returnsdata The list of input items. Each element is a message object with the fields first_id The ID of the first item in the list. last_id The ID of the last item in the list. has_more Whether more items are available. When id The Response ID that these input items belong to. model The name of the model used to generate this Response. created_at The Unix timestamp when the Response was created, in milliseconds. Note: this differs from the previous_response_id Returned only for multi-turn conversations chained by | |
Error response
If the specified Response ID does not exist, the API returns the following error:
{
"request_id": "xxx",
"code": "InvalidParameter",
"message": "Response with id 'resp_xxx' not found."
}