Queries the token usage records of RDS AI Assistant Ultimate Edition.
Operation description
Applicable engine
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
rdsai:DescribeMOTokenUsageDetail |
get |
*All Resource
|
None | None |
Request syntax
GET HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Region |
string |
No |
The region in which the instance resides. |
cn-beijing |
| InstanceId |
string |
Yes |
The instance ID. |
rds_copilot***_public_cn-*********6 |
| ApiKey |
string |
No |
The API key used for the request. |
sk-rds-***** |
| UsageType |
string |
No |
The type of usage to query. |
text |
| ConsumerName |
string |
No |
The consumer associated with the API key. |
16******4_rds_copilot****_public_cn-4****02 |
| Model |
string |
No |
The model that was called. |
qwen-flash |
| StartTime |
string |
No |
The start time in ISO 8601 format (UTC). |
2026-01-04T16:00:00Z |
| EndTime |
string |
No |
The end time in ISO 8601 format (UTC). |
2025-12-13T16:00:00Z |
| Cursor |
string |
No |
The cursor-based pagination token. This parameter takes priority over Page. Leave this parameter empty for the first call. For subsequent calls, use the NextCursor value returned in the previous response. |
eyJpZCI6MTIzNDUsInRzIjoiMjAyNi0wNC0wOFQwMDowMDowMFoifQ== |
| Page |
integer |
No |
The page number. Minimum value: 1. Default value: 1. |
2 |
| PageSize |
integer |
No |
The number of records per page. |
10 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
Id of the request |
FE9C65D7-930F-57A5-A207-8C396329241C |
| TotalCount |
integer |
The total number of records that match the query conditions. |
20 |
| NextCursor |
string |
The cursor for the next page. An empty value indicates the last page. |
eyJpZCI6MTIzNDUsInRzIjoiMjAyNi0wNC0wOFQwMDowMDowMFoifQ== |
| PageSize |
integer |
The number of records per page. |
10 |
| Page |
integer |
The page number. |
1 |
| Records |
array<object> |
The list of records returned. |
|
|
object |
The token usage record. |
||
| Region |
string |
The region in which the instance resides. |
cn-beijing |
| InstanceId |
string |
The instance ID. |
rds_copilot***_public_cn-*********6 |
| ConsumerName |
string |
The consumer associated with the API key. |
16******4_rds_copilot****_public_cn-4****02 |
| Model |
string |
The model that was called. |
qwen-flash |
| TotalTokens |
number |
The total number of tokens. |
100000 |
| InputTokens |
number |
The number of input tokens consumed. |
10000 |
| OutputTokens |
number |
The number of output tokens consumed. |
10000 |
| RequestTime |
string |
The request time in ISO 8601 format (UTC). |
2026-04-01T01:00:00Z |
| ExtraInfo |
string |
The additional information passed by the user in the extra_info field during the request. The value is a JSON string. |
{"label": "test"} |
| UsageType |
string |
The usage type. |
text |
Examples
Success response
JSON format
{
"RequestId": "FE9C65D7-930F-57A5-A207-8C396329241C",
"TotalCount": 20,
"NextCursor": "eyJpZCI6MTIzNDUsInRzIjoiMjAyNi0wNC0wOFQwMDowMDowMFoifQ==",
"PageSize": 10,
"Page": 1,
"Records": [
{
"Region": "cn-beijing",
"InstanceId": "rds_copilot***_public_cn-*********6",
"ConsumerName": "16******4_rds_copilot****_public_cn-4****02",
"Model": "qwen-flash",
"TotalTokens": 100000,
"InputTokens": 10000,
"OutputTokens": 10000,
"RequestTime": "2026-04-01T01:00:00Z",
"ExtraInfo": "{\"label\": \"test\"}"
}
],
"UsageType": "text"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.