Error Codes
Complete reference for API error responses
All API errors follow a consistent format with specific error codes, HTTP status codes, and descriptive messages to help you understand and handle different error conditions.
Error Response Format
All API error responses use a consistent JSON structure with three fields: error name, human-readable message, and HTTP status code.
{
"name": "error-code-name",
"message": "Human-readable error description",
"status_code": "400"
}
Response Fields
name
StringUnique identifier for the error type. Use this for programmatic error handling.
message
StringHuman-readable description of the error. Safe to display to end users.
status_code
StringHTTP status code as a string. Matches the actual HTTP response status.
400 Bad Request
Client errors due to invalid request data, malformed content, or validation failures.
invalid-token-format
400The API token format is invalid. Ensure you're using a valid Bearer token.
invalid-content-type
400Request Content-Type header is missing or invalid. Use application/json.
missing-field
400A required field is missing from the request body. Check the API documentation for required fields.
invalid-field-value
400A field contains an invalid value. Check field format requirements and constraints.
validation-error
400General validation error. The request data doesn't meet the required format or constraints.
invalid-schema-config
400The schema configuration is invalid or malformed.
invalid-image-format
400The image format is not supported or the image data is corrupted.
image-not-downloaded
400Could not download the image from the provided URL. Check that the URL is accessible and returns a valid image.
image-to-large
400The image at the provided URL is too large. Use a smaller image or compress the image.
content-too-large
400The request content is too large. Reduce the size of your content or images.
text-moderation-error
400Text moderation service encountered an error. Try again later or contact support if it persists.
ai-image-service-unavailable
400AI image moderation service is temporarily unavailable. Try again later.
401 Unauthorized
Authentication errors related to missing, invalid, expired, or revoked API tokens.
token-required
401API token is missing from the request. Include a valid Bearer token in the Authorization header.
invalid-token
401The provided API token is not found or invalid. Check your token and ensure it's correctly formatted.
token-expired
401The API token has expired. Generate a new token in the Console.
token-revoked
401The API token has been revoked. Generate a new token in the Console.
403 Forbidden
Permission errors due to insufficient subscription access or inactive projects.
project-inactive
403The project is not active. Check your project status in the Console.
manual-moderation-subscription-required
403Manual moderation access is required. Upgrade to a manual moderation subscription.
automated-moderation-subscription-required
403Automated moderation access is required. Upgrade your subscription or check your free trial usage.
404 Not Found
Resource not found errors when the requested resource doesn't exist or isn't accessible.
project-not-found
404The specified project was not found or you don't have access to it.
schema-not-found
404The specified schema was not found in your project. Check the schema ID and ensure it exists.
submission-not-found
404The specified submission was not found. Check the submission ID.
moderation-request-not-found
404The moderation request was not found. This may occur if the request was already processed or removed.
resource-not-found
404The requested resource was not found. Check the endpoint URL and resource ID.
409 Conflict
Request conflicts with the current state of the resource.
request-already-processed
409The request has already been processed and cannot be modified. This prevents duplicate processing.
422 Unprocessable Entity
Request is well-formed but cannot be processed due to business logic constraints.
unsupported-moderation-type
422The requested moderation type is not supported for this schema or content.
appeal-not-allowed
422Appeals are not allowed for this submission. This may be due to submission status or appeal limits.
500 Internal Server Error
Unexpected server errors. These should be rare and are automatically logged for investigation.
internal-server-error
500An unexpected internal server error occurred. This includes timeouts, processing failures, and other server-side issues. Contact support if this persists.
Error Handling Best Practices
✅ Use Error Names
Always check the name
field for programmatic error handling rather than parsing messages.
✅ Implement Retry Logic
Retry requests for 5xx errors with exponential backoff. Don't retry 4xx errors without fixing the request.
✅ Log Error Details
Log both the error name and message for debugging. Messages are safe to display to users.
❌ Don't Ignore Status Codes
Always check HTTP status codes in addition to error names for proper error categorization.
Ready to Get Started?
Implement robust error handling in your application with our comprehensive error codes.
Related Documentation
- • Manual Moderation API - Submit content for human review
- • Webhooks API - Handle webhook delivery errors
- • Projects & Tokens - API token management