Content moderation
Analyze image
Account
Content moderation
Actions
Wordlist (Enterprise)
Authors (Enterprise)
Content moderation
Analyze image
Analyze image with your Moderation API project
POST
/
moderate
/
image
curl -X POST 'https://moderationapi.com/api/v1/moderate/image' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://example.com/image.jpg",
"contentId": "image-123",
"authorId": "user-123",
"contextId": "post-123",
"metadata": {
"source": "user_upload"
}
}'
{
"status": "success",
"contentId": "image-123",
"request": {
"timestamp": 1699344668022,
"quota_usage": 1
},
"flagged": false,
"labels": [
{
"label": "nudity",
"score": 0.001
},
{
"label": "suggestive",
"score": 0.002
},
{
"label": "gore",
"score": 0.001
},
{
"label": "hate",
"score": 0.001
},
{
"label": "violence",
"score": 0.001
}
],
"texts": ["Sample text found in image"]
}
curl -X POST 'https://moderationapi.com/api/v1/moderate/image' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://example.com/image.jpg",
"contentId": "image-123",
"authorId": "user-123",
"contextId": "post-123",
"metadata": {
"source": "user_upload"
}
}'
{
"status": "success",
"contentId": "image-123",
"request": {
"timestamp": 1699344668022,
"quota_usage": 1
},
"flagged": false,
"labels": [
{
"label": "nudity",
"score": 0.001
},
{
"label": "suggestive",
"score": 0.002
},
{
"label": "gore",
"score": 0.001
},
{
"label": "hate",
"score": 0.001
},
{
"label": "violence",
"score": 0.001
}
],
"texts": ["Sample text found in image"]
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Response
200
application/json
Successful response
The response is of type object
.
Was this page helpful?
curl -X POST 'https://moderationapi.com/api/v1/moderate/image' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://example.com/image.jpg",
"contentId": "image-123",
"authorId": "user-123",
"contextId": "post-123",
"metadata": {
"source": "user_upload"
}
}'
{
"status": "success",
"contentId": "image-123",
"request": {
"timestamp": 1699344668022,
"quota_usage": 1
},
"flagged": false,
"labels": [
{
"label": "nudity",
"score": 0.001
},
{
"label": "suggestive",
"score": 0.002
},
{
"label": "gore",
"score": 0.001
},
{
"label": "hate",
"score": 0.001
},
{
"label": "violence",
"score": 0.001
}
],
"texts": ["Sample text found in image"]
}