All Products
Search
Document Center

Intelligent Media Services:AddTemplate

Last Updated:Mar 30, 2026

Creates a template.

Operation description

  • For more information about how to use a regular template, see Create and use a regular template.

  • For more information about how to use an advanced template, see Create and use advanced templates.

  • After an advanced template is created, it enters the Processing state. In this case, the template is unavailable. The template can be used only when it is in the Available state. The time required for template processing varies based on the size of the template file. Generally, it ranges from 10 seconds to 5 minutes.

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:AddTemplate

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Name

string

No

The name of the custom template.

Template Name

Type

string

No

The template type. Valid values:

  • Timeline: a regular template created based on the timeline of a video editing project, in which multiple materials are arranged in sequence across multiple layers. It can be used to convert text and images into videos, create photo albums, add opening and closing parts, and apply the default watermark.

  • VETemplate: an advanced template created using effects of Adobe After Effects (AE). It can be used to produce complex animations and advanced media effects.

Valid values:

  • Timeline :
  • VETemplate :

Timeline

Config

string

No

  • The template configurations. The Config object of a regular template is encapsulated based on the Timeline object of an online editing project. The Config object of a custom template provides more flexible features. If you have special requirements, we recommend that you understand the structure of a Config object and configure a custom template. For more information, see Config object of a regular template.

  • For more information about Config object examples, see Basic template configurations.

SeeTimelinetemplateConfigdocumentation

CoverUrl

string

No

The URL of the template thumbnail.

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

PreviewMedia

string

No

The ID of the template preview video.

****01bf24bf41c78b2754cb3187****

Status

string

No

The template state. Valid values:

  • Available: The template is available.

  • Created: The template is created but not ready for use.

  • Uploading: The video is being uploaded.

  • Processing: The advanced template is being processed.

  • UploadFailed: Failed to upload the video.

  • ProcessFailed: Failed to process the advanced template.

Valid values:

  • UploadFailed :
  • ProcessFailed :
  • Available :
  • Uploading :
  • Created :
  • Processing :

Available

Source

string

No

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

  • OpenAPI

  • AliyunConsole

  • WebSDK

Valid values:

  • AliyunConsole :
  • WebSDK :
  • OpenAPI :

OpenAPI

RelatedMediaids

string

No

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

{"video":["1805a0c6ca544fb395a06ca683619655"]}

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

****2876-6263-4B75-8F2C-CD0F7FCF****

Template

object

The template information.

TemplateId

string

The template ID.

****01bf24bf41c78b2754cb3187****

Name

string

The template name.

Template Name

Type

string

The template type.

Valid values:

  • Timeline: regular template.

  • VETemplate: advanced template.

Valid values:

  • Timeline :
  • VETemplate :

Timeline

Config

string

The template configurations.

SeeConfigdocumentation

CoverUrl

string

The URL of the template thumbnail.

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

PreviewMedia

string

The ID of the preview video.

****01bf24bf41c78b2754cb3187****

Status

string

The template state.

Valid values:

  • UploadFailed: Failed to upload the video.

  • ProcessFailed: Failed to process the advanced template.

  • Available: The template is available.

  • Uploading: The video is being uploaded.

  • Created: The template is created but not ready for use.

  • Processing: The advanced template is being processed.

Valid values:

  • UploadFailed :
  • ProcessFailed :
  • Available :
  • Uploading :
  • Created :
  • Processing :

Available

CreateSource

string

The source from which the template was created.

Valid values:

  • AliyunConsole

  • WebSDK

  • OpenAPI

Valid values:

  • AliyunConsole :
  • WebSDK :
  • OpenAPI :

OpenAPI

ModifiedSource

string

The source from which the template was modified.

Valid values:

  • AliyunConsole

  • WebSDK

  • OpenAPI

Valid values:

  • AliyunConsole :
  • WebSDK :
  • OpenAPI :

OpenAPI

Examples

Success response

JSON format

{
  "RequestId": "****2876-6263-4B75-8F2C-CD0F7FCF****",
  "Template": {
    "TemplateId": "****01bf24bf41c78b2754cb3187****",
    "Name": "Template Name",
    "Type": "Timeline",
    "Config": "SeeConfigdocumentation",
    "CoverUrl": "http://example-bucket.oss-cn-shanghai.aliyuncs.com/cover.jpg",
    "PreviewMedia": "****01bf24bf41c78b2754cb3187****",
    "Status": "Available",
    "CreateSource": "OpenAPI",
    "ModifiedSource": "OpenAPI"
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.