algorithm07-ai/TextGuardAI
Built by Metorial, the integration platform for agentic AI.
algorithm07-ai/TextGuardAI
Server Summary
Text classification
Spam detection
Batch processing
API integration
Rate limiting and usage tracking
Confidence scoring analysis
TextGuard AI is a powerful text classification and spam detection API that uses advanced AI models to analyze and classify text content. It provides a simple REST API interface for both single text analysis and batch processing.
git clone https://github.com/yourusername/textguard-ai.git
cd textguard-ai
pip install -r requirements.txt
.env
file in the root directory with the following variables:DEEPSEEK_API_KEY=your_deepseek_api_key_here
FREE_API_KEY=free_key
BASIC_API_KEY=basic_key
PREMIUM_API_KEY=premium_key
python -m src.api.main
http://localhost:8000
GET /
: Root endpoint with API informationGET /health
: Health check endpointGET /tools
: List available tools and their parametersPOST /classify
: Classify a single textPOST /batch_classify
: Classify multiple textsGET /usage
: Get usage statisticscurl -X POST "http://localhost:8000/classify" \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{"text": "Your text here", "analysis_type": "spam"}'
curl -X POST "http://localhost:8000/batch_classify" \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{"texts": ["Text 1", "Text 2"], "analysis_type": "spam"}'
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.