Serverless AI Image Moderation
AI powered image moderation service that analyzes image content for potentially harmful or inappropriate material. Detect nudity, violence, hate speech, and other objectionable content in visual media.
Endpoint
Analyze images for potentially inappropriate content
POSThttps://api.xtartapp.com/image/moderation
*Authentication
You must use a Bearer token provided by the dashboard to use for authentication. Add the token to the Authorization header.
Request body
Name | Type | Required | Max | Description |
---|---|---|---|---|
image | string | Yes | - | Filename of the optimized .ximage file previously uploaded to the platform. |
Response
Name | Type | Description |
---|---|---|
data | object | An object containing confidence scores for each moderation category |
data.<category> | number | Confidence score between 0 and 1 for the associated category, where higher values indicate higher likelihood of that content type being present |
metadata | object | Metadata about the image moderation process |
metadata.cost | number | The cost of the image moderation request |
Errors
{
"error": "string",
"code": "string"
}
HTTP Status | Error Code | Message |
---|---|---|
400 | INVALID_PAYLOAD | Occurs when the payload is invalid. |
400 | INVALID_REQUEST | The request is invalid. |
400 | IMAGE_MODERATION_ERROR | Could not perform moderation analysis on the image | parsing error. |
400 | INVALID_IMAGE | The image was not found or is invalid. |
400 | HARM_CONTENT | The content is harmful and cannot be processed. |
400 | INSUFFICIENT_BALANCE | The user has insufficient balance. |
401 | UNAUTHORIZED | The token is invalid. |
429 | TOO_MANY_REQUESTS | The request limit has been reached. |