All Products
Search
Document Center

Intelligent Media Services:BatchGetMediaInfos

Last Updated:Apr 17, 2026

Retrieves information for multiple media assets in a single request by providing their mediaId values.

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

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

MediaIds

string

No

A comma-separated list of media asset IDs to query.

******b48fb04483915d4f2cd8******,******c48fb37407365d4f2cd8******

AdditionType

string

No

The types of additional media asset information to return. If this parameter is not specified, only basic information is returned. Valid values are:

-FileInfo

-DynamicMetaData

FileInfo,DynamicMetaData

AuthTimeout

integer

No

The authentication timeout, in seconds.

  • Minimum value: 1.

  • Maximum value: 86400.

  • Default value: 3600.

30

Response elements

Element

Type

Description

Example

object

The response schema.

RequestId

string

The request ID.

******11-DB8D-4A9A-875B-275798******

MediaInfos

array<object>

A list of media assets.

array<object>

The details of a media asset.

MediaId

string

The media ID.

******c48fb37407365d4f2cd8******

MediaBasicInfo

object

The basic information about the media asset.

MediaId

string

The media ID.

******c48fb37407365d4f2cd8******

InputURL

string

The URL of the media asset in its source system.

https://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4

MediaType

string

The media type. Valid values:

  • Image

  • Video

  • Audio

  • Text

video

BusinessType

string

The business type of the media asset.

general

Source

string

The source. Valid values:

  • OSS

  • VOD

oss

Title

string

The title.

title

Description

string

The description.

description

Category

string

The category.

category1

MediaTags

string

The tags.

tag1, tag2

CoverURL

string

The cover URL.

http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.png?Expires=&OSSAccessKeyId=&Signature=&security-token=

UserData

string

The user data.

userDataTest

Snapshots

string

The snapshots.

[ "http://example-bucket.oss-cn-shanghai.aliyuncs.com/snapshot-00001.png?Expires=&OSSAccessKeyId=&Signature=&security-token=", "http://example-bucket.oss-cn-shanghai.aliyuncs.com/snapshot-00002.jpg?Expires=&OSSAccessKeyId=&Signature=&security-token=", "http://example-bucket.oss-cn-shanghai.aliyuncs.com/snapshot-00003.jpg?Expires=&OSSAccessKeyId=&Signature=&security-token=" ]

Status

string

The status of the media asset.

Normal

TranscodeStatus

string

The transcoding status.

Init

CreateTime

string

The time the media asset was created.

2020-12-26T04:11:10Z

ModifiedTime

string

The time the media asset was last modified.

2020-12-26T04:11:12Z

DeletedTime

string

The time the media asset was deleted.

2020-12-26T04:11:10Z

SpriteImages

string

The sprite images.

[{"bucket":"example-bucket","count":"32","iceJobId":"******83ec44d58b2069def2e******","location":"oss-cn-shanghai","snapshotRegular":"example/example-{Count}.jpg","spriteRegular":"example/example-{TileCount}.jpg","templateId":"******e438b14ff39293eaec25******","tileCount":"1"}]

Biz

string

The business associated with the media asset.

ICE

FileInfoList

array<object>

A list of basic file information.

array<object>

The basic information about the file.

FileBasicInfo

object

The basic information about the file, such as the duration and file size.

FileName

string

The file name.

example

FileStatus

string

The file status.

Normal

FileType

string

The file type.

source_file

FileSize

string

The file size, in bytes.

30611502

FileUrl

string

The OSS URL of the file.

http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4?Expires=&OSSAccessKeyId=&Signature=&security-token=

Region

string

The region where the file is stored.

cn-shanghai

FormatName

string

The container format.

mov,mp4,m4a,3gp,3g2,mj2

Duration

string

The duration.

200

Bitrate

string

The bitrate.

1132.68

Width

string

The width.

1920

Height

string

The height.

1080

AudioStreamInfoList

array<object>

The audio streams.

object

The details of an audio stream.

Index

string

The index of the stream.

CodecName

string

The short name of the codec.

CodecLongName

string

The full name of the codec.

CodecTimeBase

string

The time base of the codec.

CodecTagString

string

The codec tag string.

CodecTag

string

The codec tag.

Profile

string

The profile.

SampleFmt

string

The sample format.

SampleRate

string

The sample rate.

Channels

string

The number of audio channels.

ChannelLayout

string

The channel layout.

Timebase

string

The time base.

StartTime

string

The start time.

Duration

string

The duration.

Bitrate

string

The bitrate.

Fps

string

The frame rate.

NumFrames

string

The total number of frames.

Lang

string

The language.

VideoStreamInfoList

array<object>

The video streams.

object

The details of a video stream.

Index

string

The index of the stream.

CodecName

string

The short name of the codec.

CodecLongName

string

The full name of the codec.

Profile

string

The profile.

CodecTimeBase

string

The time base of the codec.

CodecTagString

string

The codec tag string.

CodecTag

string

The codec tag.

Width

string

The width of the video.

Height

string

The height of the video.

HasBFrames

string

Indicates whether B-frames exist.

Sar

string

The sample aspect ratio (SAR).

Dar

string

The display aspect ratio (DAR).

PixFmt

string

The pixel format.

Level

string

The level.

Fps

string

The frame rate.

AvgFPS

string

The average frame rate.

Timebase

string

The time base.

StartTime

string

The start time.

Duration

string

The duration.

Bitrate

string

The bitrate.

NumFrames

string

