Overview
Menu

DescribeUsageData

Last updated: 2025-12-16 15:43:34Download PDF

1. API Description

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

This API is used to return the daily Media Processing Service (MPS) usage information within the specified query time range.

  1. MPS statistical data from the last 365 days can be queried.
  2. The query time span should not exceed 90 days.

A maximum of 100 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 NameRequiredTypeDescription
ActionYesStringCommon Params. The value used for this API: DescribeUsageData.
VersionYesStringCommon Params. The value used for this API: 2019-06-12.
RegionNoStringCommon Params. This parameter is not required for this API.
StartTimeYesStringStart date. Use the ISO date and time format.
EndTimeYesStringEnd date, which should be greater than or equal to the start date. Use the ISO date and time format.
Types.NNoArray of StringQueries the MPS task type. The transcoding task is queried by default.
  • Transcode: transcoding.
  • Enhance: enhancement.
  • AIAnalysis: intelligent analysis.
  • AIRecognition: intelligent recognition.
  • AIReview: content moderation.
  • Snapshot: screenshot.
  • AnimatedGraphics: conversion to GIF.
  • AiQualityControl: media quality inspection.
  • Evaluation: video assessment.
  • ImageProcess: image processing.
  • AddBlindWatermark: add a basic copyright digital watermark.
  • AddNagraWatermark: add a NAGRA digital watermark.
  • ExtractBlindWatermark: extract a basic copyright digital watermark.
  • ProcessRegions.NNoArray of StringMPS park. ap-guangzhou park is returned by default.
  • ap-guangzhou: Guangzhou.
  • ap-hongkong: Hong Kong (China).
  • ap-taipei: Taipei (China).
  • ap-singapore: Singapore.
  • ap-mumbai: India.
  • ap-jakarta: Jakarta.
  • ap-seoul: Seoul.
  • ap-bangkok: Thailand.
  • ap-tokyo: Japan.
  • na-siliconvalley: Silicon Valley.
  • na-ashburn: Virginia.
  • na-toronto: Toronto.
  • sa-saopaulo: São Paulo.
  • eu-frankfurt: Frankfurt.
  • eu-moscow: Russia.
  • aws: AWS.
  • 3. Output Parameters

    Parameter NameTypeDescription
    DataArray of TaskStatDataMPS statistical data overview, which displays an overview and detailed data of the queried task.
    RequestIdStringThe 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 Querying MPS Usage

    This example shows you how to query usage.

    Input Example

    POST / HTTP/1.1
    Host: mps.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeUsageData
    <Common request parameters>
    
    {
        "EndTime": "2019-07-03T00:00:00+08:00",
        "StartTime": "2019-07-02T00:00:00+08:00"
    }

    Output Example

    {
        "Response": {
            "Data": [
                {
                    "TaskType": "Transcode",
                    "Summary": [
                        {
                            "Time": "2019-07-02T00:00:00+08:00",
                            "Count": 22,
                            "Usage": 2200
                        },
                        {
                            "Time": "2019-07-03T00:00:00+08:00",
                            "Count": 22,
                            "Usage": 2200
                        }
                    ],
                    "Details": [
                        {
                            "Specification": "Audio",
                            "Data": [
                                {
                                    "Time": "2019-07-02T00:00:00+08:00",
                                    "Count": 1,
                                    "Usage": 10
                                },
                                {
                                    "Time": "2019-07-03T00:00:00+08:00",
                                    "Count": 1,
                                    "Usage": 10
                                }
                            ]
                        },
                        {
                            "Specification": "Standard.H265.4K",
                            "Data": [
                                {
                                    "Time": "2019-07-02T00:00:00+08:00",
                                    "Count": 1,
                                    "Usage": 10
                                },
                                {
                                    "Time": "2019-07-03T00:00:00+08:00",
                                    "Count": 1,
                                    "Usage": 10
                                }
                            ]
                        },
                        {
                            "Specification": "TESHD-10.H265.4K",
                            "Data": [
                                {
                                    "Time": "2019-07-02T00:00:00+08:00",
                                    "Count": 1,
                                    "Usage": 10
                                },
                                {
                                    "Time": "2019-07-03T00:00:00+08:00",
                                    "Count": 1,
                                    "Usage": 10
                                }
                            ]
                        }
                    ]
                }
            ],
            "RequestId": "requestId"
        }
    }

    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 CodeDescription
    FailedOperation.InvalidMpsUserOperation failed: unauthorized MPS user.
    FailedOperation.NetWorkErrorOperation failed due to a network error.
    InternalErrorInternal error.
    InvalidParameterValueIncorrect parameter value.
    InvalidParameterValue.ServiceA service parameter value error occurs.