Unsafe content moderation
Uploadcare provides a content moderation feature that detects and identifies unwanted or offensive images right on upload, preventing inappropriate content from being published.
This feature applies only to images and can operate in two modes: automatically via the Dashboard and through the REST API.
Automatically via Dashboard
To automatically scan all uploaded images, enable the Scan images on upload toggle in the Image moderation section of the Dashboard.
You can define what happens to images containing unsafe content by selecting an Action
— either automatically deleting flagged files or allowing them to be uploaded
(in which case, information about the detected unsafe content will be added to the file’s appdata
).
See the example below for details on how to check the appdata
.
You can fine-tune moderation by selecting content categories to check for. For each category, set a threshold value - a percentage that defines the confidence level above which a file will be automatically deleted.
Using REST API
For a custom solution, integrate Uploadcare’s REST API add-on, which detects and flags inappropriate content for further review.
Unsafe content moderation add-on works asynchronously:
- Start a processing job via REST API. Send an input file UUID with the necessary processing operations.
- Wait until the processing job status becomes
done
. - Detected moderation labels will be stored in the JSON response in the
appdata
section of the processed file.
Example
Execute unsafe content detection on a target UUID:
Check out REST API reference to see how to execute an add-on on a target UUID.
To get the job result, you need to enable file.info_updated
in the
Webhook section of the dashboard.
After completing the processing job, the webhook will be sent to the endpoint you specified in the webhook settings.
File information in response:
If your application does not have a backend or uses a mobile version, you can submit the request yourself to check the execution status.
Use the request ID returned by the add-on execution request described above:
As a request result, you will receive a UUID of the file when the status is done.
Check out the execution status.
Once the status changes to done
, appdata
will contain the result of the execution.
To get it, run file info request, specifying the include
parameter.
There are two methods for getting info on detected objects via GET requests
for single-file and multi-file cases:
or
You’ll get JSON with appdata
:
Billing
- This feature is available on Trial and paid plans.
- Learn how we charge for this operation.