Image Moderation
Zia Image Moderation detects and recognizes inappropriate and unsafe content in images. The criteria include suggestive or explicit racy content, nudity, violence, gore, bloodshed, and the presence of weapons and drugs.
Execute Image Moderation
Description
This API recognizes the following inappropriate content in images and returns them in the response: racy, weapon, nudity, gore, drug. The response also contains the probability of each criteria with their confidence scores, and the prediction of the image being safe_to_use or unsafe_to_use.
You must specify the path of the image in the API request, as shown in the sample request. You can also optionally set the moderation mode for the request.
Request Details
Request URL
{api-domain}/baas/v1/project/{project_id}/ml/imagemoderation
Request Headers
Authorization: Zoho-oauthtoken {oauth_token}
content-type: multipart/form-data; boundary=—-WebKitFormBoundary7MA4YWxkTrZu0gW
Optional Headers
CATALYST-ORG: {org_id}
Environment: Development
Scope
ZohoCatalyst.mlkit.READ
Request JSON Properties
The input file to be processed.
Allowed formats: .webp, .jpeg, .png, .txt
File size limit: 10 MB
Denotes the moderation mode
Allowed values: basic, moderate, advanced
Default value: advanced
- basic: Detects nudity alone
- moderate: Detects nudity and racy content
- advanced: Detects all criteria mentioned in the description
Response Details
The response will contain the probability of the parameters detected, based on the mode set in the API request. Based on an aggregate of the detected parameters, it will also include the prediction of the image being safe or unsafe to use, along with a confidence score of the prediction.
curl -X POST
https://api.catalyst.zoho.com/baas/v1/project/4000000006007/ml/imagemoderation
-H “Authorization: Zoho-oauthtoken 1000.910*************************16.2f*************************57”
-H “Content-Type: multipart/form-data; boundary=—-WebKitFormBoundary7MA4YWxkTrZu0gW”
-F “file=@attachment1.txt”
-d ‘{
“mode”: “basic”
}’
{
"probability": {
"nudity": "1.0"
},
"confidence": 1,
"prediction": "unsafe_to_use"
}
curl -X POST
https://api.catalyst.zoho.com/baas/v1/project/4000000006007/ml/imagemoderation
-H “Authorization: Zoho-oauthtoken 1000.910*************************16.2f*************************57”
-H “Content-Type: multipart/form-data; boundary=—-WebKitFormBoundary7MA4YWxkTrZu0gW”
-F “file=@attachment1.txt”
-d ‘{
“mode”: “moderate”
}’
{
"probability": {
"racy": "0.0",
"nudity": "0.0"
},
"confidence": 0.9,
"prediction": "safe_to_use"
}
curl -X POST
https://api.catalyst.zoho.com/baas/v1/project/4000000006007/ml/imagemoderation
-H “Authorization: Zoho-oauthtoken 1000.910*************************16.2f*************************57”
-H “Content-Type: multipart/form-data; boundary=—-WebKitFormBoundary7MA4YWxkTrZu0gW”
-F “file=@attachment1.txt”
-d ‘{
“mode”: “advanced”
}’
{
"probability": {
"racy": "0.0",
"weapon": "1.0",
"nudity": "0.0",
"gore": "0.0",
"drug": "0.0"
},
"confidence": 1,
"prediction": "unsafe_to_use"
}
Yes
No
Send your feedback to us