SubmitMediaCensorJob

更新时间:
复制 MD 格式

Submits a media file to Intelligent Media Services for a censor job. This API automates the scanning of video, audio, or image content to detect potentially non-compliant, sensitive, or inappropriate material.

Operation description

This is an asynchronous API. After you submit a job, the service returns a job ID and processes the job in the background. You receive the final result through a callback notification. You can also check the job status by calling the QueryMediaCensorJob API.

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

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

TemplateId

string

No

The template ID. If this parameter is left empty, the service uses the default template for the censor job.

S00000001-100060

CoverImages

string

No

The Object Storage Service (OSS) files for the cover images, specified as a JSON array. You can specify up to five cover images.

Note

If specified, this parameter overrides the cover image information in the Media object.

[{"Bucket":"example-bucket-****","Location":"oss-cn-shanghai","Object":"example-****.jpeg","RoleArn":"acs:ram::1997018457688683:role/AliyunICEDefaultRole"}]

Title

string

No

The video title. The maximum length is 64 bytes.

Note

If specified, this parameter overrides the title specified in the Media object.

Hello World

Description

string

No

The video description. The maximum length is 128 bytes.

Note

If specified, this parameter overrides the description specified in the Media object.

example description

Barrages

string

No

The video barrages (on-screen comments).

Note

If specified, it overrides the barrages specified in the Media object.

hello world

Output

string

No

The output location for screenshots. The censor job generates screenshots and a result JSON file in the OSS location specified by this parameter.

  • Example format: oss://bucket/snapshot-{Count}.jpg, where bucket is the name of an OSS bucket in the same region as the project, and {Count} is a placeholder for the screenshot sequence number.

  • The detailed censor results are saved to a file named {jobId}.output in the same OSS folder as the value of Output. For information about the fields in the output file, see Media censor result file fields.

oss://sashimi-cn-shanghai/censor/snapshot-{Count}.jpg

UserData

string

No

The user-defined data. The maximum length is 128 bytes.

UserDatatestid-001-****

NotifyUrl

string

No

The callback path. Both Message Service (MNS) and HTTP callbacks are supported.

mns://125340688170****.oss-cn-shanghai.aliyuncs.com/queues/example-pipeline

Input

object

No

The input file to censor.

Type

string

No

The type of the input file. Valid values:

OSS: an OSS URL

Media: a media ID

Media

Media

string

No

The identifier for the input file. You can specify either an OSS URL or a media ID. Valid OSS URL formats:

1. oss://bucket/object

2. http(s)://bucket.oss-[regionId].aliyuncs.com/object

The bucket must be in the same region as the project, and object is the path to the file.

1b1b9cd148034739af413150fded****

ScheduleConfig

object

No

The scheduling configuration.

PipelineId

string

No

The pipeline ID.

5246b8d12a62433ab77845074039****

Priority

integer

No

The task priority. A higher value indicates a higher priority. Valid values range from 1 to 10.

6

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

25818875-5F78-4A13-BEF6-D7393642CA58

JobId

string

The ID of the video censor job. We recommend saving this ID for subsequent API calls.

88c6ca184c0e47098a5b665e2****

Examples

Success response

JSON format

{
  "RequestId": "25818875-5F78-4A13-BEF6-D7393642CA58",
  "JobId": "88c6ca184c0e47098a5b665e2****"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.