tencent cloud

Media Processing Service

Release Notes and Announcements
Release Notes
Announcements
Product Introduction
Overview
Features
Strengths
Use Cases
Purchase Guide
Billing Overview
Purchase Instructions
Top Up and Purchase
Overdue Payments
Refund
Getting Started
Console Guide
Overview
Creating Tasks
Tasks
Orchestrations
Templates
Resource Packs
Video Evaluation
AIGC Content Generation
Terminal SDK
Subtitle Editing Tool
Usage Statistics
Cloud Access Management Sample
Integration Tutorials
Audio/Video Transcoding Integration
Audio/Video Enhancement Integration
Audio Separation Integration
Integration of Digital and Visible Watermarks
Media AI Integration Tutorial
Media Quality Inspection Integration
Terminal SDK integration
MPS Live Stream Recording integration
DRM integration
Other tutorials
Application Scenario and Practical Tutorial
Image Quality Improvement Scenario
Audio/Video Cost Optimization Scenario
Short Drama Translation Scenario
AI-Generated Content Scenario
Online Education Scenarios
API Documentation
History
Introduction
API Category
Making API Requests
Processing Task Initiation APIs
Task Management APIs
Transcoding and Enhancement Template APIs
Watermark Template APIs
Screenshot Template APIs
Media AI Template APIs
Media AI—Hotword Lexicon APIs
Media AI—Sample Management APIs
Media Quality Inspection Template APIs
Live Streaming Recording Template APIs
Orchestration Management APIs
Data Statistics APIs
StreamLink—Security Group Management APIs
Other APIs
Image Processing Template APIs
AI Generation APIs
Other APIs
Data Types
Error Codes
Other Documents
WebSocket Protocol for Recognition
FAQs
Basics
Account Authorization
Task Configuration
Task Initiation
Task Result Viewing
Related Agreement
Service Level Agreement
Privacy Policy
Data Processing And Security Agreement
Contact Us
Glossary

CreateSmartEraseTemplate

PDF
Focus Mode
Font Size
Last updated: 2026-03-10 11:15:31

1. API Description

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

This API is used to create a custom smart erasing template.

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: CreateSmartEraseTemplate.
Version Yes String Common Params. The value used for this API: 2019-06-12.
Region No String Common Params. This parameter is not required for this API.
Name Yes String Length limit for the smart erasing template name: 64 characters.
EraseType Yes String Erasing type.
-subtitle: subtitle removal.
-watermark: watermark removal.
-privacy: privacy protection.
Comment No String Length limit for the description information of the smart erasing template: 256 characters.
EraseSubtitleConfig No SmartEraseSubtitleConfig Subtitle erasing configuration. This parameter is required and valid only when the value of EraseType is set to subtitle.
EraseWatermarkConfig No SmartEraseWatermarkConfig Watermark erasing configuration. This parameter is required and valid only when the value of EraseType is set to watermark.
ErasePrivacyConfig No SmartErasePrivacyConfig Privacy protection configuration. This parameter is required and valid only when the value of EraseType is set to privacy.

3. Output Parameters

Parameter Name Type Description
Definition Integer Unique identifier of the smart erasing template.
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 Creating a Subtitle Erasing Template with Automatic and Area Erasing Capabilities

This example shows you how to create a subtitle erasing template that has the capability to detect and erase the text in the preset area while also allowing for direct erasure in the specified area during the specified time period.

Input Example

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

{
    "Name": "Subtitle erasing template 2.",
    "EraseType": "subtitle",
    "EraseSubtitleConfig": {
        "SubtitleEraseMethod": "auto",
        "SubtitleModel": "standard",
        "CustomAreas": [
            {
                "BeginMs": 200,
                "EndMs": 3000,
                "Areas": [
                    {
                        "LeftTopX": 0.05,
                        "LeftTopY": 0.1,
                        "RightBottomX": 0.75,
                        "RightBottomY": 0.9,
                        "Unit": 1
                    }
                ]
            }
        ]
    }
}

Output Example

{
    "Response": {
        "Definition": 200410,
        "RequestId": "835f2ecd-8666-4717-998b-02680437a8ef"
    }
}

Example2 Creating a Subtitle Erasing Template with Extraction and Translation Features

This example shows you how to create a subtitle erasing template with extraction and translation features.

Input Example

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

{
    "Name": "Subtitle erasing template 2.",
    "EraseType": "subtitle",
    "EraseSubtitleConfig": {
        "SubtitleEraseMethod": "auto",
        "SubtitleModel": "standard",
        "OcrSwitch": "ON",
        "SubtitleLang": "zh_en",
        "SubtitleFormat": "vtt",
        "TransSwitch": "ON",
        "TransDstLang": "en"
    }
}

Output Example

{
    "Response": {
        "Definition": 200409,
        "RequestId": "ac14b422-1c7b-407d-9b95-530f1eea063d"
    }
}

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
InvalidParameterValue.AutoAreas The configuration for the automatic erasing area of the erasing template is incorrect.
InvalidParameterValue.Comment Parameter error: template description.
InvalidParameterValue.CustomAreas The specified area of the erasing template is incorrect.
InvalidParameterValue.ErasePrivacyConfig The privacy protection configuration of the erasing template is incorrect.
InvalidParameterValue.EraseSubtitleConfig The subtitle erasing configuration of the erasing template is incorrect.
InvalidParameterValue.EraseType The erasing type of the erasing template is incorrect.
InvalidParameterValue.EraseWatermarkConfig The watermark erasing configuration of the erasing template is incorrect.
InvalidParameterValue.Name Incorrect parameter value: Name exceeds the length limit.
InvalidParameterValue.OcrSwitch Incorrect parameter value: the OcrSwitch parameter value is invalid.
InvalidParameterValue.PrivacyModel The privacy protection model of the erasing template is incorrect.
InvalidParameterValue.PrivacyTargets The privacy protection target of the erasing template is incorrect.
InvalidParameterValue.SubtitleEraseMethod The subtitle erasing method of the erasing template is incorrect.
InvalidParameterValue.SubtitleLang The language for the subtitle erasing of the erasing template is incorrect.
InvalidParameterValue.SubtitleModel The subtitle erasing model of the erasing template is incorrect.
InvalidParameterValue.Switch Incorrect parameter value: invalid Switch value.
InvalidParameterValue.TransDstLang The configuration for the translation target language is incorrect under the smart erasing - subtitle erasing template.
InvalidParameterValue.TransSwitch Incorrect parameter value: the TransSwitch parameter value is invalid.
InvalidParameterValue.WatermarkEraseMethod The watermark erasing method of the erasing template is incorrect.
InvalidParameterValue.WatermarkModel The watermark erasing model of the erasing template is incorrect.

Help and Support

Was this page helpful?

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

Feedback