Perspective API shuts down on December 31, 2026.Switch by changing one URL

Perspective API migration guide

Perspective API shuts down on December 31, 2026. Spamgone answers Perspective's comments:analyze requests in the same shape, so most integrations switch by changing two things. Using Coral for comments? Follow Switch Coral from Perspective instead.

Switching from Perspective? Use code PERSPECTIVE50 at checkout for 50% off Pro or Scale for your first 3 months, until January 31, 2027.

1. Change the URL and the key

- https://commentanalyzer.googleapis.com/v1alpha1/comments:analyze?key=GOOGLE_KEY
+ https://spamgone.dev/v1alpha1/comments:analyze?key=SPAMGONE_KEY

Google's own client libraries work when you point them at the new base URL. With Google's Python client, for example, pass client_options={"api_endpoint": "https://spamgone.dev/"} and your Spamgone key as developerKey.

The request and response stay the same: comment.text, requestedAttributes, languages, spanAnnotations, doNotStore and clientToken all work as before.

2. Check the attributes you use

Perspective attribute Spamgone
TOXICITY Supported: the overall toxicity score.
SEVERE_TOXICITY Supported.
IDENTITY_ATTACK Supported.
INSULT Supported.
PROFANITY Supported.
THREAT Supported.
SEXUALLY_EXPLICIT Supported: the sexual-content check's explicit label.
SPAM Supported, and much stronger: Spamgone's main check.
Experimental attributes such as FLIRTATION Not supported: the request fails with 400 INVALID_ARGUMENT.

comments:suggestscore saves a suggested SPAM score as feedback on the latest check of that text. Suggested scores for other attributes, such as TOXICITY, are accepted but not saved, because feedback in Spamgone is about spam.

3. Start with these thresholds

Scores are probabilities from 0 to 1, like Perspective's, but they come from a different model, so the same cut-off won't mean the same thing. Good starting points:

  • Hide automatically at 0.8 and above.
  • Send to human review from 0.5 to 0.8.
  • Allow below 0.5.

Run a sample of your own comments through both before moving all traffic, and adjust.

Known differences

  • Scores differ from Perspective's for the same text. Compare on your own data.
  • detectedLanguages echoes the languages you send (or en); Spamgone doesn't detect languages.
  • Span scores cover the whole comment as one span.
  • Errors use Google's { "error": { "code", "message", "status" } } shape, with Spamgone's own messages.
  • Quotas and rate limits follow your Spamgone plan, not Perspective's 1 query per second.

Checklist

  • Create a Spamgone test key and run your existing client against it.
  • Remove any attributes Spamgone doesn't support from requestedAttributes.
  • Compare scores on a sample of your comments and set your thresholds.
  • Swap in a live key and set doNotStore where you used it before.
  • Watch the first day in the dashboard's Metrics and Review pages.