tencent cloud

APIs

CreateImageSpriteTemplate

Download
Focus Mode
Font Size
Last updated: 2026-09-18 15:59:30

1. API Description

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

This API is used to create a user-customized image sprite template. Maximum number: 16.

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 Name Required Type Description
Action Yes String Common Params. The value used for this API: CreateImageSpriteTemplate.
Version Yes String Common Params. The value used for this API: 2018-07-17.
Region No String Common Params. This parameter is not required.
SampleType Yes String Sampling type. Valid values:
  • Percent: by percent.
  • Time: by time interval.
  • SampleInterval Yes Integer Sampling interval.
  • When SampleType is Percent, specify the percentage of the sampling interval.
  • The time when the sampling interval is specified if SampleType is Time, in seconds.
  • RowCount Yes Integer Number of rows of small images in the sprite image.
    Note: The number of subimage rows impacts the final height of the large image. The maximum height of the large image is 15,000 pixels, where the height of the large image is the product of the number of subimage rows and the subimage height.
    ColumnCount Yes Integer Number of columns of small images in the sprite image.
    Note: The columns of thumbnails impact the final width of the large image. The maximum width of the large image is 15,000 pixels, where the width of the large image is the product of the columns and the width of the thumbnails.
    SubAppId No Integer ID of the VOD application. For customers who activate VOD after December 25, 2023, this field must be set to the app ID when accessing resources in VOD applications (whether the default application or a newly created application).
    Name No String Sprite image template name, with a length limit of 64 characters.
    Comment No String Template description, with a length limit of 256 characters.
    FillType No String Filling method. When the video stream configuration width and height parameters are inconsistent with the aspect ratio of the original video, the processing method for transcoding is "filling". Optional filling modes:
  • stretch: Stretch each frame to fill the entire screen, which may cause the transcoded video to be "squashed" or "stretched";
  • black: Keep black edges, maintain the video aspect ratio, and fill the remaining edges with black.
  • Default value: black.
    Width No Integer Maximum value of the width (or long side) of small images in the sprite image. Value range: 0 and [128, 4096]. Unit: px.
  • When both Width and Height are 0, Same Resolution Source is used.
  • When Width is 0 and Height is not 0, Width is proportionally scaled.
  • When Width is not 0 and Height is 0, Height is proportionally scaled.
  • When both Width and Height are not 0, the resolution specified by user is used.
  • Default value: 0. Note: The width of small images impacts the width of the final large image. The maximum width of the large image is 15000 pixels, where the width of the large image is the product of the columns and the width of small images.
    Height No Integer Maximum value of the height (or short side) of small images in the sprite image. Value range: 0 and [128, 4096]. Unit: px.
  • When both Width and Height are 0, the resolution is the same as the source;
  • When Width is 0 and Height is not 0, Width is proportionally scaled;
  • When Width is not 0 and Height is 0, Height is proportionally scaled;
  • When both Width and Height are not 0, the resolution is specified by the user.
  • Default value: 0. Note: The height of small images impacts the height of the final large image. The maximum height of the large image is 15000 pixels, where the height of the large image is the product of the subimage rows and the height of small images.
    ResolutionAdaptive No String Resolution adaptation. Available values:
  • open: enable. At this point, Width represents the long side of the video, and Height indicates the short side of the video;
  • close: closed. At this point, Width represents the video width, and Height represents the video height.

  • Default value: open.
    Format No String Image format. Value:
  • jpg: jpg format;
  • png: PNG format;
  • webp: webp format.

  • Default value: jpg.

    3. Output Parameters

    Parameter Name Type Description
    Definition Integer Sprite template unique identifier.
    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 Create a sprite sheet template

    Create a sprite sheet template

    Input Example

    POST / HTTP/1.1
    Host: vod.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: CreateImageSpriteTemplate
    <Common request parameters>
    
    {
        "ColumnCount": 10,
        "Name": "Sprite sheet template 1",
        "RowCount": 5,
        "SampleType": "Percent",
        "Height": 128,
        "Width": 128,
        "SampleInterval": 10
    }

    Output Example

    {
        "Response": {
            "Definition": 1008,
            "RequestId": "12ae8d8e-dce3-4151-9d4b-5594145287e1"
        }
    }

    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.
    InternalError Internal error.
    InvalidParameterValue.ColumnCount Invalid parameter value: ColumnCount.
    InvalidParameterValue.Comment Parameter error: description of this template.
    InvalidParameterValue.Height Parameter error: height.
    InvalidParameterValue.Name Parameter value error: Name exceeds the length limit.
    InvalidParameterValue.Resolution Parameter error: Resolution error.
    InvalidParameterValue.RowCount Invalid parameter value: RowCount.
    InvalidParameterValue.SampleInterval Invalid parameter value: SampleInterval.
    InvalidParameterValue.SampleType Parameter value error: SampleType.
    InvalidParameterValue.Width Parameter error: width.
    LimitExceeded.TooMuchTemplate Exceed the limit: The number of templates exceeds the upper limit of 100. If needed, submit a ticket (https://console.tencentcloud.com/workorder/category).
    UnauthorizedOperation Unauthorized operation.

    Help and Support

    Was this page helpful?

    Help us improve! Rate your documentation experience in 5 mins.

    Feedback