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
Test
RAM authorization
|
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
|
{"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":"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.
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
| Parameter | Type | Description |
| Type | String | The message type: MediaCensor. |
| MediaCensorJobNotify | AliyunMediaCensorJobNotify | The content moderation job notification. |
| UserData | String | The 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.