Get Usage API

Feature Introduction

Get usage information by time range

API Description

Request Method: POST (HTTP)

Request URL: https://api.mediax.tencent.com

Request Header: Content-Type: application/json

Request Flow: Get user usage by API fields

URL Path: /user

Parameter Description

Request Parameters

Parameter Required Type Description
action Yes string Common parameter, here is GetUserUsage
secretId Yes string Common parameter, user SecretId
secretKey Yes string Common parameter, user SecretKey
getUserUsageRequest Yes object
- startTime Yes int Query start time, UTC time in seconds, unit: seconds
- endTime Yes int Query end time, UTC time in seconds, unit: seconds

Response Parameters

Parameter Required Type Description
requestId Yes string Request ID
getUserUsageResponse Yes object
- usage Yes Array of object
-- task Yes string Usage type, e.g. "singingCloning"
-- billingTime Yes float Accumulated usage, unit: seconds

Request Example:

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

Response Example:

{
    "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.