Check any text for profanity.
import { JigsawStack } from "jigsawstack"; const jigsaw = JigsawStack({ apiKey: "your-api-key" }); const response = await jigsaw.validate.profanity({ "text": "This is a sample text that might contain inappropriate language." })
{ "success": true, "profanities_found": false, "profanities": [], "clean_text": "This is a sample text that might contain inappropriate language.", "_usage": { "input_tokens": 20, "output_tokens": 35, "inference_time_tokens": 115, "total_tokens": 170 } }
Was this page helpful?