Retrieve a Response¶
Retrieve a stored Response. Full-output retrieval and retention depend on the selected model service.
GET https://token.moi.matrixorigin.cn/v1/responses/$RESPONSE_ID
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.
curl -X GET \
"https://token.moi.matrixorigin.cn/v1/responses/$RESPONSE_ID" \
-H "Authorization: Bearer $GENESIS_ACCESS_TOKEN"
Path parameters¶
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Stored Response identifier from |
Successful response¶
A successful request returns the stored response. Full content depends on the selected model service’s storage support.
{
"id": "resp-example",
"object": "response",
"status": "completed",
"model": "MODEL_ID",
"output": [
{
"type": "message",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "OK"
}
]
}
],
"usage": {
"input_tokens": 12,
"output_tokens": 1,
"total_tokens": 13
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
Response identifier; use it to retrieve or delete a stored response. |
|
string |
Object type |
|
string |
Generation status, such as |
|
string |
Model that processed the request. |
|
array of object |
Output items; text messages may follow reasoning items. |
|
string |
Output type, such as |
|
string |
Role of a message output item. |
|
array of object |
Content blocks in a message output item. |
|
string |
Generated text blocks use |
|
string |
Generated text. |
|
array of object |
Summary returned with a reasoning item, when present. |
|
string |
Summary block type, such as |
|
string |
Summary text. |
|
object |
Token usage for this request. |
|
integer |
Input tokens. |
|
integer |
Output tokens. |
|
integer |
Total tokens. |
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. |
Next steps¶
Use the same id to List Response input items, or Delete a Response when it is no longer needed.