Overview
Menu

ModifySmartSubtitleTemplate

Last updated: 2025-03-28 15:37:16Download PDF

1. API Description

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

This API is used to modify a user-defined smart subtitle 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: ModifySmartSubtitleTemplate.
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 subtitle template.
TranslateSwitchNoStringSubtitle translation switch.
ON: enable translation
OFF: disable translation
NameNoStringSmart subtitle template name.
Length limit: 64 characters.
CommentNoStringSmart subtitle template description.
Length limit: 256 characters.
VideoSrcLanguageNoStringSource language of the video with smart subtitles.
Supported languages:
zh: Simplified Chinese
en: English
ja: Japanese
ko: Korean
zh-PY: Chinese-English-Cantonese
zh-medical: Medical Chinese
yue: Cantonese
vi: Vietnamese
ms: Malay
id: Indonesian
fli: Filipino
th: Thai
pt: Portuguese
tr: Turkish
ar: Arabic
es: Spanish
hi: Hindi
fr: French
de: German
zh-dialect: Chinese dialect
SubtitleFormatNoStringSmart subtitle file format.
vtt: WebVTT format
If this field is left blank, no subtitle file will be generated.
SubtitleTypeNoIntegerSmart subtitle language type.
0: source language1: target language
2: source language + target language
The value can only be 0 when TranslateSwitch is set to OFF.The value can only be 1 or 2 when TranslateSwitch is set to ON.
AsrHotWordsConfigureNoAsrHotWordsConfigureASR hotword lexicon parameter.
TranslateDstLanguageNoStringTarget language for subtitle translation.
This field takes effect when TranslateSwitch is set to ON.
Supported languages:
zh: Simplified Chinese
en: English
ja: Japanese
ko: Korean
fr: French
es: Spanish
it: Italian
de: German
tr: Turkish
ru: Russian
pt: Portuguese
vi: Vietnamese
id: Indonesian
ms: Malay
th: Thai
ar: Arabic
hi: Hindi

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 Smart Subtitle Template

Input Example

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

{
    "Definition": 202281,
    "TranslateSwitch": "ON",
    "Name": "New name",
    "SubtitleType": 1,
    "TranslateDstLanguage": "en"
}

Output Example

{
    "Response": {
        "RequestId": "569d5d19-d01c-4efc-97dc-4ea53ae95647"
    }
}

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.AsrHotWordsLibraryIdThe value of the hotword lexicon ID parameter is incorrect.
InvalidParameterValue.AsrHotWordsSwitchThe value of the hotword lexicon switch parameter is incorrect.
InvalidParameterValue.CommentParameter error: template description.
InvalidParameterValue.ModifyDefaultTemplateIncorrect parameter value: the default template cannot be modified.
InvalidParameterValue.NameIncorrect parameter value: Name exceeds the length limit.
InvalidParameterValue.SubtitleFormatIncorrect parameter value: The value of the SubtitleFormat parameter is invalid.
InvalidParameterValue.SubtitleTypeThe value of the subtitle language type is incorrect.
InvalidParameterValue.TranslateDstLanguageThe value of the target language parameter is incorrect.
InvalidParameterValue.TranslateSwitchThe value of the translation switch parameter is incorrect.
InvalidParameterValue.VideoSrcLanguageThe value of the video source language parameter is incorrect.
ResourceNotFound.TemplateNotExistThe resource does not exist: the template does not exist.