A small standalone API Endpoint that checks text for toxicity. It loads a Hugging Face Transformers.js model (Xenova/toxic-bert) and exposes a single endpoint where you send text and get back a toxicity score from 0 – 100.
Built to be used by the Redacted Discord Bot.
docker
docker-compose
docker-buildx
- Clone the repository:
git clone --depth 1 https://github.com/Justus0405/Redacted-Agent.git- Navigate to the directory:
cd Redacted-Agent- Create a .env file from .env.example:
nano .env- Build and run with docker:
docker-compose up -d --build- To test the endpoint do:
curl -X POST http://localhost:3000/classify \
-H "Content-Type: application/json" \
-d '{"text":"I love trains!"}'Copyright © 2026-present Justus0405
