All Products
Search
Document Center

Intelligent Media Services:RegisterMediaInfo

Last Updated:Mar 30, 2026

Registers a media asset with Intelligent Media Services (IMS). IMS assigns an ID to the media asset. This operation asynchronously accesses the media asset service in which the media asset is stored to obtain the file information of the media asset based on the input URL. You can also specify basic information, such as the title, tags, and description, for the media asset. This operation returns the ID of the media asset. You can call the GetMediaInfo operation based on the ID to query the details of the media asset. You can set InputURL only to the URL of an Object Storage Service (OSS) file or an ApsaraVideo VOD media asset.

Operation description

Registering a media asset is an asynchronous job that takes 2 to 3 seconds. When the operation returns the ID of the media asset, the registration may have not be completed. If you call the GetMediaInfo operation at this time, you may fail to obtain the information about the media asset.

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

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

InputURL

string

Yes

The URL of the media asset in another service. The URL is associated with the ID of the media asset in IMS. The URL cannot be modified once registered. The following types of URLs are supported:

  • OSS URL in one of the following formats:

http(s)://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4

oss://example-bucket/example.mp4: In this format, it is considered by default that the region of the OSS bucket in which the media asset resides is the same as the region in which IMS is activated.

  • URL of an ApsaraVideo VOD media asset

vod://***20b48fb04483915d4f2cd8ac****

http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4 或 vod://****20b48fb04483915d4f2cd8ac****

MediaType

string

No

The type of the media asset. Valid values:

  • image

  • video

  • audio

  • text

We recommend that you specify this parameter based on your business requirements. If you set InputURL to an OSS URL, the media asset type can be automatically determined based on the file name extension. For more information .

video

BusinessType

string

No

The business type of the media asset. Valid values:

  • subtitles

  • watermark

  • opening

  • ending

  • general

opening

Title

string

No

The title. If you do not specify this parameter, a default title is automatically generated based on the date.

  • The value can be up to 128 bytes in length.

  • The value must be encoded in UTF-8.

defaultTitle

Description

string

No

The description of the media asset.

  • The value can be up to 1,024 bytes in length.

  • The value must be encoded in UTF-8.

defaultDescription

MediaTags

string

No

The tags of the media asset.

  • Up to 16 tags are supported.

  • Separate multiple tags with commas (,).

  • Each tag can be up to 32 bytes in length.

  • The value must be encoded in UTF-8.

tag1,tag2

CoverURL

string

No

The thumbnail URL of the media asset.

  • The value can be up to 128 bytes in length.

  • The value must be encoded in UTF-8.

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

UserData

string

No

The user data. You can specify a custom callback URL. For more information.

  • The value can be up to 1,024 bytes in length.

  • The value must be encoded in UTF-8.

  • The value must be in the JSON format.

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

Overwrite

boolean

No

Specifies whether to overwrite the media asset that has been registered by using the same URL. Default value: false. Valid values:

- true: If a media asset has been registered by using the same URL, the original media asset is deleted and the new media asset is registered.

- false: If a media asset has been registered by using the same URL, the new media asset is not registered. A URL cannot be used to register multiple media assets.

true

ClientToken

string

No

The client token that is used to ensure the idempotence of the request. The value must be a UUID that contains 32 characters.

****0311a423d11a5f7dee713535****

RegisterConfig

string

No

The registration configurations.

By default, a sprite is generated for the media asset. You can set NeedSprite to false to disable automatic sprite generation.

By default, a snapshot is generated for the media asset. You can set NeedSnapshot to false to disable automatic snapshot generation.

{ "NeedSprite": "false", "CoverConfig": { "StartTime": 1.0 }, "SearchLibName": "test" }

CateId

integer

No

The category ID.

3048

WorkflowId

string

No

The workflow ID.

******b4fb044839815d4f2cd8******

ReferenceId

string

No

The custom ID. The ID can be 6 to 64 characters in length and can contain only letters, digits, hyphens (-), and underscores (_). Make sure that the ID is unique among users.

123-123

SmartTagTemplateId

string

No

The ID of the smart tagging template. Valid values:

  • S00000101-300080: the system template that supports natural language processing (NLP) for content recognition.

  • S00000103-000001: the system template that supports NLP for content recognition and all tagging capabilities.

  • S00000103-000002: the system template that supports all tagging capabilities but does not support NLP for content recognition.

After you configure this parameter, a smart tag analysis task is automatically initiated after the media asset is registered. For more information about the billable items.

S00000101-300080

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

******5A-CAAC-4850-A3AF-B74606******

MediaId

string

The ID of the media asset in IMS.

******b48fb04483915d4f2cd8******

Examples

Success response

JSON format

{
  "RequestId": "******5A-CAAC-4850-A3AF-B74606******",
  "MediaId": "******b48fb04483915d4f2cd8******"
}

Error codes

HTTP status code

Error code

Error message

Description

403 Forbidden User not authorized to operate on the specified resource.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.