tencent cloud

APIs

DescribeUsageDetailList

다운로드
포커스 모드
폰트 크기
마지막 업데이트 시간: 2026-11-05 11:19:42

1. API Description

Domain name for API request: adp.intl.tencentcloudapi.com.

This API is used to query time series details of resource invocations, including two types of resources: models and plug-ins. It returns detailed information of each call record in chronological order.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: DescribeUsageDetailList.
Version Yes String Common Params. The value used for this API: 2026-05-20.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
ResourceType Yes Integer

Resource type, limited to RESOURCE_TYPE_MODEL / RESOURCE_TYPE_PLUGIN

Enumeration itemEnumeration valueDescription
RESOURCE_TYPE_UNSPECIFIED0
RESOURCE_TYPE_MODEL1Model usage
RESOURCE_TYPE_PLUGIN2Plug-in usage (reserved, not currently supported)
RESOURCE_TYPE_PLATFORM3Platform feature usage (reserved, not currently supported)
RESOURCE_TYPE_MODEL_CONCURRENCY4Model concurrency limit exceeded (reserved, not currently supported)
RESOURCE_TYPE_KB_CAPACITY5Knowledge base capacity (reserved, not currently supported)
RESOURCE_TYPE_USAGE_SUMMARY6Usage summary (reserved, not currently supported)
RESOURCE_TYPE_RESOURCE_CONSUME7Resource consumption (billing details) (reserved, not currently supported)
TimeRange Yes TimeRange

Query time range (Unix seconds).

ViewScope Yes ViewScope

View scope: corporate view / space view / application view

FilterList.N No Array of Filter

Extended Filter (resource_type=MODEL). Filter combination rule: multiple items use AND, AND values within the same item use OR. Supported names: MODEL_Name, user_id, space_id, resource_id/source_id, metric_source_type (metric_source_type_* OR integer), call_type (invocation type)

PageNumber No Integer

Page number, starting from 0.

PageSize No Integer

Number of items per page. Maximum: 100.

3. Output Parameters

Parameter Name Type Description
TotalCount String

Total record count for frontend pagination

UsageDetailList Array of UsageDetail

Resource invocation time series details list

RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 DescribeUsageDetailList

Input Example

POST / HTTP/1.1
Host: adp.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeUsageDetailList
<Common request parameters>

{
    "ResourceType": 1,
    "TimeRange": {
        "EndTime": "1786463999",
        "StartTime": "1786377600"
    },
    "ViewScope": {
        "ViewType": 2,
        "ScopeId": "default_space"
    },
    "PageNumber": 0,
    "PageSize": 10
}

Output Example

{
    "Response": {
        "TotalCount": "12580",
        "UsageDetailList": [
            {
                "CallSource": {
                    "SubjectId": "10023456",
                    "SubjectName": "Smart Customer Service Application",
                    "SubjectType": 1
                },
                "DosageId": "dosage_9988776655",
                "EventTime": "1754956800",
                "Model": {
                    "CallType": "chat",
                    "IsDefaultKB": false,
                    "ModelName": "hunyuan-turbo",
                    "ResourceConsumptionList": [
                        {
                            "Label": "",
                            "Unit": 0,
                            "Value": 8970
                        }
                    ]
                },
                "TraceId": "trace_abc123def456",
                "UserId": "user_001"
            }
        ],
        "RequestId": "4cfbc421-7c7f-47c8-ac7e-7e3c5eb92ac1"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
InternalError Internal error.
InvalidParameter Parameter error.

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백