This topic describes the parameters for configuring Bulk Video Creator templates.
The region in the OSS URL of all media assets must match the region of the OpenAPI service endpoint you are calling.
Supported regions: China (Shanghai), China (Beijing), China (Hangzhou), China (Shenzhen), US (Silicon Valley), Singapore.
Replace all placeholders in the parameter examples, such as [your-bucket], [your-region-id], [your-file-name], [your-file-path], and media asset IDs (e.g., "****9d46c8b4548681030f6e****"), with your actual values.
Usage note
Call the AddTemplate API to create a custom Bulk Video Creator template. For API parameter details, see the AddTemplate section below.
To retrieve a specific template, call the GetTemplate API.
To retrieve a list of templates, call the ListTemplates API.
AddTemplate
Parameter | Type | Description | Example | Required |
Name | String | The template name | batch-editing-template-1 | No |
Type | String | The template type. For Bulk Video Creator, this must be | BatchEditing | Yes |
JSON | The template configuration parameters | See Config in Parameter examples. | Yes |
Config
Parameter | Type | Description | Example | Required |
JSON | Configures parameters such as stickers, background music, and background images. | See InputTemplateConfig in Parameter examples. | No | |
JSON | Configures editing parameters such as titles, voice-overs, background music, and background images. | See EditingTemplateConfig in Parameter examples. | No | |
JSON | Configures output settings such as resolution and video stream parameters. | See OutputTemplateConfig in Parameter examples. | Yes |
InputTemplateConfig
Parameter | Type | Description | Example | Required |
StickerArray | List<Sticker> |
| [{"MediaId":"****9d46c8b4548681030f6e****","X":10,"Y":100,"Width":300,"Height":300,"Opacity":0.6}] | No |
BackgroundMusicArray | List<String> |
| ["****b4549d46c88681030f6e****","****549d46c88b4681030f6e****"] | No |
BackgroundImageArray | List<String> |
| ["****b4549d46c88681030f6e****","****549d46c88b4681030f6e****"] | No |
EditingTemplateConfig
Parameter | Type | Description | Example | Required |
JSON | Title configuration. Supports subtitle parameter settings. | See TitleConfig example. | No | |
SubHeadingConfig | JSON | Multi-level subheading configuration. Supports subtitle parameter settings. JSON fields: | {"1":{"Y":0.3,"FontSize":40},"3":{"Y":0.5,"FontSize":30}} | No |
JSON | Voiceover script configuration. Important The template does not support configuring the SpecialWordsConfig parameter. | See SpeechConfig example. | No | |
JSON | Background music configuration. | No | ||
JSON | Background image configuration. If a background image is already configured in InputTemplateConfig, this field does not take effect. | No | ||
JSON | Canvas configuration for front-end page previews. | {"Width": 1080,"Height": 1920} | No |
FECanvas
If you want to migrate the styles from a common template to a Bulk Video Creator template, you must copy the FECanvas parameter and the style configuration for titles and subtitles from the common template and assign them to the TitleConfig, SpeechConfig.AsrConfig, and FECanvas parameters in the Bulk Video Creator template. This ensures that the subtitle sizes in the preview match the final output.
Parameter | Type | Description | Example | Required |
Width | Integer | Canvas width. Unit: pixel. | 450 | Yes |
Height | Integer | Canvas height. Unit: pixel. | 800 | Yes |
OutputTemplateConfig
Parameter | Type | Description | Example | Required |
Width | Integer | Output width. Unit: pixel. | 1920 | Yes |
Height | Integer | Output height. Unit: pixel. | 1080 | Yes |
JSONObject | Output video stream configuration, such as Crf, Codec, etc. | {"Crf": 27} | No |
Parameter examples
{
"Name": "batch-editing-template-1",
"Type": "BatchEditing",
"Config": {
"InputTemplateConfig": {
"BackgroundImageArray": [
"https://[your-bucket].oss-[your-region-id].aliyuncs.com/[your-file-path]/[your-file-name].png"
],
"BackgroundMusicArray": [
"icepublic-0c4475c3936f3a8743850f2da942ceee"
],
"StickerArray": [
{
"MediaURL": "https://[your-bucket].oss-[your-region-id].aliyuncs.com/[your-file-path]/[your-file-name].jpeg",
"X": 0.1,
"Y": 0.1,
"Width": 0.1,
"Height": 0.1
}
]
},
"EditingTemplateConfig": {
"TitleConfig": {
"Y": 0.7
},
"SpeechConfig": {
"Voice": "zhifei",
"AsrConfig": {
"Y": 0.9
}
}
},
"OutputTemplateConfig": {
"Width": 1080,
"Height": 1920
}
}
}