Automated Moderation API
Submit content for instant AI-powered moderation
The automated moderation endpoint provides instant AI-powered content analysis. Submit content with a schema and receive immediate harmful/safe classifications with detailed category breakdowns.
Submit Content
https://api.outharm.com/moderation/automatedSubmits content for immediate AI moderation and returns detailed results.
📋 Requirements
- • Authentication: Bearer token required
- • Content-Type: application/json
- • Subscription: Automated moderation access or free trial credits
Request Body
Request Structure
{
"schema_id": "550e8400-e29b-41d4-a716-446655440000",
"content": {
"field_name": ["value1", "value2"],
"another_field": ["value3"]
}
}Field Definitions
schema_idREQUIREDUUIDThe ID of the schema that defines the content structure. Must belong to your project and define the expected content fields.
contentREQUIREDObjectContent to moderate, organized by field names. Field names must match schema component names. All values are arrays for consistency.
Content Value Types
"title": ["Blog post about AI safety", "Another title"]"images": ["https://example.com/image.jpg", "https://example.com/photo.png"]"avatar": ["data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD..."]⚠️ Validation Rules
Content Structure:
- • Content object cannot be empty
- • Maximum 50 fields per request
- • Field names must match schema component names
- • Field names cannot be empty or exceed 100 characters
Content Arrays:
- • Arrays cannot be empty (must have at least one value)
- • Maximum 100 values per field array
- • Individual values cannot be empty or whitespace-only
URLs & Images:
- • HTTP/HTTPS URLs must be under 2048 characters
- • Base64 data URLs must include `;base64,` format
Request Examples
Text Content Moderation
POST https://api.outharm.com/moderation/automated
Authorization: Bearer your_api_token_here
Content-Type: application/json
{
"schema_id": "550e8400-e29b-41d4-a716-446655440000",
"content": {
"title": ["Check this post title for harmful content"],
"description": [
"This is a user-generated post description.",
"Another description to check simultaneously."
],
"tags": ["technology", "ai", "moderation"]
}
}Mixed Content (Text + Images)
{
"schema_id": "550e8400-e29b-41d4-a716-446655440000",
"content": {
"title": ["Product listing with suspicious content"],
"description": ["Check this product description"],
"images": [
"https://example.com/product-image.jpg",
"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD..."
],
"category": ["electronics"]
}
}Response
Response Structure
{
"submission_id": "123e4567-e89b-12d3-a456-426614174000",
"schema_id": "550e8400-e29b-41d4-a716-446655440000",
"is_harmful": true,
"results": {
"field_name": {
"is_harmful": true,
"detailed": [
{
"is_harmful": true,
"categories": ["violence", "hate"]
},
{
"is_harmful": false
}
]
}
}
}Response Fields
submission_idUUIDUnique identifier for this moderation request. Use this to track or reference the submission.
schema_idUUIDThe schema ID that was used for this moderation (same as request).
is_harmfulBooleanOverall harmful status across all submitted content. true if any content was detected as harmful.
resultsObjectDetailed moderation results organized by field name (component). Each field contains aggregated and detailed results.
Component Result Structure
is_harmfulBooleanWhether this field (component) contains any harmful content.
detailedArrayIndividual results for each value in the field array. Array order matches request order.
Item Result Structure:
is_harmfulBooleanIndividual item harmful status
categoriesString[] | nullHarmful categories detected (only present if is_harmful is true)
Response Examples
Safe Content Response
{
"submission_id": "123e4567-e89b-12d3-a456-426614174000",
"schema_id": "550e8400-e29b-41d4-a716-446655440000",
"is_harmful": false,
"results": {
"title": {
"is_harmful": false,
"detailed": [
{
"is_harmful": false
}
]
},
"description": {
"is_harmful": false,
"detailed": [
{
"is_harmful": false
},
{
"is_harmful": false
}
]
},
"tags": {
"is_harmful": false,
"detailed": [
{
"is_harmful": false
}
]
}
}
}Harmful Content Response
{
"submission_id": "123e4567-e89b-12d3-a456-426614174000",
"schema_id": "550e8400-e29b-41d4-a716-446655440000",
"is_harmful": true,
"results": {
"title": {
"is_harmful": true,
"detailed": [
{
"is_harmful": true,
"categories": ["violence", "hate"]
}
]
},
"description": {
"is_harmful": false,
"detailed": [
{
"is_harmful": false
},
{
"is_harmful": false
}
]
},
"images": {
"is_harmful": true,
"detailed": [
{
"is_harmful": false
},
{
"is_harmful": true,
"categories": ["sexual", "violence"]
}
]
}
}
}Error Responses
Validation Errors (400 Bad Request)
When request validation fails:
{
"name": "validation-error",
"message": "Content cannot be empty",
"status_code": "400"
}
// Other validation examples:
{
"name": "validation-error",
"message": "Field 'title' cannot be an empty array",
"status_code": "400"
}
{
"name": "validation-error",
"message": "Too many fields (max 50)",
"status_code": "400"
}Schema Errors (404 Not Found)
When schema is not found or not accessible:
{
"name": "schema-not-found",
"message": "Schema not found or not accessible",
"status_code": "404"
}Subscription Errors (403 Forbidden)
When automated moderation access is required:
{
"name": "automated-moderation-subscription-required",
"message": "Automated moderation subscription required",
"status_code": "403"
}Harmful Categories
When content is detected as harmful, the response includes category names that identify the type of harmful content. See Categories Documentation for the complete list of available categories and their descriptions.
📌 Category Examples
Common category names returned in responses:
violencehatesexualharassmentself-harmillegalspamtoxicprofanityReady to Get Started?
Start moderating content with the automated API. Create schemas, configure categories, and begin protecting your platform.
Related Documentation
- • Authentication - Learn how to authenticate API requests
- • Manual Moderation API - Submit content for human review
- • Automated Moderation Concepts - Understanding thresholds and configuration
- • Error Codes - Complete error reference