All Products
Search
Document Center

Intelligent Media Services:SearchMediaByAILabel

Last Updated:Dec 16, 2024

Queries media assets based on character names, subtitles, or AI categories.

Operation description

You can call this operation to query media assets or media asset clips based on character names, subtitles, or AI categories.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ice:SearchMediaByAILabelget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
SearchLibNamestringNo

The name of the search library.

test-1
MediaTypestringNo

The type of the media assets. Valid values:

  • image
  • video
  • audio
video
SortBystringNo

The sorting method of the results. Valid values:

  • CreationTime:Desc (default): sorts results in reverse chronological order.
  • CreationTime:Asc: sorts results in chronological order.
CreationTime:Desc
PageNointegerNo

The page number. Default value: 1.

1
PageSizeintegerNo

The number of entries per page. Default value: 10. Maximum value: 50.

20
TextstringNo

The content that you want to query.

MultimodalSearchTypestringNo

The type of query. Valid values:

  • PersonName: queries media assets based on character names.
  • Ocr: queries media assets based on subtitles.
  • AiCategory: queries media assets based on AI categories.
  • FullSearch (default): queries all media assets.
Ocr
SpecificSearchbooleanNo

Specifies whether to query media asset clips. Valid values:

  • true
  • false
true
MediaIdstringNo

The ID of the media asset. This parameter is required if you want to query media asset clips.

****c469e944b5a856828dc2****

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The ID of the request.

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

Indicates whether the request was successful.

true
Codestring

The status code returned.

200
MediaListarray<object>

The media assets that contain the specified content.

MediaListobject

The information about the media asset.

AiDataobject

The details of the AI job.

AiLabelInfoarray<object>

The tags of the AI job.

AiLabelInfoobject

The information about the AI tag.

FaceIdstring

The ID of the face.

5FE19530C7A422197535FE74F5DB****
LabelTypestring

The type of the tag.

Sourcestring

The source.

vision
Categorystring

The category.

LabelNamestring

The name of the entity.

LabelIdstring

The ID of the entity.

103102503**
Occurrencesarray<object>

The information about the clips.

Occurrencesobject

The information about the clip.

Scoredouble

The score.

0.75287705
Imagestring

The image that contains the most face information.

https://service-****-public.oss-cn-hangzhou.aliyuncs.com/1563457****438522/service-image/f788974f-9595-43b2-a478-7c7a1afb****.jpg
TableBatchSeqIdstring

The sequence ID of the vector table.

85010D1**
ClipIdstring

The ID of the clip.

158730355E4B82257D8AA1583A58****
Fromdouble

The start time of the clip.

1.4
Todouble

The end time of the clip.

2.5
FinegrainNamestring

The fine-grained name of the entity.

FinegrainIdstring

The fine-grained ID of the entity.

103102503**
Contentstring

The content of the text.

Tracksarray<object>

The tracks.

Tracksobject

The track.

Sizedouble

The size of the bounding box.

50
Positionstring

The coordinates of the bounding box.

468.0;67.0;615.0;267.0
Timestampdouble

The timestamp of the track.

1.4
AsrInfoarray<object>

The information about audio files.

AsrInfoobject

The information about the audio file.

Fromdouble

The start time of the clip.

1.4
Todouble

The end time of the clip.

2.5
ClipIdstring

The ID of the clip.

5FE19530C7A422197535FE74F5DB****
Contentstring

The content of the audio.

Timestampdouble

The timestamp of the clip.

1.4
OcrInfoarray<object>

The information about subtitle files.

OcrInfoobject

The information about the subtitle file.

Fromdouble

The start time of the clip.

1.4
Todouble

The end time of the clip.

2.5
ClipIdstring

The ID of the clip.

5FE19530C7A422197535FE74F5DB****
Contentstring

The content of the text.

Timestampdouble

The timestamp of the clip.

1.4
StorageLocationstring

The storage address.

out-****.oss-cn-shanghai.aliyuncs.com
Statusstring

The status of the video.

