Skip to content

Text moderation that quotes what it matched

One request screens any text your users post and returns a verdict, a score for every policy and the words that matched.

  • One check per text, however many policies
  • Test keys cost nothing
POST/v1/moderations
Sample data
MessageLanguageen

Worst seller ever, you are a complete idiot. Cheaper if you write me on https://t.me/seller or call +44 7700 900123.

  • Toxicity"complete idiot"0.94
  • Links & contact details
  • Personal data
  • Hate speech
Screening1 triggered

Sample data

The response says what to do, and why

Your code branches on the recommendation, and reviewers read the words, links and numbers a policy matched.

flagged
True when a policy set to flag has triggered.
recommendation
The action to take: allow, review or reject.
policies
A score from 0 to 1 for every policy that is on.
details
What each policy matched, where there is something to quote, and the text with personal data masked.
200 OK, sample response, trimmedJSON
{"id": "mod_1B7lY4kzM9n2Qx8sRt3wVu","flagged": true,"recommendation": "reject","policies": {"toxicity": 0.94,"links_contact": 0.9,"personal_data": 0.75,"hate_speech": 0.03},"details": {"toxicity": {"matches": [{"label": "insult","value": "complete idiot"}]},"links_contact": {"matches": [{"label": "url","value": "https://t.me/seller"}]},"personal_data": {"masked_output": "Worst seller ever, you are a complete idiot. Cheaper if you write me on https://t.me/seller or call +44***23."}},"language": "en"}

Disguised spellings are read as the plain word

Lookalike characters are swapped for the letters they imitate before any policy reads the text, and the Swear words policy and your wordlists also read through digits and spacing.

How the text is read
Sample data
  • A lookalike characterA Cyrillic a inside a Latin wordRead by: Every policytra (Cyrillic a) delyis read astradely
  • Digits for letters4 for a, 0 for o, 1 for iRead by: The Swear words policy, and wordlists on Starter and uptr4delyis read astradely
  • Spaced-out lettersA space or a dot between the lettersRead by: The Swear words policy, and wordlists on Starter and upt r a d e l yis read astradely

Sample data

Turn on the policies each kind of text needs

On Starter and up a template sets each policy's mode, threshold and effect; without one, a request runs the basic check, eight policies on every plan.

Acme Corp./Listings · Policies
Sample data
  • ToxicitytoxicityInsults, harassment, threats and demeaning language aimed at a person or group.Trigger0.70
    Mode
    Threshold
    0.70
    Effect
    Flag
    Weight
    1.00

    Scored and able to flag or send to review.

  • Links & contact detailslinks_contactConcrete off-platform contact values: phone numbers in any form (including digits spelled as words), emails (including 'at'/'dot' spellings), specific social handles, URLs, short domains and messenger links.Trigger0.50
  • Off-topicoff_topicPolitics, religion and other subjects that do not belong on the platform.Observe0.70
  • Meaningless textgibberishKeyboard mash, word salad, lorem ipsum, filler and repetition instead of meaningful text for its purpose; typos, slang, transliteration and text in any language or a mix of languages are fine.Trigger0.70

Sample data

Policies that read textToxicityHate speechSwear wordsViolenceSelf-harmSexual contentPersonal dataSpam & advertisingLinks & contact detailsDuplicate contentIllicit & regulated goodsLookalike charactersOff-topicMeaningless text

The language of each text is detected for you

It comes back as a two-letter code, and a content rule can use it as a condition on Starter and up.

Language in the response
Sample data
  • esEl vendedor nunca envió el pedido y no responde a los mensajes.In English: The seller never sent the order and does not answer.Safe
  • deSchreib mir lieber auf https://t.me/haendler, da geht es schneller.In English: Write to me on t.me instead, it is quicker there.Flagged
  • frArticle conforme à la description, livraison rapide.In English: The item was as described and arrived quickly.Safe

Sample data

Start moderating your users' content

Create an API key, send your first request and get a verdict back.