All Products
Search
Document Center

Intelligent Media Services:CreateUploadMedia

Last Updated:Aug 06, 2026

Retrieves the upload URL and credential for audio, video, image, and auxiliary media assets, and creates media asset information.

Operation description

Operation description

  • Retrieving the upload URL and credential is a core foundation of Intelligent Media Services and a required procedure for every upload operation.

  • If the video upload credential expires (the default validity epoch is 3000 seconds), invoke the refresh video upload credential operation to obtain a new upload credential.

  • After the upload, you can configure callbacks to accept upload event notifications, or invoke the GetMediaInfo operation to check the returned media asset status to determine whether the upload is successful.

  • The MediaId parameter returned by this operation can be used for media asset lifecycle management or media processing.

Limits

  • This operation supports uploads only to VOD storage. Uploads to user-owned OSS storage are not supported. If you use your own OSS storage, upload files to OSS by using the OSS SDK, and then invoke the RegisterMediaInfo operation to register the OSS file in the media library.

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

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

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

AppId

string

No

The application ID. Default value: app-1000000.

app-1000000

EntityId

string

No

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

9e177cac2fb44f8b8c67b199fcc7bffd

FileInfo

string

No

The file information in JSON format. This parameter contains the following fields:

  • Type (required): the file type. Valid values: video, image, audio, text, and other.

  • Name (required): the file name without the file name extension.

  • Size (optional): the file size.

  • Ext (required): the file name extension.

{\"Type\":\"video\",\"Name\":\"test\",\"Size\":108078336,\"Ext\":\"mp4\"}

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":"*****","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 asset to upload, in JSON format.

Title (required):

  • The maximum length is 128 characters.

  • UTF-8 encoded.

Description (optional):

  • The maximum length is 1024 characters.

  • UTF-8 encoded.

CateId (optional): the category ID.

Tags (optional): the tags.

BusinessType (required): the business type. Valid values:

  • When Type = video: opening: opening credits. ending: ending credits.

  • When Type = image: default: default. cover: cover image.

  • When Type = text: subtitles: subtitles. font: font.

  • When Type = material: watermark: watermark.

  • general: general-purpose.

CoverURL (optional): the cover URL.

DynamicMetaData: the dynamic metadata. The value is a string.

{\"Title\": \"UploadTest\", \"Description\": \"UploadImageTest\", \"Tags\": \"tag1,tag2\",\"BusinessType\":\"cover\"}

PostProcessConfig

string

No

Specifies the post-upload processing action when Type = video or audio.

ProcessType: set to Workflow.

Note
  • This parameter triggers an asynchronous task. After submission, the task is not immediately completed and enters a background queue for asynchronous execution.

{\"ProcessType\":\"Workflow\",\"ProcessID\":\"74ba870f1a4873a3ba238e0bf6fa9***\"}

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

4E84BE44-58A7-****-****-FBEBEA16EF94

MediaId

string

The media asset ID.

****20b48fb04483915d4f2cd8ac****

MediaURL

string

The media asset URL.

Note

If a CDN domain name is configured, a CDN URL is returned. Otherwise, an OSS URL is returned. If the returned MediaURL is inaccessible (403) in a browser, URL signing is enabled for the VOD domain name. Disable URL signing or generate a signing signature.

https://xxq-live-playback.oss-cn-shanghai.aliyuncs.com/capture/5d96d2b4-111b-4e5d-a0e5-20f44405bb55.mp4

FileURL

string

The OSS URL of the file (without authentication).

http://outin-***.oss-cn-north-2-gov-1.aliyuncs.com/sv/40360f05-181f63c3110-0004-cd8e-27f-de3c9.mp4

UploadAddress

string

The upload address.

Note

The upload address returned by the operation is a Base64-encoded value. When you call an SDK or API to upload media assets, decode the value by using Base64 before use. Only uploads through the native OSS SDK or OSS API require you to parse UploadAddress.

eyJTZWN1cml0a2VuIjoiQ0FJU3p3TjF****

UploadAuth

string

The upload credential.

Note

The upload credential returned by the operation is a Base64-encoded value. When you call an SDK or API to upload media assets, decode the value by using Base64 before use. Only uploads through the native OSS SDK or OSS API require you to parse UploadAuth.

eyJFbmRwb2ludCI6Imm****

Examples

Success response

JSON format

{
  "RequestId": "4E84BE44-58A7-****-****-FBEBEA16EF94",
  "MediaId": "****20b48fb04483915d4f2cd8ac****",
  "MediaURL": "https://xxq-live-playback.oss-cn-shanghai.aliyuncs.com/capture/5d96d2b4-111b-4e5d-a0e5-20f44405bb55.mp4",
  "FileURL": "http://outin-***.oss-cn-north-2-gov-1.aliyuncs.com/sv/40360f05-181f63c3110-0004-cd8e-27f-de3c9.mp4",
  "UploadAddress": "eyJTZWN1cml0a2VuIjoiQ0FJU3p3TjF****",
  "UploadAuth": "eyJFbmRwb2ludCI6Imm****"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.