SubmitAIJob

更新时间:
复制 MD 格式

Use this operation to submit a smart tag or video DNA job.

Operation description

  • Before using this operation, ensure you understand the billing methods and pricing for ApsaraVideo VOD. Both smart tag and video DNA are paid features. For more information, see Video AI Billing.

  • The video DNA feature is available in the following regions: China (Beijing), China (Shanghai), and Singapore. The smart tag feature is available in China (Beijing) and China (Shanghai).

  • This is an asynchronous call. When you submit an AI job, the system returns a job ID and queues the job for background processing. To get the final results, we recommend you configure an event notification for the VideoAIComplete event. Alternatively, you can call the Get Job Details operation to query the job status.

  • To submit an AI job, you must first activate the video DNA or smart tag feature.

  • The first time you use the video DNA feature, you must submit a ticket with your account UID and desired region to create a free DNA fingerprint library. Otherwise, the feature may not function correctly. For instructions on submitting a ticket, see Contact us.

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

vod:SubmitAIJob

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

MediaId

string

No

The ID of the video. You can find the video ID in one of the following ways:

3D3D12340d9401fab46a0b847****

Types

string

No

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

  • AIMediaDNA: video DNA.

  • AIVideoTag: smart tag.

AIVideoTag

Config

string

No

The AI job configurations, as a JSON-formatted string.

  • If you set Types to AIVideoTag, you can configure AnalyseTypes in the Config parameter to specify the analysis algorithm for the smart tag job. Valid values:
    • ASR (Automatic Speech Recognition): Extracts tags from spoken words in the video's audio.

    • OCR (Optical Character Recognition): Extracts tags from text that appears in the video frames.

  • If you set Types to AIMediaDNA, you can configure DNADBId in the Config parameter to specify the ID of the DNA fingerprint library for the video DNA job.

{"AIVideoTag": {"AnalyseTypes": "ASR"} }

UserData

string

No

Custom settings as a JSON-formatted string. For more information about the parameter structure, see UserData.

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

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

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

AIJobList

object

A list of AI jobs.

AIJob

array<object>

A list of AI jobs.

object

The details of an AI job.

Type

string

The type of the AI job. Valid values:

  • AIMediaDNA: video DNA.

  • AIVideoTag: smart tag.

AIVideoTag

JobId

string

The ID of the AI job.

9e82640c85114bf5af23edfaf****

MediaId

string

The ID of the video.

3D3D12340d92c641401fab46a0b847****

Examples

Success response

JSON format

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

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.