tencent cloud

APIs

DescribeInferenceServiceMonitorData

Download
フォーカスモード
フォントサイズ
最終更新日: 2026-08-04 11:05:36

1. API Description

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

This API is used to query service monitoring data for reasoning, supporting indicators such as CPU, memory, GPU, video memory utilization, and instance count. You can specify the time range and aggregation granularity, and query data for up to the most recent 30 days.

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: DescribeInferenceServiceMonitorData.
Version Yes String Common Params. The value used for this API: 2022-09-01.
Region No String Common Params. This parameter is not required.
ZoneId Yes String

Site ID.

ServiceIds.N Yes Array of String

ID of the inference service. You can import up to 10 inference service IDs.

MetricNames.N Yes Array of String

Metric list, supports up to 10 metrics. Valid values:

  • cpu_usage_average: Average CPU utilization, unit: %, metric type: Float;
  • cpu_usage_max: Maximum CPU utilization, unit: %, metric type: Float;
  • gpu_usage_average: Average GPU utilization, unit: %, metric type: Float;
  • gpu_usage_max: Maximum GPU utilization, unit: %, metric type: Float;
  • instance_num_average: Average number of instances, unit: unit, metric type: Float;
  • instance_num_max: Maximum number of instances, unit: unit, metric type: Float;
  • gpu_memory_usage_max: Maximum GPU VRAM utilization, unit: %, metric type: Float;
  • memory_usage_average: Average memory utilization, unit: %, metric type: Float;
  • memory_usage_max: Maximum memory utilization, unit: %, metric type: Float;
  • StartTime Yes Timestamp ISO8601

    Start time.

    EndTime Yes Timestamp ISO8601

    End time. The query time range (EndTime - StartTime) must be less than or equal to 30 days.

    Interval No String

    Query time granularity. Valid values:

  • min: 1 minute, supports queries within a 1-day range.
  • 5min: 5 minutes, supports queries within a 7-day range.
  • hour: 1 hour, supports queries within a 30-day range.
  • day: 1 day, supports queries within a 30-day range.
  • If this parameter is not input, the granularity will be automatically inferred based on the interval between the start time and end time. Specifically, data will be queried with a granularity of min, 5min, hour, and day respectively when the period is no more than 2 hours, no more than 2 days, no more than 7 days, and over 7 days.

    3. Output Parameters

    Parameter Name Type Description
    TotalCount Integer

    Total number of entries in the query result.

    InferenceServiceMonitorRecords Array of InferenceServiceMonitorRecord

    Service monitoring data for reasoning.

    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 Querying the specified monitoring metric data of an inference service

    Input Example

    POST / HTTP/1.1
    Host: teo.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeInferenceServiceMonitorData
    <Common request parameters>
    
    {
        "ZoneId": "zone-3lwrlet3u8bl",
        "ServiceIds": [
            "inf-n40ehcni5jjx"
        ],
        "MetricNames": [
            "cpu_usage_average"
        ],
        "StartTime": "2026-02-26T15:00:00+08:00",
        "EndTime": "2026-02-26T15:01:00+08:00",
        "Interval": "min"
    }

    Output Example

    {
        "Response": {
            "InferenceServiceMonitorRecords": [
                {
                    "InferenceServiceMonitorItems": [
                        {
                            "Timestamp": "2026-02-26T15:00:00+08:00",
                            "Value": 0.005829864994190321
                        }
                    ],
                    "MetricName": "cpu_usage_average",
                    "ServiceId": "inf-n40ehcni5jjx"
                }
            ],
            "TotalCount": 1,
            "RequestId": "8fc9f37f-20c1-4d60-818f-a8aa045bf7d5"
        }
    }

    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.
    InvalidParameterValue Invalid parameter value.
    InvalidParameterValue.ZoneNotFound No corresponding site. please ensure correct information entry.

    ヘルプとサポート

    この記事はお役に立ちましたか?

    フィードバック