All Products
Search
Document Center

ApsaraVideo VOD:SubmitAIJob

Last Updated:Nov 09, 2022

Submits an AI job.

Operation Description

  • AI jobs include smart tagging jobs and video fingerprinting jobs. You must activate the AI service before you call this operation to submit AI jobs.
  • If this is the first time you use the video fingerprinting feature, you must submit a ticket to apply for using the media fingerprint library for free. Otherwise, the video fingerprinting feature will be affected.
  • After you submit an AI job, ApsaraVideo VOD asynchronously processes the job. The operation may return a response before the job is complete.

QPS limits

You can call this operation up to 30 times per second per account. Requests that exceed this limit are dropped and you will experience service interruptions. We recommend that you take note of this limit when you call this operation. For more information, see QPS limits on API operations in ApsaraVideo VoD.

Authorization information

The following table is the authorization information corresponding to the API, which can be found in the RAM permission policy statement.Action Used in the element to grant the RAM user or RAM role permission to call this API. The specific instructions are as follows:

  • 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 keyword: refers to the condition keyword defined by the cloud product itself.
  • 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.
Operateaccess levelResource typeconditional keywordAssociation operation
vod:SubmitAIJobWrite
  • VOD
    acs:vod:*:{#accountId}:*
    without
without

Request parameters

ParameterTypeRequiredDescriptionExample
MediaIdstringYes

The ID of the video. You can use one of the following methods to obtain the ID:

  • Log on to the ApsaraVideo VOD console. In the left-side navigation pane, choose Media Files > Audio/Video. On the Video and Audio page, view the ID of the audio or video file. This method is applicable to files that are uploaded by using the ApsaraVideo VOD console.
  • Obtain the value of VideoId from the response to the CreateUploadVideo operation that you call to upload media files.
  • Obtain the value of VideoId from the response to the SearchMedia operation after you upload media files.
3D3D12340d9401fab46a0b847****
TypesstringNo

The type of the AI job. Separate multiple types with commas (,). Valid values:

  • AIMediaDNA: The media fingerprinting job.
  • AIVideoTag: The smart tagging job.
AIVideoTag
ConfigstringNo

The configurations of the AI job. The value is a JSON string.

{"AIVideoTag": {"AnalyseTypes": "Face,ASR"} }
UserDatastringNo

The custom settings. The value is a JSON string. For more information, see Request parameters.

{"Extend":{"localId":"***","test":"www"}}

Response parameters

ParameterTypeDescriptionExample
object

The returned data.

RequestIdstring

The ID of the request.

25818875-5F78-4A13-BEF6-D73936****
AIJobListarray

The information about the AI jobs.

object

The details of the AI job.

Typestring

The type of the AI job. Valid values:

  • AIMediaDNA: The media fingerprinting job.
  • AIVideoTag: The smart tagging job.
AIVideoTag
JobIdstring

The ID of the AI job.

9e82640c85114bf5af23edfaf****
MediaIdstring

The ID of the video.

3D3D12340d92c641401fab46a0b847****

Example

Normal return example

JSONFormat

{
  "RequestId": "25818875-5F78-4A13-BEF6-D73936****",
  "AIJobList": [
    {
      "Type": "AIVideoTag",
      "JobId": "9e82640c85114bf5af23edfaf****",
      "MediaId": "3D3D12340d92c641401fab46a0b847****"
    }
  ]
}

Error codes

For a list of error codes, visit the API error center.