All Products
Search
Document Center

Intelligent Media Services:GetTemplate

Last Updated:Mar 30, 2026

Queries the information about a template based on the template ID. Query the information about an advanced template if the template is in the Available state.

Operation description

A template is an encapsulation of the timeline of a media editing and production job. You can define a common timeline as a template. When you have the same requirements, you need to only specify key parameters and materials to produce videos.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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 information about the associated materials. Default value: 0. Valid values: 0 and 1. A value of 1 specifies that the information about the associated materials is returned. This parameter is valid only for regular templates.

0

Response elements

Element

Type

Description

Example

object

The response parameters.

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.

VideoAddWatermarktemplate

Type

string

The template type. Valid values:

  • Timeline

  • VETemplate

Timeline

Config

string

The template configurations.

Refer toTimelinetemplateConfiguration details

PreviewMedia

string

The preview media asset.

****20b48fb04483915d4f2cd8ac****

Status

string

The template state. Valid values:

  • Available

  • Created

  • Uploading

  • Processing

  • UploadFailed

  • ProcessFailed

Available

CreateSource

string

The source from which the template was created. Valid values:

  • AliyunConsole

  • OpenAPI

  • WebSDK

OpenAPI

ModifiedSource

string

The source from which the template was modified. Valid values:

  • AliyunConsole

  • OpenAPI

  • WebSDK

OpenAPI

PreviewMediaStatus

string

The state of the preview media asset. Valid values:

  • Init: the initial state, which indicates that the source file is not ready.

  • Preparing: The source file is being prepared. For example, the file is being uploaded or edited.

  • PrepareFail: The source file failed to be prepared. For example, the information about the source file failed to be obtained.

  • Normal: The source file is ready.

Normal

CreationTime

string

The time when the template was created.

2020-12-26T04:11:10Z

ModifiedTime

string

The time when the template was last modified.

2020-12-26T04:11:10Z

CoverURL

string

The thumbnail URL.

http://example-bucket.oss-cn-shanghai.aliyuncs.com/cover.jpg

ClipsParam

string

The clip parameters for submitting a video production job. You can replace mediaId and text with real values to submit a job. References:

{"Media1":"mediaId","Text1":"text"}

RelatedMediaids

string

The IDs of the materials associated with the template for use by the regular template editor.

{"video":["******c04f1d4a06996144cc1a******"],"audio":["******c04f1d4a06996144cc1a******"],"image":["******c04f1d4a06996144cc1a******"]}

Examples

Success response

JSON format

{
  "RequestId": "******11-DB8D-4A9A-875B-275798******",
  "Template": {
    "TemplateId": "****20b48fb04483915d4f2cd8ac****",
    "Name": "VideoAddWatermarktemplate",
    "Type": "Timeline",
    "Config": "Refer toTimelinetemplateConfiguration 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.