List Response input items¶
List the input items used by a stored Response. Full-input retrieval depends on the selected model service.
GET https://token.moi.matrixorigin.cn/v1/responses/$RESPONSE_ID/input_items
Before you begin¶
Create a Response with storage enabled on a model service that supports storage and retrieval. Select a response that is still accessible and has not been deleted or expired.
Prepare the personal access token used to create that response.
Request example¶
Replace $GENESIS_ACCESS_TOKEN and $RESPONSE_ID with your personal access token and the selected response ID.
Without pagination parameters¶
curl -X GET \
"https://token.moi.matrixorigin.cn/v1/responses/$RESPONSE_ID/input_items" \
-H "Authorization: Bearer $GENESIS_ACCESS_TOKEN"
Read the first page¶
curl --get \
"https://token.moi.matrixorigin.cn/v1/responses/$RESPONSE_ID/input_items" \
-H "Authorization: Bearer $GENESIS_ACCESS_TOKEN" \
--data-urlencode 'limit=1' \
--data-urlencode 'order=asc'
Read the next page¶
When has_more is true, save the previous page’s last_id as $LAST_ITEM_ID and request the next page with the same ordering. Stop when has_more is false.
curl --get \
"https://token.moi.matrixorigin.cn/v1/responses/$RESPONSE_ID/input_items" \
-H "Authorization: Bearer $GENESIS_ACCESS_TOKEN" \
--data-urlencode 'limit=1' \
--data-urlencode 'order=asc' \
--data-urlencode "after=$LAST_ITEM_ID"
Path parameters¶
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Stored Response identifier from |
Query parameters¶
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
integer |
No |
Items per page; the example uses |
|
string |
No |
Ordering: |
|
string |
No |
Continue after the previous page’s |
Successful response¶
A successful request returns the current page of input items and pagination markers.
{
"data": [
{
"id": "item-example-1",
"type": "message",
"role": "user",
"content": [
{
"type": "input_text",
"text": "Reply with OK."
}
]
}
],
"first_id": "item-example-1",
"last_id": "item-example-1",
"has_more": true
}
Field |
Type |
Description |
|---|---|---|
|
array of object |
Input items on this page. |
|
string |
Input item identifier; can be used as a pagination cursor. |
|
string |
Item type; text messages use |
|
string |
Input message role. |
|
array of object |
Text blocks in the input message. |
|
string |
Text block type |
|
string |
Input text. |
|
string |
Identifier of the first item on this page. |
|
string |
Identifier of the last item on this page; use it as |
|
boolean |
Whether another page exists; stop when |
Error response¶
HTTP 404 indicates a missing, deleted, expired, or inaccessible response. Check the response ID and the credentials used to create it.
{
"error": {
"message": "response state not found",
"type": "response_state_not_found",
"code": "response_state_not_found"
}
}
Field |
Type |
Description |
|---|---|---|
|
object |
Error details. |
|
string |
Description of an unavailable or missing response. |
|
string |
Error type. |
|
string |
Error code. |