All Products
Search
Document Center

Intelligent Media Services:StartWorkflow

Last Updated:Mar 30, 2026

By invoking the StartWorkflow API, you can submit a media workflow template task to implement an automated media processing flow based on the workflow template.

Operation description

  • Currently, only media assets from Intelligent Media Services or ApsaraVideo VOD are supported as workflow inputs.

  • When submitting a flow task, you must specify a workflow template. You can create a workflow template in the Intelligent Media Services console or use a system preset workflow template.

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

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

WorkflowId

string

Yes

The ID of the workflow template. To view the template ID, log on to the IMS console and choose Configurations > Workflow Template.

******f0e54971ecbffd472190******

TaskInput

string

No

The workflow input. Only media assets are supported.

{ "Type": "Media", "Media": "******30706071edbfe290b488******" }或 { "Type": "OSS", "Media": "oss://bucket/path/to/video.mp4" }

UserData

string

No

The user-defined data in the JSON format, which cannot be up to 512 bytes in length. You can specify a custom callback URL. For more information, see Configure a callback upon editing completion.

{"NotifyAddress":"https://xx.xx.xxx"}或{"NotifyAddress":"ice-callback-demo"}

SkipInputVerification

boolean

No

Specifies whether to skip verification of the input path supported by the pipeline. This parameter takes effect only when the pipeline input is an OSS file. We recommend that you do not skip this verification to avoid faults caused by incorrect paths. If this parameter is not specified, verification is performed by default. Valid values:

  • true: Skip verification

  • false: Do not skip verification

false

Workflow Trigger Matching Rules

When an OSS file triggers a workflow, the system applies the following matching policy: using the path of the newly added file as the basis, it checks the location bound to the workflow. If the file path contains the string specified in the rule, the rule matches; otherwise, it does not match. For example, given the file path:
http://bucket.oss-cn-hangzhou.aliyuncs.com/A/B/C/test1.flv, the following rules apply:

1. http://bucket.oss-cn-hangzhou.aliyuncs.com/A/B/C/          Match
2. http://bucket.oss-cn-hangzhou.aliyuncs.com/A/B/            Match
3. http://bucket.oss-cn-hangzhou.aliyuncs.com/A/              Match
4. http://bucket.oss-cn-hangzhou.aliyuncs.com/                Match
5. http://bucket.oss-cn-hangzhou.aliyuncs.com/A/B/C/test.flv  Match
6. http://bucket.oss-cn-hangzhou.aliyuncs.com/A/B/CC/         No match
7. http://bucket.oss-cn-hangzhou.aliyuncs.com/A/B2/           No match
8. http://bucket.oss-cn-hangzhou.aliyuncs.com/A2/B/C/         No match
Note

When creating a new media workflow, do not configure the input path of one workflow as a prefix of another workflow's input path. Otherwise, a single incremental file may trigger two workflow execution instances. For example, if two workflows have input paths configured as test and test1 respectively, uploading a file to the test1 folder also satisfies the test prefix condition, thereby triggering two workflow execution instances.

Matching File Name Extensions

Only multimedia files can trigger workflows. The Media Library service determines whether a file is multimedia based on its file name extension. A file either has no extension (i.e., the file name does not contain the extension separator “.”), or its extension must comply with the following rules:

Note

For .swf files, screenshot and transcoding quality are not guaranteed.

TypeFile Name Extensions
Video3gp, asf, avi, dat, dv, flv, f4v, gif, m2t, m3u8, m4v, mj2, mjpeg, mkv, mov, mp4, mpe, mpg, mpeg, mts, ogg, qt, rm, rmvb, swf, ts, vob, wmv, webm
Audioaac, ac3, acm, amr, ape, caf, flac, m4a, mp3, ra, wav, wma, aiff

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

******42-E8E1-4FBB-8E52-F4225C******

TaskId

string

The ID of the workflow task.

******22dad741d086a50325f9******

Examples

Success response

JSON format

{
  "RequestId": "******42-E8E1-4FBB-8E52-F4225C******",
  "TaskId": "******22dad741d086a50325f9******"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.