GetTemplate
Retrieves the information about a template based on the template ID. Advanced templates require a longer parsing time. When the template type is advanced, it can be used once the Status is Available.
Operation description
The template factory encapsulates the editing and synthesis timeline. You can define commonly used timelines as templates. When similar requirements arise, you only need to pass key parameters and media assets to produce videos.
To use standard templates, refer to Quick start for standard templates.
To use advanced templates, refer to Create and use advanced templates.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ice:GetTemplate |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| TemplateId |
string |
No |
The template ID. |
****20b48fb04483915d4f2cd8ac**** |
| RelatedMediaidFlag |
string |
No |
Specifies whether to return the media assets associated with the template. Valid values:
|
0 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response data. |
||
| RequestId |
string |
The request ID. |
******11-DB8D-4A9A-875B-275798****** |
| Template |
object |
The template information. |
|
| TemplateId |
string |
The template ID. |
****20b48fb04483915d4f2cd8ac**** |
| Name |
string |
The template name. |
Video watermark template |
| Type |
string |
The templatetype. Valid values:
|
Timeline |
| Config |
string |
The template configuration.
|
Refer to Timeline template configuration details |
| PreviewMedia |
string |
The preview media asset. |
****20b48fb04483915d4f2cd8ac**** |
| Status |
string |
The template status. Valid values:
|
Available |
| CreateSource |
string |
The creation source. Valid values:
|
OpenAPI |
| ModifiedSource |
string |
The modification source. Valid values:
|
OpenAPI |
| PreviewMediaStatus |
string |
The preview media asset status. Valid values:
|
Normal |
| CreationTime |
string |
The creation time. The time is in the ISO 8601 format and uses UTC (ending with Z). |
2020-12-26T04:11:10Z |
| ModifiedTime |
string |
The modification time. The time is in the ISO 8601 format and uses UTC (ending with Z). |
2020-12-26T04:11:10Z |
| CoverURL |
string |
The cover URL. |
http://example-bucket.oss-cn-shanghai.aliyuncs.com/cover.jpg |
| ClipsParam |
string |
The ClipsParam parameter template for submitting a synthesis task. You can replace mediaId and text with actual parameters to submit the synthesis task. For usage methods, refer to: |
{"Media1":"mediaId","Text1":"text"} |
| RelatedMediaids |
string |
The media assets associated with the template. Used by the standard template editor. |
{"video":["******c04f1d4a06996144cc1a******"],"audio":["******c04f1d4a06996144cc1a******"],"image":["******c04f1d4a06996144cc1a******"]} |
Examples
Success response
JSON format
{
"RequestId": "******11-DB8D-4A9A-875B-275798******",
"Template": {
"TemplateId": "****20b48fb04483915d4f2cd8ac****",
"Name": "Video watermark template",
"Type": "Timeline",
"Config": "Refer to Timeline template configuration details",
"PreviewMedia": "****20b48fb04483915d4f2cd8ac****",
"Status": "Available",
"CreateSource": "OpenAPI",
"ModifiedSource": "OpenAPI",
"PreviewMediaStatus": "Normal",
"CreationTime": "2020-12-26T04:11:10Z",
"ModifiedTime": "2020-12-26T04:11:10Z",
"CoverURL": "http://example-bucket.oss-cn-shanghai.aliyuncs.com/cover.jpg",
"ClipsParam": "{\"Media1\":\"mediaId\",\"Text1\":\"text\"}",
"RelatedMediaids": "{\"video\":[\"******c04f1d4a06996144cc1a******\"],\"audio\":[\"******c04f1d4a06996144cc1a******\"],\"image\":[\"******c04f1d4a06996144cc1a******\"]}"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.