List upstream request attempts¶
List the upstream attempts and results for one model call.
GET https://billing.moi.matrixorigin.cn/api/v1/taas/usage-logs/{id}/provider-requests
Before you begin¶
Prepare a personal access token. For creation and management, see Manage personal access tokens.
Select a call from List request logs.
Results are scoped to data accessible to the current user.
Request example¶
Replace $MOI_PERSONAL_ACCESS_TOKEN and $USAGE_LOG_ID with your personal access token and the selected request log’s ID.
curl --get "https://billing.moi.matrixorigin.cn/api/v1/taas/usage-logs/$USAGE_LOG_ID/provider-requests" \
-H "X-API-Key: $MOI_PERSONAL_ACCESS_TOKEN"
Path parameters¶
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
The selected request log’s ID, from |
Successful response¶
Returns HTTP 200 with the upstream request attempts for the selected call.
[
{
"id": "attempt_example",
"usage_log_id": "usage_example",
"model_id": "model_example",
"model_name": "example-chat-model",
"attempt_number": 1,
"status": "success",
"http_status_code": 200,
"called_at": 1788710400,
"input_tokens": 12,
"output_tokens": 8,
"cache_read_tokens": 0,
"cache_creation_tokens": 0,
"latency_ms": 120,
"created_at": 1788710400
}
]
Field |
Type |
Description |
|---|---|---|
|
string |
Upstream request log ID. |
|
string |
Parent usage log ID. |
|
string |
Catalog model object ID. |
|
string |
Actual model name. |
|
integer |
Attempt number within the call. |
|
string |
Attempt result status. |
|
integer |
Upstream HTTP status, when available. |
|
boolean |
Whether the failure is retryable; may be omitted when |
|
integer |
Call time, Unix seconds. |
|
integer |
Input tokens. |
|
integer |
Output tokens. |
|
integer |
Cache-read tokens. |
|
integer |
Cache-creation tokens. |
|
string |
Call error category, when present. |
|
string |
Call error description, when present. |
|
integer |
Call |
|
integer |
Log creation time, Unix seconds. |
In field paths, [] denotes each array item.