All Products
Search
Document Center

Intelligent Media Services:SubmitMediaProducingJob

Last Updated:Oct 30, 2026

Submits a media editing and producing job. This API operation automates the editing, producing, and other post-production processes for video or audio materials.

Operation description

  • Billing: Video editing is billed based on the duration of the produced video. For more information, see Video editing. No fees are charged if the processing fails.

  • Diverse editing capabilities: Invoke this API operation when you need to arrange and design materials based on personalized ideas. This API operation supports flexible timeline configurations to meet complex video editing requirements.

  • Material reference rules: Materials referenced in the cloud editing timeline can be media assets in the media asset library, OSS files (recommended), or other public URLs. If the material is an OSS file, MediaUrl only supports the OSS address format, such as https://your-bucket.oss-region-name.aliyuncs.com/your-object.ext. If the material is another public URL, the task duration increases.

  • Asynchronously execute tasks: - This API operation is an asynchronous task. After you submit the task, a task ID is returned (the task is not completed at this time and enters the background queue to execute asynchronously). The final result is notified through a callback. You can also invoke the query media editing and producing jobs operation to actively query the task status.

  • Task status query:

    1. Invoke the query media editing and producing jobs operation and pass the JobId parameter to query the task status and result.

    2. When submitting a media editing and producing job, you can set UserData in the request parameters to include a callback URL. When the editing task is completed or fails, the system sends a notification to this callback URL. You can process the callback data to obtain the task status.

  • Media asset registration and analysis: After the video is produced, the media asset is automatically registered. At this time, the media asset is in the analyzing state. After the analysis is completed, you can obtain the duration and resolution information of the produced video based on the MediaId.

Limits

  • The rate limit for this API operation is 30 QPS (requests per second for submitting tasks). Submitted tasks enter the background queue and are processed asynchronously.

    Note

    If this limit is exceeded, you may encounter the "Throttling.User" error. For more information, see Throttling.User error when submitting an editing task.

  • When you submit a large number of tasks (such as 1,000 or 10,000), the system dynamically scales out, but a certain queue time may be required.

  • The maximum number of tracks for video, image, and subtitle tracks is 100 each.

  • There is no limit on the number of materials, but the total size of material files cannot exceed 1 TB.

  • The region of the input or output OSS bucket must be the same as the region where Intelligent Media Services (IMS) is used.

  • When the output is a video, the resolution of the produced video has the following limits:

    • The width and height cannot be less than 128 pixels.

    • The width and height cannot be greater than 4,096 pixels.

    • The short side cannot be greater than 2,160 pixels.

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

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

ProjectId

string

No

The ID of the editing project. You can call the CreateEditingProject operation to create an editing project and obtain the ProjectId parameter to submit an editing task.

Important You must specify one of the ProjectId, Timeline, and TemplateId parameters, and leave the other two parameters empty.

xxxxxfb2101cb318xxxxx

Timeline

string

No

The timeline of the cloud editing task. When you need to arrange materials and design special effects based on video ideas, you can manually construct the Timeline parameter.

  • A timeline mainly includes three types of objects: tracks, materials, and effects. For more information, see Timeline configurations.

  • For more timeline configuration examples, see Best practices.

Important You must specify one of the ProjectId, Timeline, and TemplateId parameters, and leave the other two parameters empty.

{"VideoTracks":[{"VideoTrackClips":[{"MediaId":"****4d7cf14dc7b83b0e801c****"},{"MediaId":"****4d7cf14dc7b83b0e801c****"}]}]}

TemplateId

string

No

The ID of the template. This parameter is used to quickly build a timeline with a low threshold. Video editing based on common templates and advanced templates is supported.

  • When you use a template ID to submit a media editing and producing job, you must provide the ClipsParam parameter to flexibly adjust or replace materials in the template.

  • You can invoke the GetTemplate operation to obtain template information.

Important You must specify one of the ProjectId, Timeline, and TemplateId parameters, and leave the other two parameters empty.

****96e8864746a0b6f3****

ClipsParam

string

No

The material parameters corresponding to the template, in JSON format. When TemplateId is not empty, ClipsParam cannot be empty. For the specific format, see Create and use common templates and Create and use advanced templates.

See the template usage documentation

ProjectMetadata

string

No

The metadata information of the editing project, in JSON format. For the specific structure definition, see ProjectMetadata.

{"Description":"Edited video description","Title":"Editing title test"}

OutputMediaTarget

string

No

The target type of the output product. Valid values:

  • oss-object: an OSS object in an Alibaba Cloud OSS bucket.

  • vod-media: a media asset in Alibaba Cloud VOD.

  • S3: output based on the S3 protocol.

oss-object

OutputMediaConfig

string

Yes

The target configuration of the output product, in JSON format. You can set the URL of the output product in OSS or the storage location in the VOD bucket.

  • When the output is to OSS, the MediaURL parameter of the output target is required.

  • When the output is to VOD, the StorageLocation and FileName parameters are required.

OutputMediaConfig parameter examples.

{"MediaURL":"https://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4"}

UserData

string

No

The custom settings, in JSON format. The maximum length is 512 bytes. Task completion callback configurations are supported. Parameters:

  • NotifyAddress: the callback URL for task completion.

  • RegisterMediaNotifyAddress: the callback URL for the completion of produced media asset analysis.

{"NotifyAddress":"https://xx.com/xx","RegisterMediaNotifyAddress":"https://xxx.com/xx"}

