tencent cloud

APIs

CreateVideoSnapshotTemplate

下载
聚焦模式
字号
最后更新时间: 2026-10-26 11:48:29

1. API Description

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

Create a screenshot template.

A maximum of 5 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: CreateVideoSnapshotTemplate.
Version Yes String Common Params. The value used for this API: 2023-05-17.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
Name Yes String

Template name: Chinese, English, digits, "-", "_", with a length not exceeding 128 characters

Type Yes Integer

Screenshot type: 1-Real-time frame capture 2-Low frequency frame capture
Note: Real-time frame capture pulls the real-time stream throughout the effective period. Low frequency frame capture pulls the real-time stream as needed during the effective period, with a minimum duration of not less than 1 minute each time.

Enumeration values:

  • 1: Real-time frame capture
  • 2: Low frequency frame capture
Interval Yes Integer

Frame capturing frequency: When Type = 1, the value range is [5, 180] seconds; when Type = 2, the value range is [30, 36000] seconds

Times.N Yes Array of EffectiveTime

Effective period. Note: The array size is no more than 100, and each time period is not less than 1 minute.

MultiMode No MultiVideoSnapshotMode

Multiple mode

3. Output Parameters

Parameter Name Type Description
Data VideoSnapshotTemplateInfo

Screenshot template information

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 Success

Create a real-time frame capturing template

Input Example

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

{
    "Name": "Real-time frame capturing template",
    "Type": 1,
    "Interval": 120,
    "Times": [
        {
            "BeginTime": "9:00:00",
            "EndTime": "12:00:00",
            "WeekDay": 1
        }
    ]
}

Output Example

{
    "Response": {
        "Data": {
            "CreateTime": "2026-01-25 12:10:49",
            "Interval": 120,
            "MultiMode": {
                "Enable": false,
                "Interval": 0,
                "Total": 0
            },
"Name": "Real-time frame capturing template"
            "TemplateId": "b11*********e*******************48c4",
            "Times": [
                {
                    "BeginTime": "9:00:00",
                    "EndTime": "12:00:00",
                    "WeekDay": 1
                }
            ],
            "Type": 1,
            "UpdateTime": "2026-01-25 12:10:49"
        },
        "RequestId": "c8453e1b-2428-4ec3-bfee-3b6412b41de6"
    }
}

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
FailedOperation Operation failed
InvalidParameterValue.ContainInvalidSnapshotTime Contains an invalid screenshot time range
InvalidParameterValue.InvalidName Name is empty or incorrect.
InvalidParameterValue.UnsupportedInterval Unsupported frame capturing frequency configuration
InvalidParameterValue.UnsupportedSnapshotTotal Unsupported frame count configuration
InvalidParameterValue.UnsupportedSnapshotType Unsupported screenshot type
LimitExceeded.SnapshotTemplateNumExceeded The creatable screenshot template quantity exceeds the limit.
LimitExceeded.TimelineSliceExceedLimit Number of time periods exceeds the limit
UnsupportedOperation.ImageDomainNotExist Image domain name not found

帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