SearchMediaByAILabel

更新时间:
复制 MD 格式

You can perform multimodal search based on person names, captions, and AI categorization.

Operation description

You can perform multimodal search based on person names, captions, and AI categorization. Coarse search supports returning results at the media asset granularity, while fine search supports returning hit segment information within media assets.

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

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

SearchLibName

string

No

The name of the search library.

test-1

MediaType

string

No

The type of the media assets. Valid values:

  • image

  • video

  • audio

Valid values:

  • image :

    image

  • video :

    video

  • audio :

    audio

video

SortBy

string

No

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

PageNo

integer

No

The page number. Default value: 1.

1

PageSize

integer

No

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

20

Text

string

No

The content that you want to query.

Kite

MultimodalSearchType

string

No

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.

Valid values:

  • PersonName :

    PersonName

  • AiCategory :

    AiCategory

  • FullSearch :

    FullSearch

  • Ocr :

    Ocr

Ocr

SpecificSearch

boolean

No

Specifies whether to query media asset clips. Valid values:

  • true

  • false

true

MediaId

string

No

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

****c469e944b5a856828dc2****

MatchingMode

string

No

Matching pattern. The default value is fuzzy for Fuzzy Matching. Valid values:

  • fuzzy: Fuzzy Matching

  • precise: Precise matching. This pattern applies only to newly added media assets.

Valid values:

  • precise :

    precise

  • fuzzy :

    fuzzy

fuzzy

Namespace

string

No

Namespace.

name-1

CustomFilters

string

No

Custom filters. A JSON string. The following backing fields are supported: intField1 (integer type), strField1 and strField2 (string type). For the same field, only one matching method can be specified. Filters on different fields are combined with a logical AND relationship.

  • Exact match, for example: {"intField1":12,"strField1":"abc"}

  • Multi-value match, for example: {"intField1":[12,13],"strField1":["abc","cd"]}

  • Range match, for example: {"intField1":{"gte":12,"lte":13}}

{"intField1":{"gte":12,"lte":13},"strField2":["cd","de"],"strField1":"abc"}

UtcCreate

string

No

Creation time, in milliseconds UNIX timestamp. Use gte for greater than or equal to, and lte for less than or equal to.

  • Example range: {"gte":1761205662998,"lte":1771205662998}

{"gte":1761205662998,"lte":1771205662998}

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The ID of the request.

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

Success

string

Indicates whether the request was successful.

true

Code

string

The status code returned.

200

MediaList

array<object>

The media assets that contain the specified content.

array<object>

The information about the media asset.

AiData

object

The details of the AI job.

AiLabelInfo

array<object>

The tags of the AI job.

array<object>

The information about the AI tag.

FaceId

string

The ID of the face.

5FE19530C7A422197535FE74F5DB****

LabelType

string

The type of the tag.

Object

Source

string

The source.

vision

Category

string

The category.

Transportation

LabelName

string

The name of the entity.

Car

LabelId

string

The ID of the entity.

103102503**

Occurrences

array<object>

The information about the clips.

array<object>

The information about the clip.

Score

number

The score.

0.75287705

Image

string

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

TableBatchSeqId

string

The sequence ID of the vector table.

85010D1**

ClipId

string

The ID of the clip.

158730355E4B82257D8AA1583A58****

From

number

The start time of the clip.

1.4

To

number

The end time of the clip.

2.5

FinegrainName

string

The fine-grained name of the entity.

Car

FinegrainId

string

The fine-grained ID of the entity.

103102503**

Content

string

The content of the text.

Smart Label Test

Tracks

array<object>

The tracks.

object

The track.

Size

number

The size of the bounding box.

50

Position

string

The coordinates of the bounding box.

468.0;67.0;615.0;267.0

Timestamp

number

The timestamp of the track.

1.4

AsrInfo

array<object>

The information about audio files.

object

The information about the audio file.

From

number

The start time of the clip.

1.4

To

number

The end time of the clip.

2.5

ClipId

string

The ID of the clip.

5FE19530C7A422197535FE74F5DB****

Content

string

The content of the audio.

AI labelTest

Timestamp

number

The timestamp of the clip.

1.4

OcrInfo

array<object>

The information about subtitle files.

object

The information about the subtitle file.

From

number

The start time of the clip.

1.4

To

number

The end time of the clip.

2.5

ClipId

string

The ID of the clip.

5FE19530C7A422197535FE74F5DB****

Content

string

The content of the text.

Pipi

Timestamp

number

The timestamp of the clip.

1.4

StorageLocation

string

The storage address.

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

Status

string

The status of the video.

Valid values:

  • PrepareFail

  • UploadFail

  • Init

  • UploadSucc

  • Transcoding

  • TranscodeFail

  • Deleted

  • Normal

  • Uploading

  • Preparing

  • Blocked

  • Checking

Valid values:

  • PrepareFail :

    PrepareFail

  • UploadFail :

    UploadFail

  • Init :

    Init

  • UploadSucc :

    UploadSucc

  • Transcoding :

    Transcoding

  • TranscodeFail :

    TranscodeFail

  • Deleted :

    Deleted

  • Normal :

    Normal

  • Uploading :

    Uploading

  • Preparing :

    Preparing

  • Blocked :

    Blocked

  • Checking :

    Checking

Normal

CreationTime

string

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

ModificationTime

string

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

MediaId

string

The ID of the media asset.

1c6ce34007d571ed94667630a6bc****

Tags

string

The tags of the media asset.

Tag1, Tag2

Description

string

The description of the media asset.

Alibaba CloudVODVideoDescription

AppId

string

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

app-1000000

Size

integer

The size of the source file. Unit: bytes.

10897890

CoverUrl

string

The URL of the thumbnail.

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

Duration

number

The duration. Unit: seconds.

12.2

Title

string

The title of the media asset.

The best music player ever

Snapshots

array

The array of video snapshot URLs.

string

The URL of the video snapshot.

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

Total

integer

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

30

Examples

Success response

JSON format

{
  "RequestId": "******11-DB8D-4A9A-875B-275798******",
  "Success": "true",
  "Code": "200",
  "MediaList": [
    {
      "AiData": {
        "AiLabelInfo": [
          {
            "FaceId": "5FE19530C7A422197535FE74F5DB****\n",
            "LabelType": "Object",
            "Source": "vision",
            "Category": "Transportation",
            "LabelName": "Car",
            "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": "Car",
                "FinegrainId": "103102503**",
                "Content": "AI labelTest\n",
                "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": "AI labelTest",
            "Timestamp": 1.4
          }
        ],
        "OcrInfo": [
          {
            "From": 1.4,
            "To": 2.5,
            "ClipId": "5FE19530C7A422197535FE74F5DB****\n",
            "Content": "Pipi",
            "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": "Tag1, Tag2\n",
      "Description": "Alibaba CloudVODVideoDescription\n",
      "AppId": "app-1000000",
      "Size": 10897890,
      "CoverUrl": "http://example.aliyundoc.com/snapshot/****.jpg?auth_key=1498476426-0-0-f00b9455c49a423ce69cf4e27333****",
      "Duration": 12.2,
      "Title": "The best music player ever\n",
      "Snapshots": [
        "http://example.aliyundoc.com/snapshot/****.jpg?auth_key=1498476426-0-0-f00b9455c49a423ce69cf4e27333****"
      ]
    }
  ],
  "Total": 30
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.