API Documentation

Getting Started

The AI Content Moderator API provides endpoints for analyzing text and audio content for potentially harmful content.

POST/analyze-text

Analyzes text content for inappropriate content.

Request

{
    "text_input": "string"
}

Response

{
    "status": "success",
    "data": {
        // Analysis results
    }
}

POST/upload-audio

Uploads audio content for moderation analysis.

Request

Content-Type: multipart/form-data

const audioBlob = new Blob(audioChunks, { type: 'audio/webm' });
const formData = new FormData();
formData.append('audio', audioBlob, 'recording.webm');

const response = await fetch('/upload-audio', {
    method: 'POST',
    body: formData
});

Response

"File uploaded and task sent to queue."

Implementation Example

import requests

def analyze_text(text):
    response = requests.post(
        "https://api.contentmoderator.com/v1/analyze-text",
        json={"text_input": text}
    )
    return response.json()

def upload_audio(file_path):
    with open(file_path, 'rb') as f:
        files = {'audio': f}
        response = requests.post(
            "https://api.contentmoderator.com/v1/upload-audio",
            files=files
        )
    return response.text