Skip to main content

Migrate from Perspective API

If you already use Perspective, do not need to rebuild your integration from scratch. Respectify provides a replacement API.

For most migrations, three things matter:

  1. Replace Perspective's URL with Respectify's compatibility endpoint.
  2. Replace Perspective's query-string key with Respectify's auth headers.
  3. Test the parts of your integration that depend on spans, language fields, and any less common attributes.

The two Perspective-style endpoints are:

  • POST /v0.2/perspective-compat/analyse
  • POST /v0.2/perspective-compat/suggestscore

These keep the familiar Perspective scoring flow. If your application already uses Perspective scores for thresholds, queues, or moderation decisions, this is the part of Respectify to use.

Most common Perspective attributes map directly. Some Google names are preserved as aliases. A smaller number are approximate matches rather than exact replacements. The attribute mapping page lists those cases clearly.

tip

One of Respectify's main goals is to edify users when they communicate poorly.

If you also want Respectify to help the poster improve, use commentscore. That is a separate API for a separate job: internet health. It explains problems in the comment, points to examples, and gives feedback aimed at helping the person revise and post something better.

There are three areas worth checking carefully before you switch traffic over.

Languages

If you send languages, Respectify preserves them. If you do not send languages, Respectify does not claim language detection. The response falls back to an English-oriented default moderation context. That is separate from localisation. Respectify is not fully localised today, and moderation behaviour is still shaped mainly by English-language and Western moderation norms.

Spans

If your product highlights spans directly, test with the exact kinds of text your users write: emoji, quotes, ampersands, and text that looks like HTML. The compatibility endpoints return UTF-16 offsets, and those offsets line up with Respectify's returned spans: these are escaped for safe display, so some characters or symbols may be replaced with HTML elements.

Score corrections and Feedback

If you already use Perspective's suggestscore, Respectify supports that flow on POST /v0.2/perspective-compat/suggestscore.

Privacy note: Feedback sent to this endpoint is stored (ie retained) intentionally for our use to improve Respectify. That is what the correction endpoint is for. Therefore we retain the contents of any content sent to this endpoint.

Migration Steps