Is it possible to customize the Image Moderation API to my needs?
There is no one-size-fits-all solution with Image Moderation. Expectations will vary between countries, cultures and applications.
This is why we have worked to make our API endpoints and models flexible and suitable to most needs.
You choose the models you want to apply
As you may know, we have multiple moderation models available. When you perform a request to the API, you get to choose what models to apply and how each model is used to then decide if an image should be approved, rejected or reviewed. See our Model Reference to learn more about each model output.
Each model returns fine-grained results
Our models do not return simple binary classifications (such as 'nudity' or 'no nudity'). They send you more information so that you can make a fine-grained decision on how to handle each case.
The Nudity Detection, for instance, will tell you what level of nudity it has encountered. When faced with suggestive content, we tell you exactly what the image contains, so that you can take appropriate action - or simply accept the photo.
In other words, you don't need to worry about how images get handled when they are border-line nudity. You can simply define actions for each possible situation:
| Woman in bikinis | Accept Reject or Review? |
| Bare male chest | Accept Reject or Review? |
| Man in underwear | Accept Reject or Review? |
| Woman in lingerie | Accept Reject or Review? |
| Suggestive cleavage | Accept Reject or Review? |
| Miniskirt | Accept Reject or Review? |
| and so on... | see more details |
This applies to Nudity Detection but also to all the other available models.
Each moderation category is associated with a score
A score between 0 and 1 is returned for each moderation category. This value reflects the modelβs confidence. A score closer to 1 indicates that the image has a higher probability of containing what the model is looking for.
With these scores, you can define thresholds to help you make a decision about the image you submitted. It could simply be to automatically reject the image using Fully Automated Moderation if the score is above a predefined value.
It could also be to review some of the submitted images using Hybrid Moderation if the score is between two predefined thresholds.
You can create custom disallow lists
Disallow Lists can help you blacklist some specific images by fingerprinting them and preventing them from (re)appearing on your site or app. This is useful to make sure known copyrighted images, illegal images, or previously removed images do not get re-uploaded to your properties.
Once you add an image to the list, any near-duplicate image will be detected.
The steps to setup and use an Image Disallow List are the following:
- Create an Image Disallow List from your dashboard.
- Add Images to the disallow list (through the dashboard or through the API).
- Check new and existing images against the disallow list.
To get more information on how to use Image Disallow Lists, check the documentation.
And send images to the feedback API
Our Image Moderation models have been trained to achieve best-in-class accuracy, yet you might want to report images you believe were misclassified. To do that, you can submit the image to the Feedback API. Submitted images are used to improve the models on a continuous basis, and submitting them will not impact your billing.
See how to report misclassified images for the list of models and classes you can report.
Need more?
That said, if you believe you need more customization than provided out-of-the-box, for instance with new detection capacities or custom decision filters, please get in touch.
Other frequent questions
- What is a model?
- What are the ways to send an image to the API?
- What image types are supported?
- What are the acceptable / recommended image dimensions?
- How do you process GIF images with multiple frames (animated GIFs)?
- Do you use image metadata to moderate images?
- Is it possible to perform bulk image moderation / to submit images in batch? How many images can be submitted at once?
- Can you detect duplicate images, or image spam?
- Can you improve the moderation results based on my reports of incorrectly classified or mislabeled images?