QueryModelUsageList
Queries the invoke count, consumed points, success rate, and time to first token latency for each model by using paging, filtered by business type, statistical window, and model type.
Operation description
Prerequisites
The calling identity must have the RAM permissions for the corresponding API operation. The query scope is limited to the model usage of the specified business under the current account. The returned results depend on the generated statistical data and do not represent that every call has been counted in real time.
Time and missing data
Time boundaries are uniformly based on Asia/Shanghai (UTC+8). To use a custom range, set StatDateType to 1d and specify both StartDate and EndDate. The range includes both the start and end dates, with a maximum span of 90 days. If statistical data is unavailable for some dates, only the existing data within the range is aggregated.
When no date is specified for 24h or 1d queries and no statistical results are available, the aggregation API returns zero values and the list API returns an empty list. This does not mean that no actual calls were made. For other windows or custom date ranges where no statistical results are available, metrics or lists may be empty. Do not treat empty values as zeros.
Combined calls
You can call QueryModelUsageInfo to obtain aggregated metrics and QueryModelUsageList to obtain model details. Both API operations can be called independently. When comparing aggregated and detailed data, BizType, StatDateType, StartDate, EndDate, and ModelType must remain consistent. Keyword applies only to the detail API. Details filtered by keyword cannot be directly compared with unfiltered aggregated results.
Pagination and metrics
Start with PageNumber=1 and increment the page number as needed, keeping other filter conditions and sorting methods consistent. The model list may include models that have historical usage but zero calls within the current query range. All ratio fields are returned as decimals between 0 and 1. An empty metric indicates that it is incalculable or the data is unavailable, which is not equivalent to zero.
When new statistical data is continuously generated, the count and sorting of different pagination requests may change. When comparing totals and details, ensure that the query conditions are consistent and consider the data update time difference between the two requests.
Request example combinations
In the parameter table, StatDateType=1d, StartDate=2026-08-01, and EndDate=2026-08-07 indicate querying the cumulative usage from August 1 to August 7, 2026 (inclusive), in the Asia/Shanghai (UTC+8) time zone. To query the last 7 days, change to StatDateType=1w and omit both date parameters.
The call counts, points, and model information in the examples are used to illustrate field meanings. They do not represent the actual usage of the current account and do not constitute a commitment to model specifications or pricing. Actual usage and available model information are subject to the API response. Custom date queries do not provide TtftP95Ms. The example details show only some fields. Unshown fields do not necessarily return empty values.
Missing statistical records for a single model
If a model already in the model list has no active statistical records within the selected statistical range, CallCount, FailureCount, and PointsConsumption return 0. The input and output point ratios, success rate, cache hit rate, and time to first token latency are empty. In this case, you cannot determine that the model has no actual invoke operations based solely on the zero values.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
appstreaming:QueryModelUsageList |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| BizType |
integer |
Yes |
The business type. This parameter is required and has no default value. The mapping between business types and values is as follows:
The API directly queries the model usage of the current account based on the passed BizType and does not automatically convert or replace the business type. When querying the usage of the Agentic Computer business, you must explicitly pass BizType=70. Usage of different business types is counted separately. |
1 |
| StatDateType |
string |
Yes |
The statistical window. This parameter is required, has no default value, is case-sensitive, and does not support leading or trailing spaces. Time boundaries are calculated based on Asia/Shanghai (UTC+8).
Only 1d supports custom date ranges. Do not pass start and end dates for other windows. Valid values:
|
1d |
| StartDate |
string |
No |
The start date of the custom query. The format is yyyy-MM-dd. It is interpreted as a natural day in Asia/Shanghai (UTC+8) and includes the current day. This value is a date string and does not contain hours, minutes, seconds, or time zone suffixes. This parameter can be passed only when StatDateType=1d, and it must be passed or omitted together with EndDate. The start date cannot be later than the end date. The total number of days, including the start and end dates, must be between 1 and 90. If both are omitted, the cumulative usage for today is queried. When custom dates are not used, omit these two parameters directly. Do not pass empty strings or pure spaces. |
2026-08-01 |
| EndDate |
string |
No |
The end date of the custom query. The format is yyyy-MM-dd. It is interpreted as a natural day in Asia/Shanghai (UTC+8) and includes the current day. This value is a date string and does not contain hours, minutes, seconds, or time zone suffixes. This parameter can be passed only when StatDateType=1d, and it must be passed or omitted together with StartDate. The end date cannot be earlier than the start date. The total number of days, including the start and end dates, cannot exceed 90. When custom dates are not used, omit these two parameters directly. Do not pass empty strings or pure spaces. |
2026-08-07 |
| ModelType |
string |
No |
The model type filter condition. If this parameter is not passed or an empty string is passed, no filtering by type is performed. The value is case-insensitive:
Non-empty values do not support leading or trailing spaces. Other non-empty values besides the preceding ones cause parameter validation to fail. Valid values:
|
LLM |
| Keyword |
string |
No |
The keyword for the model name or model code. After removing leading and trailing spaces, a case-insensitive inclusion match is performed. It is not a regular expression. If this parameter is not passed or is completely blank, no filtering by keyword is performed. If it is passed together with ModelType, both conditions take effect simultaneously. The translated display names of some models do not participate in name matching. To stably locate a model, we recommend that you use the returned LlmCode as the keyword. |
qwen |
| SortType |
string |
No |
The sort order. If this parameter is not passed or is blank, the default value is CALL_COUNT_DESC. The value is case-sensitive, and non-empty values do not support leading or trailing spaces:
When sort values are the same, sort by model code LlmCode in ascending order. Filter and sort first, then paginate. Other non-empty values besides the preceding ones cause parameter validation to fail. Valid values:
|
CALL_COUNT_DESC |
| PageNumber |
integer |
No |
The page number. It starts from 1 and the default value is 1. It must be an integer greater than or equal to 1. It is used together with PageSize for pagination. If the page number exceeds the range of the filtered results, an empty list is returned. |
1 |
| PageSize |
integer |
No |
The maximum number of models returned per page. The default value is 10. Valid values: 1 to 100. |
1 |
| Language |
string |
No |
The model display language. Valid values:
If this parameter is not passed, is blank, or has an unsupported value, zh-CN is used. It is also compatible with zh_CN, en_US, ja_JP, zh_TW, en, and ja. Case and leading or trailing spaces are ignored. The returned content is not guaranteed to be entirely in the selected language. Some model names and descriptions are provided in Japanese or Traditional Chinese. For other model information, brands, and capability tags, English is used when ja-JP is selected, and Simplified Chinese is used when zh-TW is selected. If the corresponding translation is missing, the existing content is retained. If the model name is missing, the model code is returned. Valid values:
|
zh-CN |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The API response result. |
||
| Data |
array<object> |
The model usage details on the current page. If no models match or the page number exceeds the result range, an empty list is returned. For 24h or 1d queries without specified start and end dates, an empty list is also returned when no statistical results are available. For other windows or custom date ranges, no valid list data is provided when no statistical results are available. The absence of statistical results does not directly indicate that no actual calls were made. |
[{"LlmCode":"qwen3-max-2026-01-23","ModelName":"Qwen3 Max","CallCount":12480,"FailureCount":180,"PointsConsumption":100,"InputPointsRate":0.739,"OutputPointsRate":0.261,"SuccessRate":0.98557692,"AvgTtftMs":620,"CacheHitRate":0.86}] |
|
array<object> |
The usage and display information of a single model within the selected statistical range. |
||
| ModelBrandName |
string |
The display name of the model brand. The display language is affected by Language. This field is empty when no brand information is available. |
Qwen |
| IconUrl |
string |
The URL of the model brand icon. This field is empty when no brand icon is available. The example URL only illustrates the URL format and is not a fixed download address. |
https://example.com/qwen.png |
| LlmCode |
string |
The identifier or code of the model, used to identify the model and associate usage and model information. The return value is an open string and should not be hardcoded as an enumeration on the client side. |
qwen3-max-2026-01-23 |
| ModelName |
string |
The display name of the model. The display language is affected by Language. If no name is available, LlmCode is returned. The name may change, so the model code should be used when associating data. |
Qwen3 Max |
| Description |
string |
The description of the model. The display language is affected by Language. This field is empty when no description is available. |
Qwen large language model |
| FeatureList |
array |
The list of model capability tags. The display language is affected by Language. Capabilities without a configured display name retain their original codes. An empty list is returned when no capability information is available. Tags are extensible, not a fixed enumeration, and do not imply that all capabilities can be called through this API operation. |
["Text generation","Tool calling"] |
|
string |
The display tag for a single model capability. If no display name is available, the capability code is used. |
Text generation |
|
| ContextWindow |
integer |
The maximum context length of the model, in tokens. This field is empty when no model information is available. |
1000000 |
| MaxOutput |
integer |
The maximum output length for a single generation of the model, in tokens. This field is empty when no model information is available. |
65536 |
| CreditMultiplier |
object |
The display range of the credit consumption multiplier, in multiples. It is used to display price hints and is not used to recalculate the PointsConsumption returned by this API operation.
|
{"Min":1,"Max":3} |
| Min |
number |
The lower limit of the credit multiplier, in multiples. If it is equal to Max, it indicates a fixed multiplier. |
1 |
| Max |
number |
The upper limit of the credit multiplier, in multiples. If it is empty, it indicates that the multiplier starts from Min and no maximum multiplier is specified. |
3 |
| IsNew |
boolean |
The new model tag. The current version does not provide this tag. Ignore this field and do not use it to determine whether a model is newly released. |
null |
| CallCount |
integer |
The total number of model calls within the query range, including both successful and failed calls. |
12480 |
| FailureCount |
integer |
The number of failed calls within the query range, including failed calls that are throttled. |
180 |
| PointsConsumption |
number |
The actual credits consumed within the query range. The return value can be displayed directly without further conversion. CreditMultiplier is only used to display the multiplier and should not be multiplied by this value. |
100 |
| InputPointsRate |
number |
The proportion of input credits to the total consumed credits, expressed as a decimal between 0 and 1. For example, 0.739 indicates 73.9%. This field is provided only when the input and output credit details are complete, the values are valid, and the total credits are greater than 0. Otherwise, it is empty. The proportion is rounded to a maximum of 8 decimal places. The sum of input and output credits may be less than the total credits. Additionally, adding this value to OutputPointsRate may result in minor rounding errors. Do not calculate other credits or verify bills based solely on the sum of the proportions. |
0.739 |
| OutputPointsRate |
number |
The proportion of output credits to the total consumed credits, expressed as a decimal between 0 and 1. For example, 0.261 indicates 26.1%. This field is provided only when the input and output credit details are complete, the values are valid, and the total credits are greater than 0. Otherwise, it is empty. The proportion is rounded to a maximum of 8 decimal places, and adding this value to InputPointsRate may result in minor rounding errors. |
0.261 |
| NormalInputPointsRate |
number |
The proportion of normal input credits to the total credits. This field is empty when it cannot be calculated. |
0.329 |
| ImplicitCacheHitPointsRate |
number |
The proportion of implicit cache hit credits to the total credits. This field is empty when it cannot be calculated. |
0.171 |
| ExplicitCacheCreationPointsRate |
number |
The proportion of explicit cache creation credits to the total credits. This field is empty when it cannot be calculated. |
0.115 |
| ExplicitCacheHitPointsRate |
number |
The proportion of explicit cache hit credits to the total credits. This field is empty when it cannot be calculated. |
0.043 |
| ToolCallPointsRate |
number |
The proportion of tool calling credits to the total credits. This field is empty when it cannot be calculated. |
0 |
| SuccessRate |
number |
The number of successful calls divided by the total number of calls, expressed as a decimal between 0 and 1, not a percentage. This field is empty when the number of calls is 0. Multiply this value by 100 to display it as a percentage. The return value is rounded to a maximum of 8 decimal places. |
0.98557692 |
| AvgTtftMs |
integer |
The average time to first token (TTFT) latency, which is the total duration of valid TTFT samples divided by the number of samples, in milliseconds, rounded to the nearest integer. This field is empty when no valid samples are available. It does not represent the total time taken for a complete response. |
620 |
| TtftP95Ms |
integer |
The 95th percentile value of the time to first token (TTFT) latency, in milliseconds. This field is provided only when corresponding data exists within a fixed statistical window. It is empty when custom start and end dates are passed, even if the start and end dates are the same. The value 700 in the field table is an example under a fixed statistical window and does not apply to custom date ranges. |
700 |
| CacheHitRate |
number |
The proportion of cached input usage to the total input usage, expressed as a decimal between 0 and 1. For example, 0.86 indicates 86%. It is not the proportion of requests that hit the cache. This field is empty when the base usage is incomplete or the total input usage is 0. The return value is rounded to a maximum of 8 decimal places. |
0.86 |
| TotalCount |
integer |
The total number of models used for pagination. When statistical results are available, this field returns the number of models that meet the model type and keyword conditions. This may include models with 0 calls within the selected date range, so it is not necessarily equal to ActiveModelCount. When no statistical results are available within the query range, this value returns 0. You cannot determine that the business has no models or no actual calls based solely on TotalCount=0. |
10 |
| PageSize |
integer |
The page size used for this query. The actual number of returned entries may be less than this value. |
1 |
| PageNumber |
integer |
The page number for this query, starting from 1. |
1 |
| RequestId |
string |
The unique identifier for this request, used to locate and troubleshoot request issues. |
1CBAFFAB-B697-4049-A9B1-67E1FC5F**** |
Examples
Success response
JSON format
{
"Data": [
{
"ModelBrandName": "Qwen",
"IconUrl": "https://example.com/qwen.png",
"LlmCode": "qwen3-max-2026-01-23",
"ModelName": "Qwen3 Max",
"Description": "Tongyi Qianwen large language model",
"FeatureList": [
"Text generation"
],
"ContextWindow": 1000000,
"MaxOutput": 65536,
"CreditMultiplier": {
"Min": 1,
"Max": 3
},
"IsNew": true,
"CallCount": 12480,
"FailureCount": 180,
"PointsConsumption": 100,
"InputPointsRate": 0.739,
"OutputPointsRate": 0.261,
"NormalInputPointsRate": 0.329,
"ImplicitCacheHitPointsRate": 0.171,
"ExplicitCacheCreationPointsRate": 0.115,
"ExplicitCacheHitPointsRate": 0.043,
"ToolCallPointsRate": 0,
"SuccessRate": 0.98557692,
"AvgTtftMs": 620,
"TtftP95Ms": 700,
"CacheHitRate": 0.86
}
],
"TotalCount": 10,
"PageSize": 1,
"PageNumber": 1,
"RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.