All Products
Search
Document Center

ApsaraVideo VOD:SubmitAIJob

Last Updated:Jul 19, 2024

Submits a smart tagging or video fingerprinting job.

Operation description

  • Make sure that you understand the billing method and price of ApsaraVideo VOD before you call this operation. You are charged for using the smart tagging and video fingerprinting features. For more information, see Billing of video AI.
  • Regions that support the video fingerprinting feature: China (Beijing), China (Shanghai), and Singapore. Regions that support the smart tagging feature: China (Beijing) and China (Shanghai).
  • You need to enable the video fingerprinting feature or the smart tagging feature before you can call this operation to submit jobs. For more information, see Overview .
  • 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. For more information about how to submit a ticket, see Contact us.
  • After you submit an AI job, ApsaraVideo VOD asynchronously processes the job. The operation may return a response before the job is complete. You can configure the Event Notification feature and set the callback event to AI Processing Completed. After you receive the event notification, you can query the execution result of the AI job.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

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.

  • If you set Types to AIVideoTag, you can specify AnalyseTypes for Config to set the analysis algorithm of a smart tagging job. Valid values:

    • ASR: automatic speech recognition (ASR)
    • OCR: image optical character recognition (OCR)
  • If you set Types to AIMediaDNA, you can specify DNADBId for Config to set the ID of the media fingerprint library for video fingerprinting jobs.

{"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<object>

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****

Examples

Sample success responses

JSONformat

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

Error codes

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