Perspective API shuts down DecemberΒ 31.
Switch in five minutes: change one URL.
CleanMod is a drop-in Perspective API replacement. It uses the same comments:analyze request and response format, so your moderation code keeps working after Google turns Perspective off.
Before and after
curl -X POST \
"https://commentanalyzer.googleapis.com/v1alpha1/comments:analyze?key=$GOOGLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"comment": {"text": "You are an idiot"},
"requestedAttributes": {"TOXICITY": {}}}'curl -X POST \
"https://cleanmod.dev/v1alpha1/comments:analyze" \
-H "Authorization: Bearer $CLEANMOD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"comment": {"text": "You are an idiot"},
"requestedAttributes": {"TOXICITY": {}}}'The body and the response shape stay the same. You can also keep sending the key as a ?key= query parameter, the way Perspective clients do.
Same request and response
comments:analyze with comment.text, requestedAttributes, languages, scoreThreshold, doNotStore, spanAnnotations and clientToken. Responses return attributeScores with summaryScore and spanScores.
Same errors
Google's error envelope with Perspective's documented messages, so your existing error handling keeps working.
Works with Google's client libraries
CleanMod serves a Perspective discovery document, so the googleapis Node client and the Python discovery client work once you point them at cleanmod.dev.
Attribute coverage
Perspective's six production attributes, plus SEXUALLY_EXPLICIT. The _EXPERIMENTAL variants return the same scores. English only for now; need another language? Tell us which.
| Perspective attribute | Languages on CleanMod |
|---|---|
| TOXICITY | English |
| SEVERE_TOXICITY | English |
| IDENTITY_ATTACK | English |
| INSULT | English |
| PROFANITY | English |
| THREAT | English |
| SEXUALLY_EXPLICIT | English |
CleanMod for WordPress
The official CleanMod WordPress plugin adds toxicity detection on top of WordPress' own comment moderation. It complements Akismet: Akismet fights spam, CleanMod fights abuse and toxicity.
- βChecks new comments automatically
- βFlags or blocks toxic and abusive submissions
- βRespects your existing moderation rules
- βConfigure it under Settings β CleanMod in wp-admin
Ways to use CleanMod
Perspective-compatible API
Available now
WordPress plugin
Available now
JavaScript SDK
Available now
REST API
Available now
Not migrating from Perspective?
CleanMod's own API is a few lines of code too
/api/v1/moderate returns a single allow, flag or block decision with category scores. Read the docs.
curl -X POST https://cleanmod.dev/api/v1/moderate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "You are an idiot"}'Start free, scale when you need to
CleanMod has a free plan, so you can integrate and check scores on your own comments before you cut over. Move to a paid tier when you need more volume.
View pricingGet your replacement key before December 31
Create a free account, generate an API key, and point your Perspective client at cleanmod.dev.
Get a free API key