All Products
Search
Document Center

Intelligent Media Services:RegisterMediaInfo

Last Updated:Jul 28, 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

No authorization for this operation. If you encounter issues with this operation, contact technical support.

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.