All Products
Search
Document Center

Intelligent Media Services:SubmitMediaCensorJob

Last Updated:Dec 16, 2024

Submits a content moderation job.

Operation description

The job that you submit by calling this operation is run in asynchronous mode. The job is added to an ApsaraVideo Media Processing (MPS) queue to be scheduled and run. You can call the QueryMediaCensorJobDetail operation or configure an asynchronous notification to obtain the job results.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ice:SubmitMediaCensorJobcreate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
TemplateIdstringNo

The template ID. If this parameter is not specified, the default template is used for moderation.

S00000001-100060
CoverImagesstringNo

The Object Storage Service (OSS) objects that are used as the thumbnails. Specify the thumbnails in a JSON array. A maximum of five thumbnails are supported.

Note If this parameter is specified, the system checks the thumbnails specified by this parameter instead of the thumbnails of the input file specified by Media.
[{"Bucket":"example-bucket-****","Location":"oss-cn-shanghai","Object":"example-****.jpeg","RoleArn":"acs:ram::1997018457688683:role/AliyunICEDefaultRole"}]
TitlestringNo

The video title, which can be up to 64 bytes in length.

Note If this parameter is specified, the system checks the title specified by this parameter instead of the title of the input file specified by Media.
Hello World
DescriptionstringNo

The video description, which can be up to 128 bytes in length.

Note If this parameter is specified, the system checks the description specified by this parameter instead of the description of the input file specified by Media.
example description
BarragesstringNo

The live comments of the video.

Note If this parameter is specified, the system checks the live comments specified by this parameter instead of the live comments of the input file specified by Media.
hello world
OutputstringYes

The output snapshots. The moderation job generates output snapshots and the result JSON file in the path corresponding to the input file.

  • File name format of output snapshots: oss://bucket/snapshot-{Count}.jpg. In the path, bucket indicates an OSS bucket that resides in the same region as the current project, and {Count} is the sequence number of the snapshot.
  • The detailed moderation results are stored in the {jobId}.output file in the same OSS folder as the output snapshots. For more information about the parameters in the output file, see Output parameters of media moderation jobs.
oss://sashimi-cn-shanghai/censor/snapshot-{Count}.jpg
UserDatastringNo

The user-defined data, which can be up to 128 bytes in length.

UserDatatestid-001-****
NotifyUrlstringNo

The callback URL. Simple Message Queue (SMQ, formerly MNS) and HTTP callbacks are supported.

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

The information about the file to be moderated.

TypestringNo

The type of the input file. Valid values:

OSS: OSS object.

Media: media asset.

Media
MediastringNo

The input file. The file can be an OSS object or a media asset. You can specify the path of an OSS object in one of the following formats:

1. oss://bucket/object

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

In the preceding paths, bucket indicates an OSS bucket that resides in the same region as the current project, and object indicates the path of the object in the bucket.

1b1b9cd148034739af413150fded****
ScheduleConfigobjectNo

The scheduling configurations.

PipelineIdstringNo

The ID of the ApsaraVideo Media Processing (MPS) queue to which the job is submitted.

5246b8d12a62433ab77845074039****
PriorityintegerNo

The job priority. A larger value indicates a higher priority. Valid values: 1 to 10.

6

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

25818875-5F78-4A13-BEF6-D7393642CA58
JobIdstring

The ID of the content moderation job. We recommend that you save this ID for subsequent calls of other operations.

88c6ca184c0e47098a5b665e2****

Examples

Sample success responses

JSONformat

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

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2022-07-19Add OperationView Change Details