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.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- 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:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- 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.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| ice:SubmitAIAgentVideoAuditTask | none | *All Resources * |
| 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 |
| Media | string | No | The OSS URL of the input file. Format: http(s)://{BucketName}.{Endpoint}/{ObjectName} | http://my-bucket.cn-shanghai.aliyuncs.com/object-id.mp4 |
| UserData | string | No | The user-defined data. | |
| CallbackConfig | object | No | Callback configurations. | |
| 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 | Yes | 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. |
Response parameters
Examples
Sample success responses
JSONformat
{
"JobId": "**********fb04483915d4f2**********",
"RequestId": "**********-586A-AC29-742247******"
}Error codes
For a list of error codes, visit the Service error codes.
