tencent cloud

DescribeAILatency
Last updated:2026-01-15 15:08:38
DescribeAILatency
Last updated: 2026-01-15 15:08:38

1. API Description

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

Call this API to query the processing latency detail and stats of specified Session by Session ID within a specific time period. The latency info includes:.
-End-to-end (ETE) delay: Statistics of the overall duration from user voice input to AI returning a complete response.
-ASR latency: statistics of the processing time consumption required for voice input to be recognized as text.
-LLM latency: Statistics of inference latency for AI model to generate text content.
-Text To Speech (TTS) latency: Statistics of text conversion to speech audio synthesis duration.

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: DescribeAILatency.
Version Yes String Common Params. The value used for this API: 2020-02-10.
Region No String Common Params. This parameter is not required.
SdkAppId Yes Integer App ID (required), which can be viewed at https://console.tencentcloud.com/ccc.
SessionId Yes String Session ID.
StartTime Yes Integer Search start time.
EndTime Yes Integer 1737350008

3. Output Parameters

Parameter Name Type Description
AILatencyDetail Array of AILatencyDetail Detailed data of latency.
-1 indicates no corresponding data.
AILatencyStatistics AILatencyStatistics Latency statistical data.
-1 indicates no corresponding data.
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 Retrieve AI Service Latency Info for Intelligent Agent in a Call

Used for querying processing latency details and stats of AI service in a specified session

Input Example

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

{
    "SdkAppId": 1400000000,
    "SessionId": "adcf61b8-dbb9-4c20-87bf-c0744c04bade",
    "StartTime": 1737350008,
    "EndTime": 1737356008
}

Output Example

{
    "Response": {
        "AILatencyStatistics": {
            "ASRLatency": {
                "MiddleLatency": 308,
                "MinLatency": 267,
                "P90Latency": 338
            },
            "ETELatency": {
                "MiddleLatency": 1327,
                "MinLatency": 1209,
                "P90Latency": 1540
            },
            "LLMLatency": {
                "MiddleLatency": 754,
                "MinLatency": 642,
                "P90Latency": 912
            },
            "TTSLatency": {
                "MiddleLatency": 267,
                "MinLatency": 146,
                "P90Latency": 366
            }
        },
        "RequestId": "ca9c3062-202b-4401-a930-3728d1ef7886"
    }
}

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.DBError Internal database access failure.
InvalidParameter.InstanceNotExist The instance does not exist.
InvalidParameterValue.InstanceNotExist The SDKAppID does not exist.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback