SubmitAIAgentVideoAuditTask

Updated at:

Submits a video moderation task that uses an AI agent to review video content. This operation supports Object Storage Service (OSS) input, allows you to customize video frame capture policies and moderation rules, and returns moderation results through asynchronous callbacks.

Operation description

You can call the SubmitAIAgentVideoAuditTask operation to submit a moderation task with configurations such as the video URL, frame capture policy, and moderation interval. The system returns a unique JobId for task tracking. After the task is completed, the system pushes the moderation results, including the moderation status and AI evaluation content, to your configured callback URL. Only OSS video URLs are supported. Multimodal large language models (MLLMs) support only the non-streaming OpenAI protocol. For more information about the response of the non-streaming OpenAI protocol, refer to Standard API reference for self-developed models.

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

none

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

AIAgentId

string

Yes

The ID of the AI agent.

*******3b3d94abda22******

Input

object

Yes

The input file.

Type

string

No

The input type. Valid values:

  • OSS: the URL of an OSS file.

OSS

Media

string

No

The information about the input file. OSS URLs are supported. The URL format is as follows:

http(s)://{BucketName}.{Endpoint}/{ObjectName}

Only OSS buckets in the same region as the service are supported. For example, the API service in the China (Shanghai) region supports only OSS buckets in the China (Shanghai) region.

http://my-bucket.oss-cn-shanghai.aliyuncs.com/object-id.mp4

UserData

string

No

The custom user data.

{"Custom":"hello"}

CallbackConfig

object

No

The callback configuration.

{"Url":"https://yourcallback","Token":"yourtoken"}

Url

string

No

The URL where you want to receive callback notifications.

https://yourcallback

Token

string

No

The authentication token for the callback.

Bearer Token

AuditInterval

integer

No

The moderation interval, in milliseconds. Valid values: 0 to 5000. Default value: 3000. If you set this parameter to 0, all captured frame data specified in CapturePolicies is sent to the large model in the corresponding agent at a time. If you set this parameter to a non-zero value, such as 3000, all captured frame data is sent to the large model in sequence at an interval of 3,000 milliseconds.

3000

CapturePolicies

array<object>

Yes

The array of moderation policies. Each policy generates a model result.

object

No

A single moderation policy.

FrameCount

integer

No

The number of frames to capture.

2

StartTime

integer

No

The time when frame capture is triggered, in seconds.

0

Duration

integer

No

The duration of a single frame capture, in seconds.

10

Prompt

string

No

The text parameter used when you call the multimodal large model.

Please analyze the scene in the video

Response elements

Element

Type

Description

Example

object

Schema of Response

JobId

string

The job ID.

**********fb04483915d4f2**********

RequestId

string

The ID of the request.

**********-586A-AC29-742247******

Callback message format.

Metric description

ParameterTypeDescriptionExample
JobIdStringThe node ID.bb940f584ccbef*
StatusStringThe node status.Success/Fail
ResultsArrayThe array of processing results.-
>JSON ObjectThe moderation result structure.-
>> ContentStringThe result returned by the MLLM.These images passed the moderation!
UserDataStringThe custom user data.{"businessId": "xxx"}
MessageStringThe message."Success"

Response example

{
    "JobId": "*******bb940f584ccbef********",
    "Status": "Success",
    "Results": [
        {
            "Content": "These images passed the moderation!"
        }
    ],
    "UserData": "{\"businessId\": \"xxx\"}",
    "Message": "Success"
}

Examples

Success response

JSON format

{
  "JobId": "**********fb04483915d4f2**********",
  "RequestId": "**********-586A-AC29-742247******"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.