All Products
Search
Document Center

Intelligent Media Services:UploadMediaByURL

Last Updated:Aug 06, 2026

Invokes the UploadMediaByURL operation to pull audio and video media files from source file URLs for upload. Batch uploads are supported. This operation is mainly applicable to scenarios where files are not stored on a local service or terminal and need to be uploaded through a URL that supports public network access.

Operation description

Operation description

  • If a callback is configured, you receive an event notification about the completion of URL-based video upload after the upload is complete. You can invoke the operation for obtaining URL upload information to query the upload status.

  • After an upload task is submitted successfully, an asynchronous task is generated in the cloud and queued for execution. After the upload is complete, you can associate the URL with the video ID based on the information returned in the event notification (message callback).

Limits

  • This operation supports uploading only to VOD storage, not to user-owned Object Storage Service (OSS) storage. If you use your own OSS storage, pull the file to a local device first, upload the file to OSS by using OSS SDK, and then invoke the RegisterMediaInfo operation to register the OSS file in the media asset library.

  • This operation is currently supported only in the China (Shanghai), China (Beijing), and China (Shenzhen) regions.

  • This operation supports uploading only audio and video files.

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

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

UploadURLs

string

No

The URL of the media source file.

  • The URL must include a file name extension. For example, mp4 is the file name extension in https://****.mp4.
    • If the URL does not include a file name extension, you can specify the FileExtension parameter in UploadMetadatas.

    • If the URL includes a file name extension and the FileExtension parameter is also specified, the value of FileExtension takes precedence.

  • URL-encode the URLs. Separate multiple URLs with commas (,). A maximum of 20 URLs are supported.

  • To prevent upload failures caused by special characters, URL-encode each URL before concatenating them with commas.

https://diffurl.mp4

AppId

string

No

The application ID.

app-1000000

UserData

string

No

The custom settings. The value is a JSON string that supports settings such as message callbacks.

{"MessageCallback":{"CallbackURL":"http://example.aliyundoc.com"},"Extend":{"localId":"xxx","test":"www"}}

UploadTargetConfig

string

No

The destination storage address.

  • StorageType: only oss is supported.

  • StorageLocation: only VOD storage is supported. User-owned OSS storage is not supported.

{"StorageType":"oss","StorageLocation":"outin-***.oss-cn-shanghai.aliyuncs.com"}

MediaMetaData

string

No

The metadata of the media file to be uploaded. The value is a JSON string.

  • The metadata takes effect only when it matches a URL in UploadURLs.

  • JSON format: [UploadMetadata, UploadMetadata, ...]. The value must be converted to a JSON string.

  • For more information, see the UploadMetadata table below.

[{"SourceURL":"https://example.aliyundoc.com/video01.mp4","Title":"urlUploadTest"}]

PostProcessConfig

string

No

The post-upload processing action when Type is set to video or audio.

Valid values of ProcessType: Workflow.

{"ProcessType": "Workflow","ProcessID":"b72a06c6beeb4dcdb898feef067b1***"}

EntityId

string

No

The entity ID. You can call the CreateEntity operation to create an entity and define a custom dynamic metadata structure.

d67281da3c8743b8823ad12976187***

UploadMetadata

NameTypeRequiredDescription
SourceURLStringYesThe URL of the media source file to be uploaded.
TitleStringYesThe media title. The title can be up to 128 bytes in length. UTF-8 encoded.
FileSizeStringNoThe file size.
DescriptionStringNoThe description. The description can be up to 1024 bytes in length. UTF-8 encoded.
CoverURLStringNoThe custom video thumbnail URL.
CateIdStringNoThe category ID.
TagsStringNoThe tags. Each tag can be up to 32 bytes in length. A maximum of 16 tags are supported. Separate multiple tags with commas (,). UTF-8 encoded.
WorkflowIdStringNoThe workflow ID.
FileExtensionStringNoThe file name extension of the media file.
DynamicMetaDataStringNoThe dynamic metadata. Example: "{"Uploader": "xxx"}".
EntityIdStringNoThe entity ID.
Note
  • The WorkflowId parameter task is an asynchronous task. After submission, the task is not immediately completed and is queued for asynchronous execution in the background.

  • Parameters in UploadMetadata (such as Title, Description, and Tags) cannot contain emoji characters.

  • If a callback is configured, after the video upload is complete, you receive a URL-based video upload completion notification in addition to the upload and transcoding notifications.

  • When tasks are submitted in batches, each SourceURL has an independent notification.

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

****83B7-7F87-4792-BFE9-63CD2137****

UploadJobs

array<object>

The information about multiple jobs.

object

The details of the upload task.

JobId

string

The upload task ID.

20ce1e05dba64576b96e9683879f0***

SourceURL

string

The source file URL of the upload task.

http://example****.mp4

MediaId

string

The media asset ID.

f476988629f54a7b8a4ba90d1a6c7***

Examples

Success response

JSON format

{
  "RequestId": "****83B7-7F87-4792-BFE9-63CD2137****",
  "UploadJobs": [
    {
      "JobId": "20ce1e05dba64576b96e9683879f0***",
      "SourceURL": "http://example****.mp4\n",
      "MediaId": "f476988629f54a7b8a4ba90d1a6c7***"
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.