Welcome to Guardian API
Guardian API is a production-ready content moderation service that combines multiple AI models and rule-based heuristics to provide comprehensive text analysis. Built with FastAPI, it offers a robust, scalable solution for detecting harmful content across multiple categories.Get Started
Start moderating content in minutes with our quickstart guide.
Key Features
Multi-Model Architecture
Four coordinated models working together: Sexism classifier, toxicity transformer, rule engine, and ensemble aggregator.
Multi-Label Detection
Detects sexism, toxicity, threats, self-harm, profanity, and other harmful content categories.
Production-Ready
FastAPI backend with proper error handling, logging, rate limiting, and comprehensive testing.
Developer-Friendly
OpenAPI documentation, structured JSON responses, and SDKs for Python and JavaScript/TypeScript.
How It Works
Guardian API uses a sophisticated ensemble approach:- Preprocessing: Text is cleaned and normalized
- Model Inference: Three models analyze the content in parallel:
- Custom LASSO sexism classifier
- HuggingFace toxicity transformer
- Rule-based heuristics engine
- Ensemble: Results are aggregated using weighted fusion and conflict resolution
- Response: Structured JSON with scores, severity levels, and metadata
The ensemble model intelligently combines outputs from all models, with rule-based detections overriding low confidence scores for critical issues like threats and self-harm.
Quick Example
Next Steps
Quickstart
Set up and run Guardian API locally
Architecture
Learn about the multi-model architecture
API Reference
Explore the REST API endpoints
SDKs
Use our Python or JavaScript SDKs
Use Cases
- Social Media Platforms: Moderate user comments and posts
- Chat Applications: Real-time message filtering
- Content Platforms: Screen user-generated content
- Community Forums: Maintain healthy discussions
- Customer Support: Flag inappropriate messages