Submits a content moderation job.
Usage notes
The job that you submit by calling this operation is run in asynchronous mode. The job is added to an ApsaraVideo Media Processing (MPS) pipeline and then scheduled, queued, and run. You can call the QueryMediaCensorJobDetail operation or configure an asynchronous notification to obtain the job result.
QPS limit
You can call this operation up to 100 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. For more information, see QPS limit.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | SubmitMediaCensorJob |
The operation that you want to perform. Set the value to SubmitMediaCensorJob. |
Input | String | No | null |
The Object Storage Service (OSS) URL of the video or audio file to be moderated. To
view the OSS URL of the video or audio file, you can log on to the MPS console and choose Media Management > Media List in the left-side navigation pane. To moderate an image file, use the The value is a JSON object. For more information, see Input.
|
CoverImages | String | No | [{"Bucket":"example-bucket-****","Location":"oss-cn-shanghai","Object":"example-****.jpeg"}] |
The OSS URL of the image file that is used as the thumbnail. To view the OSS URL of the image file, you can log on to the MPS console and choose Media Management > Media List in the left-side navigation pane. You can specify up to five thumbnails in a JSON array.
|
Title | String | No | Hello World |
The title of the video. The value can be up to 64 bytes in size. |
Description | String | No | example description |
The description of the video. The value can be up to 128 bytes in size. |
Barrages | String | No | hello world |
The live comments. |
PipelineId | String | Yes | b22c173cced04565b1f38f1ecc39**** |
The ID of the MPS queue. This ID can be used to associate the job with a notification method. To view the ID of the MPS queue, you can log on to the MPS console and choose Global Settings > Pipelines in the left-side navigation pane. An empty string ("") indicates that the default MPS queue is used to run the job. By default, an MPS queue can process a maximum of 10 concurrent content moderation jobs. To increase the limit, submit a ticket. Note MPS queues are automatically created by the system. For more information about how
to query and update MPS queues, see UpdatePipeline.
|
VideoCensorConfig | String | Yes | null |
The video moderation configurations and the OSS URLs of the output snapshots. To view the OSS URLs of the output snapshots, you can log on to the MPS console and choose Media Management > Media List in the left-side navigation pane. The value is a JSON object.
|
UserData | String | No | UserDatatestid-001-**** |
The custom data. The value can be up to 128 bytes in size. |
ExternalUrl | String | No | http://www.example.com/video-****/test-****.mp4 |
The URL of the video. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 25818875-5F78-4A13-BEF6-D7393642CA58 |
The ID of the request. |
JobId | String | 88c6ca184c0e47098a5b665e2**** |
The ID of the content moderation job. We recommend that you keep this ID for subsequent operation calls. |
Asynchronous notification parameters
Parameter |
Type |
Description |
---|---|---|
Type |
String |
The type of the message. The value is MediaCensor. |
MediaCensorJobNotify |
AliyunMediaCensorJobNotify |
The notification content of the content moderation job. |
UserData |
String |
The custom data. |
Examples
Sample requests
http(s)://mts.cn-hangzhou.aliyuncs.com/?Action=SubmitMediaCensorJob
&Input={"Bucket":"example-bucket-****","Location":"oss-cn-shanghai","Object":"example-****.flv"}
&CoverImages=[{"Bucket":"example-bucket-****","Location":"oss-cn-shanghai","Object":"example-****.jpeg"}]
&Title=Hello World
&Description=example description
&Barrages=hello world
&PipelineId=b22c173cced04565b1f38f1ecc39****
&VideoCensorConfig={"Scenes" : ["porn"], "OutputFile":{"Bucket": "example-001","Location": "oss-cn-hangzhou","Object": "test/example-{Count}.jpg"},"SaveType" : "abnormal","BizType":"common"}
&UserData=UserDatatestid-001-****
&ExternalUrl=http://www.example.com/video-****/test-****.mp4
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<SubmitMediaCensorJobResponse>
<RequestId>25818875-5F78-4A13-BEF6-D7393642CA58</RequestId>
<JobId>88c6ca184c0e47098a5b665e2****</JobId>
</SubmitMediaCensorJobResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "25818875-5F78-4A13-BEF6-D7393642CA58",
"JobId" : "88c6ca184c0e47098a5b665e2****"
}
Error codes
For a list of error codes, visit the API Error Center.