Get Usage API

功能介绍

按时间范围获取用量信息

接口说明

请求方式: POST(HTTP)

请求地址: https://api.mediax.tencent.com

请求头: Content-Type: application/json

请求流程: 按接口字段获取用户用量

URL路径: /user

参数说明

请求参数

参数 是否必选 类型 说明
action string 公共参数,此处为 GetUserUsage
secretId string 公共参数,用户 SecretId
secretKey string 公共参数,用户 SecretKey
getUserUsageRequest object
- startTime int 查询起始时间,UTC时间秒数,单位秒
- endTime int 查询结束时间,UTC时间秒数,单位秒

返回参数

参数 是否必选 类型 说明
requestId string 请求ID
getUserUsageResponse object
- usage Array of object
-- task string 用量类型,例如"singingCloning"
-- billingTime float 累积用量,单位:秒

请求示例:

{
    "action": "GetUserUsage",
    "secretId": "{secretId}",
    "secretKey": "{secretKey}",
    "getUserUsageRequest": {
        "startTime": 1739635200,
        "endTime": 1739721600
    }
}

返回示例:

{
    "requestId": "c74d50d3-f9a0-42e7-b250-22de0c77ebe8",
    "getUserUsageResponse": {
        "usage": [
            {
                "task": "singingCloning",
                "billingTime": 14080.8
            }
        ]    
    }
}
Tencent Media Lab
/
We would like to use performance and analytics cookies (“Cookies”) to help us recognize whether you are a returning visitor and to track the number of website views and visits. For more information about the Cookies we use and your options (including how to change your preferences) see our Cookies Policy.