CreateWatermarkTemplate

Last updated: 2021-02-23 16:19:09

1. API Description

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

This API is used to create a custom watermarking template. Up to 1,000 templates can be created.

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 parameter. The value used for this API: CreateWatermarkTemplate.
Version Yes String Common parameter. The value used for this API: 2018-07-17.
Region No String Common parameter. This parameter is not required for this API.
Type Yes String Watermarking type. Valid values:
  • image: image watermark;
  • text: text watermark;
  • svg: SVG watermark.
  • Name No String Watermarking template name. Length limit: 64 characters.
    Comment No String Template description. Length limit: 256 characters.
    CoordinateOrigin No String Origin position. Valid values:
  • TopLeft: the origin of coordinates is in the top-left corner of the video, and the origin of the watermark is in the top-left corner of the image or text;
  • TopRight: the origin of coordinates is in the top-right corner of the video, and the origin of the watermark is in the top-right corner of the image or text;
  • BottomLeft: the origin of coordinates is in the bottom-left corner of the video, and the origin of the watermark is in the bottom-left corner of the image or text;
  • BottomRight: the origin of coordinates is in the bottom-right corner of the video, and the origin of the watermark is in the bottom-right corner of the image or text.

  • Default value: TopLeft.
    XPos No String The horizontal position of the origin of the watermark relative to the origin of coordinates of the video. % and px formats are supported:
  • If the string ends in %, the XPos of the watermark will be the specified percentage of the video width; for example, 10% means that XPos is 10% of the video width;
  • If the string ends in px, the XPos of the watermark will be the specified px; for example, 100px means that XPos is 100 px.

  • Default value: 0 px.
    YPos No String The vertical position of the origin of the watermark relative to the origin of coordinates of the video. % and px formats are supported:
  • If the string ends in %, the YPos of the watermark will be the specified percentage of the video height; for example, 10% means that YPos is 10% of the video height;
  • If the string ends in px, the YPos of the watermark will be the specified px; for example, 100px means that YPos is 100 px.

  • Default value: 0 px.
    ImageTemplate No ImageWatermarkInput Image watermarking template. This field is required when Type is image and is invalid when Type is text.
    TextTemplate No TextWatermarkTemplateInput Text watermarking template. This field is required when Type is text and is invalid when Type is image.
    SvgTemplate No SvgWatermarkInput SVG watermarking template. This field is required when Type is svg and is invalid when Type is image or text.
    SubAppId No Integer Subapplication ID in VOD. If you need to access a resource in a subapplication, enter the subapplication ID in this field; otherwise, leave it empty.

    3. Output Parameters

    Parameter Name Type Description
    Definition Integer Unique ID of watermarking template.
    ImageUrl String Watermark image address. This field is valid only when Type is image.
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Creating a watermarking template

    Input Example

    https://vod.tencentcloudapi.com/?Action=CreateWatermarkTemplate
    &Type=image
    &Name=Template 1
    &ImageTemplate.ImageContent=/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxITEhUSEhIVFRUXFRUXFxcYFRUVFRUXFxUXFhUVFxUYHSggGBolHRUXITEhJSkrLi4uFx8zODMtNygtLisBCgoKDg0OGhAQFy0dHx4tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLTEtLS0tLS0rLS0tKystLf/AABEIAOEA4AMBIgACEQEDEQH/xAAcAAAABwEBAAAAAAAAAAAAAAAAAQIDBAUGBwj/xABBEAABAwIDBAYHBQYGAwAAAAABAAIRAwQFITESQVFhBiJxkbHREzJTgaHB8BRCUpKTByNigrLxFTRDcsLhM1Rz/8QAGQEAAgMBAAAAAAAAAAAAAAAAAQIAAwQF/8QAJBEAAgIBBAICAwEAAAAAAAAAAAECEQMSITFBBFEiMhMjYXH/2gAMAwEAAhEDEQA/AIX2+t7ar+o/zRfb63tqv6j/ADTUIQtBjsd+31vbVf1H+aL7fX9tV/Uf5pqEIQJY7/iFb21X9R/mh9vr+2q/qP8ANMwgQpRLHf8AEK3tqv6j/NGMQr+2q/qP80zCEKEski/re2q/qP8ANKbfVvbVf1H+ajwoWIYoyllq7gPmpsgq2XAv63tqv6j/ADVdd9KjTy9PVJ4B7z81l8Qx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