Overview
Menu

ModifySmartEraseTemplate

Last updated: 2025-10-13 10:34:16Download PDF

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 NameRequiredTypeDescription
ActionYesStringCommon Params. The value used for this API: ModifySmartEraseTemplate.
VersionYesStringCommon Params. The value used for this API: 2019-06-12.
RegionNoStringCommon Params. This parameter is not required for this API.
DefinitionYesIntegerUnique identifier of the smart erasing template.
NameNoStringLength limit for the smart erasing template name: 64 characters.
CommentNoStringLength limit for the description information of the smart erasing template: 256 characters.
EraseTypeNoStringErasing type.
-subtitle: subtitle removal.
-watermark: watermark removal.
-privacy: privacy protection.
EraseSubtitleConfigNoSmartEraseSubtitleConfigSubtitle 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.
EraseWatermarkConfigNoSmartEraseWatermarkConfigWatermark 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.
ErasePrivacyConfigNoSmartErasePrivacyConfigPrivacy 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 NameTypeDescription
RequestIdStringThe 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 CodeDescription
FailedOperation.InvalidMpsUserOperation failed: unauthorized MPS user.
InternalErrorInternal error.
InvalidParameterParameter error.
InvalidParameterValue.AutoAreasThe configuration for the automatic erasing area of the erasing template is incorrect.
InvalidParameterValue.CommentParameter error: template description.
InvalidParameterValue.CustomAreasThe specified area of the erasing template is incorrect.
InvalidParameterValue.DefinitionParameter error: Definition.
InvalidParameterValue.ErasePrivacyConfigThe privacy protection configuration of the erasing template is incorrect.
InvalidParameterValue.EraseSubtitleConfigThe subtitle erasing configuration of the erasing template is incorrect.
InvalidParameterValue.EraseTypeThe erasing type of the erasing template is incorrect.
InvalidParameterValue.EraseWatermarkConfigThe watermark erasing configuration of the erasing template is incorrect.
InvalidParameterValue.ModifyDefaultTemplateIncorrect parameter value: the default template cannot be modified.
InvalidParameterValue.NameIncorrect parameter value: Name exceeds the length limit.
InvalidParameterValue.PrivacyModelThe privacy protection model of the erasing template is incorrect.
InvalidParameterValue.PrivacyTargetsThe privacy protection target of the erasing template is incorrect.
InvalidParameterValue.SubtitleEraseMethodThe subtitle erasing method of the erasing template is incorrect.
InvalidParameterValue.SubtitleFormatIncorrect parameter value: The value of the SubtitleFormat parameter is invalid.
InvalidParameterValue.SubtitleLangThe language for the subtitle erasing of the erasing template is incorrect.
InvalidParameterValue.SubtitleModelThe subtitle erasing model of the erasing template is incorrect.
InvalidParameterValue.TransDstLangThe configuration for the translation target language is incorrect under the smart erasing - subtitle erasing template.
InvalidParameterValue.WatermarkEraseMethodThe watermark erasing method of the erasing template is incorrect.
InvalidParameterValue.WatermarkModelThe watermark erasing model of the erasing template is incorrect.
ResourceNotFound.TemplateNotExistThe resource does not exist: the template does not exist.