The total number of frames.

Lang

string

The language.

Rotate

string

The rotation angle.

Nb_frames

string

This parameter is an alias for NumFrames.

SubtitleStreamInfoList

array<object>

The subtitle streams.

object

The details of a subtitle stream.

Index

string

The index of the stream.

CodecName

string

The short name of the codec.

CodecLongName

string

The full name of the codec.

CodecTimeBase

string

The time base of the codec.

CodecTagString

string

The codec tag string.

CodecTag

string

The codec tag.

Timebase

string

The time base.

StartTime

string

The start time.

Duration

string

The duration.

Lang

string

The language.

MediaDynamicInfo

object

The dynamic information about the media asset.

DynamicMetaData

object

The type of dynamic metadata. Valid values:

  • "ai": Standardized data derived from raw AI results.

  • "user-defined": The user-defined metadata.

  • "system": The system-generated data.

Data

string

The content of the dynamic metadata.

system

IgnoredList

array

A list of media IDs for which information could not be retrieved.

string

The ID of a media asset for which information could not be retrieved.

****20b48fb04483915d4f2cd8ac****

Examples

Success response

JSON format

{
  "RequestId": "******11-DB8D-4A9A-875B-275798******",
  "MediaInfos": [
    {
      "MediaId": "******c48fb37407365d4f2cd8******",
      "MediaBasicInfo": {
        "MediaId": "******c48fb37407365d4f2cd8******",
        "InputURL": "https://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4",
        "MediaType": "video",
        "BusinessType": "general",
        "Source": "oss",
        "Title": "title",
        "Description": "description",
        "Category": "category1",
        "MediaTags": "tag1, tag2",
        "CoverURL": "http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.png?Expires=&OSSAccessKeyId=&Signature=&security-token=",
        "UserData": "userDataTest",
        "Snapshots": "[\n    \"http://example-bucket.oss-cn-shanghai.aliyuncs.com/snapshot-00001.png?Expires=&OSSAccessKeyId=&Signature=&security-token=\",\n    \"http://example-bucket.oss-cn-shanghai.aliyuncs.com/snapshot-00002.jpg?Expires=&OSSAccessKeyId=&Signature=&security-token=\",\n    \"http://example-bucket.oss-cn-shanghai.aliyuncs.com/snapshot-00003.jpg?Expires=&OSSAccessKeyId=&Signature=&security-token=\"\n]",
        "Status": "Normal",
        "TranscodeStatus": "Init",
        "CreateTime": "2020-12-26T04:11:10Z",
        "ModifiedTime": "2020-12-26T04:11:12Z",
        "DeletedTime": "2020-12-26T04:11:10Z",
        "SpriteImages": "[{\"bucket\":\"example-bucket\",\"count\":\"32\",\"iceJobId\":\"******83ec44d58b2069def2e******\",\"location\":\"oss-cn-shanghai\",\"snapshotRegular\":\"example/example-{Count}.jpg\",\"spriteRegular\":\"example/example-{TileCount}.jpg\",\"templateId\":\"******e438b14ff39293eaec25******\",\"tileCount\":\"1\"}]",
        "Biz": "ICE"
      },
      "FileInfoList": [
        {
          "FileBasicInfo": {
            "FileName": "example",
            "FileStatus": "Normal",
            "FileType": "source_file",
            "FileSize": "30611502",
            "FileUrl": "http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4?Expires=&OSSAccessKeyId=&Signature=&security-token=",
            "Region": "cn-shanghai",
            "FormatName": "mov,mp4,m4a,3gp,3g2,mj2",
            "Duration": "200",
            "Bitrate": "1132.68",
            "Width": "1920",
            "Height": "1080"
          },
          "AudioStreamInfoList": [
            {
              "Index": "",
              "CodecName": "",
              "CodecLongName": "",
              "CodecTimeBase": "",
              "CodecTagString": "",
              "CodecTag": "",
              "Profile": "",
              "SampleFmt": "",
              "SampleRate": "",
              "Channels": "",
              "ChannelLayout": "",
              "Timebase": "",
              "StartTime": "",
              "Duration": "",
              "Bitrate": "",
              "Fps": "",
              "NumFrames": "",
              "Lang": ""
            }
          ],
          "VideoStreamInfoList": [
            {
              "Index": "",
              "CodecName": "",
              "CodecLongName": "",
              "Profile": "",
              "CodecTimeBase": "",
              "CodecTagString": "",
              "CodecTag": "",
              "Width": "",
              "Height": "",
              "HasBFrames": "",
              "Sar": "",
              "Dar": "",
              "PixFmt": "",
              "Level": "",
              "Fps": "",
              "AvgFPS": "",
              "Timebase": "",
              "StartTime": "",
              "Duration": "",
              "Bitrate": "",
              "NumFrames": "",
              "Lang": "",
              "Rotate": "",
              "Nb_frames": ""
            }
          ],
          "SubtitleStreamInfoList": [
            {
              "Index": "",
              "CodecName": "",
              "CodecLongName": "",
              "CodecTimeBase": "",
              "CodecTagString": "",
              "CodecTag": "",
              "Timebase": "",
              "StartTime": "",
              "Duration": "",
              "Lang": ""
            }
          ]
        }
      ],
      "MediaDynamicInfo": {
        "DynamicMetaData": {
          "Data": "system"
        }
      }
    }
  ],
  "IgnoredList": [
    "****20b48fb04483915d4f2cd8ac****"
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.