Unprofane

Move Coral Talk off the Perspective API

Coral joins its Custom endpoint with the operation name, so the endpoint ends in /v1alpha1. Two fields change.

Tested with Coral 9.11.8 itself, run on October 13, 2026. How

Coral Talk

What changes

Configure, Moderation, Toxic comment filter
Toxic comment filter: OnRemove: API key:              YOUR_GOOGLE_KEYAdd: API key:              up_test_YOUR_KEYRemove: Custom endpoint:      (empty)Add: Custom endpoint:      https://api.unprofane.com/v1alpha1Toxicity model:       TOXICITY (or empty)

2 lines change. Set Coral’s Custom endpoint to https://api.unprofane.com/v1alpha1 and its API key to an Unprofane key. Coral adds comments:analyze and comments:suggestscore itself.

Tested with Coral 9.11.8 itself, run on October 13, 2026.

  • Unchanged
  • The path
  • The request body
  • The response
  • The errors
  • The ?key= parameter

1. Make an Unprofane key for each environment

Sign in and make two keys on the keys page of the dashboard: a test key (up_test_…) for staging and a live key (up_live_…) for production. A test key is free and answers 100 checks a month across the account; a live key needs a plan. Keep your Google key: it is your way back until Google’s service ends on December 31, 2026.

2. On staging: Configure, Moderation, Toxic comment filter

Turn the filter on, set the API key to your test key and the Custom endpoint to the Unprofane host with /v1alpha1 and nothing after it. Coral adds the operation: it calls https://api.unprofane.com/v1alpha1/comments:analyze for each comment, and https://api.unprofane.com/v1alpha1/comments:suggestscore when “Allow Coral to send moderation actions” is on. With the bare host it would call /comments:analyze, which answers 404.

Toxic comment filter: On
API key:              up_test_YOUR_KEY
Custom endpoint:      https://api.unprofane.com/v1alpha1
Toxicity model:       TOXICITY (or empty)

3. Raise Coral’s timeout

Coral waits 800 ms by default for the whole call (PERSPECTIVE_TIMEOUT), then publishes the comment unscored. Unprofane reads most comments with the model as well as the rules and gives the model up to 800 ms before answering with the rules alone, so with Coral’s default the slowest checks time out on Coral’s side. Set the variable in Coral’s environment and restart it.

PERSPECTIVE_TIMEOUT=2000

4. Check both URLs from the Coral server

Run these from the machine Coral runs on. The first answers attributeScores.TOXICITY, the second {}. Do this before posting: Coral fails open. When a request errors or takes longer than its timeout, it logs “could not determine comment toxicity” and publishes the comment unscored, so a wrong endpoint or key looks like a quiet week.

curl -s -X POST "https://api.unprofane.com/v1alpha1/comments:analyze?key=up_test_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"comment":{"text":"you are a clown"},"requestedAttributes":{"TOXICITY":{}},"languages":["en"],"doNotStore":true}'

curl -s -X POST "https://api.unprofane.com/v1alpha1/comments:suggestscore?key=up_test_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"comment":{"text":"you are a clown"},"attributeScores":{"TOXICITY":{"summaryScore":{"value":1}}},"languages":["en"]}'

5. Set the threshold on staging

Coral’s Toxicity threshold is a percentage (80 by default); a comment scoring above it is withheld for a moderator. Do not carry the old number over: the scores come from a different engine, so 0.8 there is not 0.8 here. The replay tool takes a CSV of recent texts with the scores Perspective gave them and shows, for each old threshold, the threshold here that flags the same share, and how often the two flags agree. A queue of the same size is not proof of the same accuracy: two thresholds can flag the same number of comments and disagree on which ones, and agreement with Perspective repeats its mistakes. Before production, run a sample your moderators have already decided (approved and removed) through staging, and for each candidate threshold count the removed items it catches and the approved items it flags. Read the disagreements, then choose.

6. Then production

Set the same two fields with your live key. For the first days, watch Coral’s logs for “could not determine comment toxicity” and the Pending queue for comments withheld as toxic.

API key:          up_live_YOUR_KEY
Custom endpoint:  https://api.unprofane.com/v1alpha1

What carries over, and what does not

Carries over

  • The path /v1alpha1/comments:analyze, the request body and the response shape: attributeScores with summaryScore and spanScores, languages, detectedLanguages.
  • The error envelope (code, message, status) and Google’s words for each refusal, with Google’s status.
  • The key as ?key=, the first one when a client sends two, or as an X-Goog-Api-Key header.
  • comments:suggestscore, answered with {} as Google answered it.
  • The body Coral sends for both operations, with its one requested attribute (the Toxicity model field), doNotStore, and languages: one of en, es, fr, de or pt, and en for any other locale.

Not supported

  • The other New York Times attributes (LIKELY_TO_REJECT, SPAM, INFLAMMATORY and the rest) and the bridging attributes are not scored: a request for one is refused as Google refused an attribute it did not know, or left out with dropUnsupportedAttributes.
  • A moderator’s score sent to suggestscore is kept as a correction on your account, beside the score we gave, and read by a person; it changes no score until a later engine.
  • Google’s account errors (a key restricted to a referrer or an address, the API not enabled, billing) have no counterpart: a key here is valid or it is not.
  • A Toxicity model that names an unscored attribute is refused, and Coral then publishes the comment unscored. TOXICITY, SEVERE_TOXICITY, IDENTITY_ATTACK, INSULT, PROFANITY, THREAT and SEXUALLY_EXPLICIT are scored.

Scored differently

  • The scores come from a different engine: the rules give each attribute a floor from the matched words and the model’s reading lifts the rest. Until the Civil Comments calibration ships, the scale is the engine’s own rather than a fit to Perspective’s.
  • A RAW score is the same number as the probability.
  • Some comments Google refused are scored: languages it did not score (Hebrew, Turkish and others), SEXUALLY_EXPLICIT outside English, and HTML comments read without their tags.
  • “Allow Google to store comment data” only changes doNotStore. The Perspective endpoint keeps no text either way.

Roll back

Clear Custom endpoint, so Coral uses https://commentanalyzer.googleapis.com/v1alpha1 again, and put your Google key back. This works until Google’s service ends on December 31, 2026; after that, rolling back means turning the Toxic comment filter off.

API key:          YOUR_GOOGLE_KEY
Custom endpoint:  (empty)

How it was tested

Tested with Coral 9.11.8 itself (the release built from commit f1b5fcd), run in Docker against a local Unprofane API on October 13, 2026. Configured through Coral’s own API with this Custom endpoint, it withheld an insult and published a thanks in each of the five languages it sends, read each model it may be set to, sent a moderator’s approval to suggestscore, and published an insult unscored with the bare host and with an unscored model. The same run passed against the real model on October 13, 2026, and the rollback below against Google’s own API on October 13, 2026. The snippet checks rebuild Coral’s requests from its source on every run.

Then

Sources