SubmitAIImageAuditJob

更新时间:
复制 MD 格式

Call this operation to submit an intelligent media moderation job for an image. After the job is submitted, it is processed asynchronously. The response does not mean the job is complete.

Operation description

  • Intelligent media moderation is a paid service. Before you call this operation, make sure that you fully understand the billing methods and pricing of ApsaraVideo VOD. For more information, see Billing of intelligent media moderation.

  • This operation is available only in the China (Shanghai), China (Beijing), and Singapore regions.

  • This is an asynchronous API. After a task is submitted, the system returns a job ID and queues the job for asynchronous processing. The job is not complete when the initial response is returned. The final result is delivered through a callback. You can also call the Query intelligent media moderation jobs operation to check the task status.

  • An image cannot exceed 20 MB in size. Its height or width cannot exceed 30,000 pixels, and the total number of pixels cannot exceed 250 million.

  • (Recommended) For best results, use an image with a resolution of at least 256 × 256 pixels. A lower resolution may affect the moderation accuracy.

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

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

MediaId

string

Yes

The ID of the image.

This ID is returned after you upload the image to ApsaraVideo VOD.

f1aa3024aee64*****6dc8ca20dbc320

TemplateId

string

Yes

The ID of the AI template. You can obtain the ID in one of the following ways:

  • Call the Add AI template operation. The template ID is returned as TemplateId in the response.

  • Call the Query AI template list operation. The template ID is returned as TemplateId in the response.

a07a7f7d7d10eb9fd999e56ecc****

MediaAuditConfiguration

string

No

The configuration of the moderation job.

  • Use this field to specify the type of the media file and adjust moderation rules for that type.

  • The value of ResourceType can contain only letters, digits, and underscores (_).

Note
  • You can customize the value of ResourceType. After customization, you must fill out the Yida form and submit it to Alibaba Cloud. The custom value takes effect after Alibaba Cloud processes your submission.

  • To adjust the moderation criteria and rules for a specific ResourceType, you can fill out the Yida form to request technical support.

{"ResourceType":"****_short_video"}

Response elements

Element

Type

Description

Example

object

The returned data.

JobId

string

The ID of the image moderation job.

b1aa3024aee64*****6dc8ca20dbc328

RequestId

string

The ID of the request.

6F42D500-1956-4B*****30-C09E755F4F4B

Examples

Success response

JSON format

{
  "JobId": "b1aa3024aee64*****6dc8ca20dbc328",
  "RequestId": "6F42D500-1956-4B*****30-C09E755F4F4B"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.