All Products
Search
Document Center

ApsaraVideo Media Processing:SubmitMediaCensorJob

Last Updated:Oct 14, 2026

Submits a content moderation job.

Operation description

  • This is an asynchronous operation. After you submit a task, the task ID is returned. The task is not yet complete at this point and enters a backend queue for asynchronous execution. The final result is sent through a callback notification. You can also proactively query the task status by calling QueryMediaCensorJobDetail.

  • The content moderation feature is currently available only in the China (Beijing), China (Shanghai), and Asia-Pacific Southeast 1 (Singapore) regions. Other regions are not supported.

QPS limit

The queries per second (QPS) limit for a single user for this operation is 100. If the limit is exceeded, API calls are throttled, which may affect your business. Call this operation as needed. For more information, see QPS limit.

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

mts:SubmitMediaCensorJob

none

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Input

string

No

The OSS address of the media file to be moderated. Video files and audio files are supported. You can obtain the address from ApsaraVideo Media Processing console > Media Management > Media Library. To moderate image files, use the CoverImage parameter. This is a JSON object. For more information, see Input.

  • Bucket: The name of the OSS bucket for the input file.

  • Location: The OSS region, which must be the same as the region of the ApsaraVideo Media Processing service.

  • Object: The OSS object to be moderated.

    Note

    The Object value cannot start with a forward slash (/). Otherwise, the API call fails.

{"Bucket":"example-bucket-****","Location":"oss-cn-shanghai","Object":"example-****.flv"}

CoverImages

string

No

The OSS files of cover images. You can obtain the files from ApsaraVideo Media Processing console > Media Management > Media Library. A maximum of five cover images are supported. This is a JSON array.

  • Bucket: The name of the OSS bucket for the input file.

  • Location: The OSS region, which must be the same as the region of the ApsaraVideo Media Processing service.

  • Object: The OSS object to be moderated.

    Note

    The Object value cannot start with a forward slash (/). Otherwise, the API call fails.

[{"Bucket":"example-bucket-****","Location":"oss-cn-shanghai","Object":"example-****.jpeg"}]

Title

string

No

The video title. The maximum length is 64 bytes.

Hello World

Description

string

No

The video description. The maximum length is 128 bytes.

example description

Barrages

string

No

The string.

hello world

PipelineId

string

No

The MPS queue ID, which is used to bindmessage notifications. You can obtain the ID from ApsaraVideo Media Processing console > Global Settings > MPS Queue. If you leave this parameter empty, the default MPS queue is used to run the task. The default MPS queue supports a concurrency of 10. To increase the concurrency, submit a ticket.

Note

MPS queues can be created only in the backend. For related query and update operations, see UpdatePipeline.

b22c173cced04565b1f38f1ecc39****

VideoCensorConfig

string

Yes

The video moderation configuration and the OSS address for output snapshots. You can obtain the address from ApsaraVideo Media Processing console > Media Management > Media Library.

JSON object.

  • OutputFile:

    • Bucket: The name of the OSS bucket for the output file.

    • Location: The OSS region, which must be the same as the region of the ApsaraVideo Media Processing service.

    • Object: The OSS object to be moderated. {Count} is the placeholder for the sequence number of captured frames.

    The detailed moderation results are saved in the same folder as OutputFile, named {jobId}.output. For the specific field format of the output file, see Content moderation result file fields.

  • StoreVideoTimeline: Specifies whether to output a {jobId}.video_timeline file and store it in OSS. Set the value to true to output the file or false to skip the output. If you leave this parameter empty, the file is not output by default. For the file format, see QueryMediaCensorJobDetail (videoTimeline example).

  • SaveType: The output mode. Set the value to abnormal to output only problematic frames, or all to output all frames.

  • Biztype: The moderation template. The default template is common. If you leave this parameter empty, common is used by default. To customize a moderation template, submit a ticket and then enter the user UID in this field.

  • Scene: The detection scenario. You can select detection scenarios. If you leave this parameter empty, terrorism and pornography detection are used by default. Available scenarios:

    • porn: Pornography detection

    • terrorism: Terrorism detection

    • ad: Image and text violation detection

    • live: Undesirable scene detection

    • logo: Logo detection

    • audio: Audio anti-spam detection

Note

For input files with audio tracks, the audio scenario performs audio moderation. Do not specify audio for input files without audio tracks.

{"Scenes" : ["porn"], "OutputFile":{"Bucket": "example-001","Location": "oss-cn-hangzhou","Object": "test/example-{Count}.jpg"},"SaveType" : "abnormal","BizType":"common"}

UserData

string

No

The custom user data. The maximum length is 128 bytes.

UserDatatestid-001-****

ExternalUrl

string

No

The URL of the video.

http://www.example.com/video-****/test-****.mp4

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

25818875-5F78-4A13-BEF6-D7393642CA58

JobId

string

The content moderation job ID. Save this ID for use when calling other operations.

88c6ca184c0e47098a5b665e2****

Asynchronous notification message parameters

ParameterTypeDescription
TypeStringThe message type: MediaCensor.
MediaCensorJobNotifyAliyunMediaCensorJobNotifyThe content moderation job notification.
UserDataStringThe custom user data.

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.