tencent cloud

媒体处理

ModifySmartEraseTemplate

PDF
聚焦模式
字号
最后更新时间: 2026-04-08 17:39:06

1. API Description

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

This API is used to modify a user-defined 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: ModifySmartEraseTemplate.
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.
Definition Yes Integer

Unique identifier of the intelligent erasure template

Name No String

Length limit for the smart erasing template name: 64 characters.

Comment No String

Length limit for the description information of the smart erasing template: 256 characters.

EraseType No String

Removal Type

  • subtitle removal
  • watermark removal
  • privacy protection
EraseSubtitleConfig No SmartEraseSubtitleConfig

Subtitle erasing configuration. It takes effect when the value of EraseType is set to subtitle, or when the value of EraseType is left unspecified but the original EraseType value of the modified template is subtitle.

EraseWatermarkConfig No SmartEraseWatermarkConfig

Watermark erasing configuration. The value of EraseType can be set to watermark or left unspecified. This parameter is valid only when the value of EraseType of the corresponding template is set to watermark.

ErasePrivacyConfig No SmartErasePrivacyConfig

Privacy protection configuration. The value of EraseType can be set to privacy or left unspecified. This parameter is valid only when the value of EraseType of the corresponding template is set to privacy.

3. Output Parameters

Parameter Name Type Description
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 Modifying a Subtitle Erasing Template and Enabling the Extraction Feature

This example shows you how to modify a subtitle erasing template and enable the OCR extraction and translation features.

Input Example

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

{
    "Definition": 200410,
    "EraseSubtitleConfig": {
        "SubtitleEraseMethod": "auto",
        "SubtitleModel": "standard",
        "OcrSwitch": "ON",
        "SubtitleLang": "zh_en",
        "SubtitleFormat": "vtt",
        "TransSwitch": "ON",
        "TransDstLang": "en"
    }
}

Output Example

{
    "Response": {
        "RequestId": "84265f8e-43ec-4449-9521-b9332f64ee79"
    }
}

Example2 Modifying a Watermark Erasing Template and Changing the Model

This example shows you how to modify a watermark erasing template and change the watermark erasing model to the Advanced Edition.

Input Example

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

{
    "Definition": 200407,
    "EraseWatermarkConfig": {
        "WatermarkEraseMethod": "auto",
        "WatermarkModel": "advanced"
    }
}

Output Example

{
    "Response": {
        "RequestId": "e4d526f3-f1bb-4030-9f0d-00df485a7eae"
    }
}

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.InvalidMpsUser Operation failed: unauthorized MPS user.
InternalError Internal error.
InvalidParameter Parameter error.
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.Definition Parameter error: Definition.
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.ModifyDefaultTemplate Incorrect parameter value: the default template cannot be modified.
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.SubtitleEmbedId Subtitle suppression ID invalid
InvalidParameterValue.SubtitleEraseMethod The subtitle erasing method of the erasing template is incorrect.
InvalidParameterValue.SubtitleFormat Incorrect parameter value: The value of the SubtitleFormat parameter is invalid.
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.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.UseOriginalPos UseOriginalPos unavailable
InvalidParameterValue.UseOriginalSize UseOriginalSize Unavailable
InvalidParameterValue.WatermarkEraseMethod The watermark erasing method of the erasing template is incorrect.
InvalidParameterValue.WatermarkModel The watermark erasing model of the erasing template is incorrect.
ResourceNotFound.TemplateNotExist The resource does not exist: the template does not exist.

帮助和支持

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

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

文档反馈