SubmitAIAgentVideoAuditTask

更新时间:
复制 MD 格式

Submits a video to a specified AI agent for content moderation. This operation supports video input from OSS and delivers the results asynchronously via callbacks. You can define custom frame-capturing policies and moderation prompts.

Operation description

Call SubmitAIAgentVideoAuditTask to submit a video moderation task with configurations such as a video URL, frame-capturing policies, and review interval. The system returns a unique JobId for tracking. When the task is complete, the service will push the results, including the moderation status and AI-generated analysis, to the configured callback URL. Only OSS URLs are supported as input. The underlying multi-modal large language model (MLLM) only supports interaction via the non-streaming OpenAI protocol.

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 details of the input file.

Type

string

No

The type of the input file. Valid values:

  • OSS: an OSS object.

OSS

Media

string

No

The OSS URL of the input file. Format:

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

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

UserData

string

No

The user-defined data.

{"Custom":"Hello"}

CallbackConfig

object

No

Callback configurations.

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

Url

string

No

The URL for receiving callback notifications.

https://yourcallback

Token

string

No

The authentication token for callback.

Bearer Token

AuditInterval

integer

No

The interval, in milliseconds, at which to submit captured frames to the AI agent. Valid values: 0 to 5000. Default value: 3000. If it is set to 0, all captured frames are sent to the model in a single batch request. Otherwise, frames are sent sequentially with the specified interval between each request.

3000

CapturePolicies

array<object>

Yes

An array of frame-capturing policies. Each policy defines a set of frames to be analyzed and will generate a separate result from the model.

object

No

A single policy.

FrameCount

integer

No

The number of frames to capture.

2

StartTime

integer

No

The timestamp in the video at which to start capturing frames. Unit: seconds.

0

Duration

integer

No

The duration over which to capture the specified number of frames. Unit: seconds.

10

Prompt

string

No

The text prompt to send to the MLLM along with the captured frames.

Please analyze the scenes in the video

Response elements

Element

Type

Description

Example

object

Schema of Response

JobId

string

The job ID.

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

RequestId

string

The request ID.

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

CallbackMessageFormat

ParameterDescription

Parameter Type Description Example value
JobId String Task ID bb940f584ccbef*
Status String Task Status Success/Fail
Results Array Processing result array -
> JSON Object ReviewResult structure -
>> Content String MLLM Returned result These picturesReviewApproved!
UserData String User-defined data {"businessId": "xxx"}
Message String Message "Success"

Response example

{
    "JobId": "*******bb940f584ccbef********",
    "Status": "Success",
    "Results": [
        {
            "Content": "These picturesReviewApproved!"
        }
    ],
    "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.