Valid values:

  • PrepareFail
  • UploadFail
  • Init
  • UploadSucc
  • Transcoding
  • TranscodeFail
  • Deleted
  • Normal
  • Uploading
  • Preparing
  • Blocked
  • Checking
Normal
CreationTimestring

The time when the media asset was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2017-11-14T09:15:50Z
ModificationTimestring

The time when the media asset was updated. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2017-11-14T09:15:50Z
MediaIdstring

The ID of the media asset.

1c6ce34007d571ed94667630a6bc****
Tagsstring

The tags of the media asset.

Descriptionstring

The description of the media asset.

AppIdstring

The ID of the application. Default value: app-1000000.

app-1000000
Sizelong

The size of the source file. Unit: bytes.

10897890
CoverUrlstring

The URL of the thumbnail.

http://example.aliyundoc.com/snapshot/****.jpg?auth_key=1498476426-0-0-f00b9455c49a423ce69cf4e27333****
Durationfloat

The duration. Unit: seconds.

12.2
Titlestring

The title of the media asset.

Snapshotsarray

The array of video snapshot URLs.

Snapshotsstring

The URL of the video snapshot.

http://example.aliyundoc.com/snapshot/****.jpg?auth_key=1498476426-0-0-f00b9455c49a423ce69cf4e27333****
Totallong

The total number of audio and video files that meet the conditions.

30

Examples

Sample success responses

JSONformat

{
  "RequestId": "******11-DB8D-4A9A-875B-275798******",
  "Success": "true",
  "Code": "200",
  "MediaList": [
    {
      "AiData": {
        "AiLabelInfo": [
          {
            "FaceId": "5FE19530C7A422197535FE74F5DB****\n",
            "LabelType": "",
            "Source": "vision",
            "Category": "",
            "LabelName": "",
            "LabelId": "103102503**",
            "Occurrences": [
              {
                "Score": 0.75287705,
                "Image": "https://service-****-public.oss-cn-hangzhou.aliyuncs.com/1563457****438522/service-image/f788974f-9595-43b2-a478-7c7a1afb****.jpg",
                "TableBatchSeqId": "85010D1**",
                "ClipId": "158730355E4B82257D8AA1583A58****",
                "From": 1.4,
                "To": 2.5,
                "FinegrainName": "",
                "FinegrainId": "103102503**",
                "Content": "",
                "Tracks": [
                  {
                    "Size": 50,
                    "Position": "468.0;67.0;615.0;267.0",
                    "Timestamp": 1.4
                  }
                ]
              }
            ]
          }
        ],
        "AsrInfo": [
          {
            "From": 1.4,
            "To": 2.5,
            "ClipId": "5FE19530C7A422197535FE74F5DB****",
            "Content": "",
            "Timestamp": 1.4
          }
        ],
        "OcrInfo": [
          {
            "From": 1.4,
            "To": 2.5,
            "ClipId": "5FE19530C7A422197535FE74F5DB****\n",
            "Content": "",
            "Timestamp": 1.4
          }
        ]
      },
      "StorageLocation": "out-****.oss-cn-shanghai.aliyuncs.com\n",
      "Status": "Normal",
      "CreationTime": "2017-11-14T09:15:50Z\n",
      "ModificationTime": "2017-11-14T09:15:50Z\n",
      "MediaId": "1c6ce34007d571ed94667630a6bc****\n",
      "Tags": "",
      "Description": "",
      "AppId": "app-1000000",
      "Size": 10897890,
      "CoverUrl": "http://example.aliyundoc.com/snapshot/****.jpg?auth_key=1498476426-0-0-f00b9455c49a423ce69cf4e27333****",
      "Duration": 12.2,
      "Title": "",
      "Snapshots": [
        "http://example.aliyundoc.com/snapshot/****.jpg?auth_key=1498476426-0-0-f00b9455c49a423ce69cf4e27333****"
      ]
    }
  ],
  "Total": 30
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-10-12The request parameters of the API has changedView Change Details