All Products
Search
Document Center

Intelligent Media Services:RegisterMediaInfo

Last Updated:Oct 14, 2026

Initiates a media asset registration task and assigns a new IMS mediaId to the media asset. Based on the InputURL, the operation asynchronously calls other media asset information services to retrieve file information about the media asset. You can also set basic information such as the title, tags, and description. The operation synchronously returns a mediaId. You can call the GetMediaInfo operation to retrieve detailed media asset information. Currently, only OSS files and VOD media assets are supported as InputURL values.

Operation description

Media asset registration is an asynchronous task that typically takes 2 to 3 seconds to complete. When the registration operation returns a mediaId, the media asset may not have been fully registered. In this case, calling GetMediaInfo may not return the file information of 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 to be registered in the corresponding system. Once registered, this URL cannot be changed and is attached to the IMS mediaId.

  • OSS URL. Two formats are supported:

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

oss://example-bucket/example.mp4 (This format assumes by default that the OSS region is the same as the service registration area.)

  • VOD media asset:

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

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

MediaType

string

No

The media type of the media asset. Valid values:

  • image

  • video

  • audio

  • text

When the value is "text", the businessType must be set to "subtitles" or "font".

Specify this field as needed. When the InputURL field is an OSS URL, the media type can also be automatically determined based on the file name extension (only for image, video, and audio file extensions). For the mapping between file extensions and media types, see File formats.

video

BusinessType

string

No

The business type of the media asset. Valid values:

  • subtitles

  • font

  • watermark

  • opening

  • ending

  • general

opening

Title

string

No

The title. If not provided, a default title is automatically generated based on the date.

  • Maximum length: 128 bytes.

  • UTF-8 encoded.

defaultTitle

Description

string

No

The content description.

  • Maximum length: 1024 bytes.

  • UTF-8 encoded.

defaultDescription

MediaTags

string

No

The tags.

  • Maximum number of tags: 16.

  • Separate multiple tags with commas.

  • Maximum length of a single tag: 32 bytes.

  • UTF-8 encoded.

tag1,tag2

CoverURL

string

No

The cover image URL.

  • Maximum length: 128 bytes.

  • UTF-8 encoded.

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

UserData

string

No

The user data. Custom callback URL configuration is supported. For configuration instructions, see Configure a callback upon editing completion.

  • Maximum length: 1024 bytes.

  • UTF-8 encoded.

  • Json format.

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

Overwrite

boolean

No

Specifies whether to overwrite an existing registered media asset. Default value: false.

  • true: If the inputUrl is already registered, the existing media asset is deleted and a new media asset is registered.

  • false: If the inputUrl is already registered, the new media asset is not registered. Duplicate inputUrl values are not supported.

true

ClientToken

string

No

The client token. A 32-character UUID that ensures the idempotence of the request.

****0311a423d11a5f7dee713535****

RegisterConfig

string

No

The registration configuration.

By default, a sprite image is generated for the media asset. To disable this, set the NeedSprite field to false.

By default, a snapshot is generated. To disable this, set the NeedSnapshot field to false.

To specify the time for the cover image, configure CoverConfig, which contains the following field:

  • StartTime: The time in seconds at which the cover image is captured from the media asset. Up to four decimal places are supported.

After media asset registration, to import the media asset into a custom search library, configure SearchLibName. For information about how to create and use a custom search library, see Use a custom search library.

{ "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. Only lowercase letters, uppercase letters, digits, hyphens (-), and underscores (_) are supported. The length must be 6 to 64 characters. The ID must be unique for each user.

123-123

SmartTagTemplateId

string

No

The intelligent tagging template. Valid values:

  • S00000101-300080: A system template that includes NLP content understanding.

  • S00000103-000001: A system template that includes NLP content understanding and all tagging capabilities.

  • S00000103-000002: A system template that includes all tagging capabilities but does not include NLP content understanding.

For more information about tagging capabilities, see the documentation.

After this field is configured, an intelligent tagging analysis task is automatically initiated upon media asset registration. For billing information, see Billing of Smart Tag Standard Edition.

S00000101-300080

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

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

MediaId

string

The IMS media asset ID.

******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.