ClientToken

string

No

Ensures the idempotence of the request. You can generate a parameter value from your client to ensure that the parameter value is unique across different requests. ClientToken only supports ASCII characters and cannot exceed 64 characters.

****12e8864746a0a398****

Source

string

No

The source of the editing and producing request. Valid values:

  • OpenAPI: direct API requests.

  • AliyunConsole: requests from the Alibaba Cloud Management Console.

  • WebSDK: requests from frontend pages integrated with WebSDK.

OPENAPI

EditingProduceConfig

string

No

The editing and producing parameters. For configuration details, see EditingProduceConfig parameter details.

Note

If no cover image is configured in EditingProduceConfig, the first frame of the video is used as the cover by default.

  • AutoRegisterInputVodMedia: specifies whether to automatically register the VOD media assets in your timeline to IMS. Default value: true.

  • OutputWebmTransparentChannel: specifies whether to output the video with a transparent channel. Default value: false.

  • CoverConfig: the custom cover image parameters.

  • ...

{ "AutoRegisterInputVodMedia": "true", "OutputWebmTransparentChannel": "true" }

MediaMetadata

string

No

The metadata of the produced video, in JSON format. For the specific structure definition, see MediaMetadata.

{ "Title":"test-title", "Tags":"test-tags1,tags2" }

OutputMediaConfig parameter examples

Example: Output to OSS

{
  "MediaURL":"https://my-test-bucket.oss-cn-shanghai.aliyuncs.com/test/xxxxxtest001xxxxx.mp4",
  "Bitrate": 2000,  
  "Width": 800,  
  "Height": 680
}

When the output is to OSS, MediaURL is required. The default value of the OutputMediaTarget parameter is "oss-object", which indicates that the output is to OSS. Other parameters are optional. Bitrate is used to set the bitrate of the output product. Generally, a higher bitrate indicates clearer quality, and the maximum value is 5000. Width and Height are used to set the resolution of the output product.

Path format of the OSS URL: https://bucketname.oss-region-name.aliyuncs.com/xxx/yyy.ext

bucketname is the name of the OSS bucket.

oss-region-name.aliyuncs.com is the public endpoint of the OSS file. For example, the endpoints for Shanghai, Beijing, and Hangzhou are:

oss-cn-shanghai.aliyuncs.com
oss-cn-hangzhou.aliyuncs.com 
oss-cn-beijing.aliyuncs.com

Example: Output to VOD

{ 
  "StorageLocation": "outin-*xxxxxx7d2a3811eb83da00163exxxxxx.oss-cn-shanghai.aliyuncs.com",  
  "FileName": "output.mp4",  
  "Bitrate": 2000,  
  "Width": 800,  
  "Height": 680
}

When the output is to VOD, the StorageLocation and FileName parameters are required. Set the OutputMediaTarget parameter to "vod-media", which indicates that the output is to the storage bucket of ApsaraVideo VOD. The available storage locations in ApsaraVideo VOD can be viewed in the storage address of the media asset after you upload the media asset in VOD.

Parameter descriptions in the OutputMediaConfig structure

ParameterTypeDescription
MediaURLStringThe URL of the output media asset. When the target of OutputMediaTarget is oss-object, specify the HTTP URL path of the OSS file, such as http://xxx-bucket-name.oss-cn-shanghai.aliyuncs.com/. The OSS region must be the same as the region where the invoked service resides.
StorageLocationStringWhen the target of OutputMediaTarget is vod-media, specify the storage location to store the media asset in VOD. The storage location is the file storage location in VOD and does not include the http:// prefix, such as outin-xxxxxx.oss-cn-shanghai.aliyuncs.com.
FileNameStringWhen the target of OutputMediaTarget is vod-media, specify the fileName (including the file extension but excluding the path) as the output file name.
WidthIntegerThe width of the output product. This parameter is optional. The default value is the maximum width of multiple materials.
HeightIntegerThe height of the output product. This parameter is optional. The default value is the maximum height of multiple materials.
BitrateIntegerThe bitrate of the output product, in Kbps. This parameter is optional. The default value is the highest bitrate of multiple materials, and the upper limit is 5000. To retain the highest bitrate of the materials, set EditingProduceConfig.KeepOriginMaxBitrate to true. For more details, see EditingProduceConfig.
VodTemplateGroupIdStringThe VOD transcoding template group specified when the produced video is output to VOD. If VOD transcoding is not required, set this parameter to "VOD_NO_TRANSCODE".

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The ID of the request.

****36-3C1E-4417-BDB2-1E034F****

ProjectId

string

The ID of the editing project.

****b4549d46c88681030f6e****

JobId

string

The ID of the producing job.

****d80e4e4044975745c14b****

MediaId

string

The ID of the produced media asset.

****c469e944b5a856828dc2****

VodMediaId

string

The ID of the VOD media asset. This parameter is returned if the video output location is VOD.

****d8s4h75ci975745c14b****

Examples

Success response

JSON format

{
  "RequestId": "****36-3C1E-4417-BDB2-1E034F****",
  "ProjectId": "****b4549d46c88681030f6e****",
  "JobId": "****d80e4e4044975745c14b****",
  "MediaId": "****c469e944b5a856828dc2****",
  "VodMediaId": "****d8s4h75ci975745c14b****"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParameter The specified parameter \ is not valid.
404 ProjectNotFound The specified project not found

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.