This topic lists all the operations that you can call for content moderation.

Make API requests

This section is intended for users who initiate HTTP or HTTPS POST requests based on the API URL. If you use the SDK or CLI, you can skip this section.

The request URL consists of different parameters and has a fixed syntax. The URL contains common parameters, your signature, and operation-specific parameters. We provide sample URL requests for each operation. These sample requests are not encoded to make them easy to read. Before making a request, you must encode it first. The moderation result is returned to you after the authentication process is complete based on your signature. Response parameters are displayed if the call is successful, while an error is returned if the call fails. You can troubleshoot issues based on the common error codes and operation-specific error codes.
Note We recommend that you use the SDK to call the API and manage your resources so as to avoid manual signature authentication.

Concurrency limit

The concurrency limit specifies the number of images, videos, or text entries that can be moderated at the same time. This limit applies to both the subscription and Pay-As-You-Go billing methods. The following table describes the concurrency limit imposed by the Content Moderation API on different types of moderation objects.

Moderation object Default concurrency limit Unit Description
Image 50 Piece The maximum number of images that can be moderated per second.
Video 20 Piece The maximum number of videos that can be moderated at the same time. Files and streams are not differentiated.
Text 100 Piece The maximum number of text entries that can be moderated per second. A single piece of text contains fewer than 200 characters.
Note
  • The number of images, videos, text entries, or audios moderated within the default concurrency limit is free of charge. To adjust the default concurrency limit, submit a ticket. You are charged for raising the default concurrency limit.
  • By default, if an object is moderated in multiple scenarios simultaneously, it is recorded as only one object. For example, if you request pornography detection and terrorist content detection for an image at the same time, only one image is recorded.

Image moderation

Operation Description
/green/image/scan Submits a synchronous image moderation task.
/green/image/asyncscan Submits an asynchronous image moderation task.
/green/image/results Queries the result of an asynchronous image moderation task.
/green/image/feedback Submits the feedback on image moderation.

Video moderation

Operation Description
/green/video/syncscan Submits a synchronous video moderation task.
/green/video/asyncscan Submits an asynchronous video moderation task.
/green/video/results Queries the result of an asynchronous video moderation task.
/green/video/feedback Submits the feedback on video moderation.

Text anti-spam

Operation Description
/green/text/scan Submits a text moderation task.
/green/text/feedback Submits the feedback on text moderation.