Skip to content

The policy catalog

Every pre-built policy, what it detects, its default threshold and mode, and the request that lists them with your own guidelines and wordlists.

A policy is one thing Infrared looks for in content: an insult, a phone number, a text posted twice. Every policy that runs returns a score from 0 to 1 under policies in the moderation, keyed by the policy.

The catalog is the set you choose from. A template lists the policies it runs and says what a high score does there. Guidelines and wordlists add policies of your own. A request that names no template runs the basic check, which scores eight of the policies below.

List the policies of a project

curl https://api.useinfrared.com/v1/policies \
  -H "Authorization: Bearer $INFRARED_KEY"

The answer is one list, not paginated: the catalog first, then the project's guidelines and wordlists as policies. Any key with the read scope can ask for it.

200 OK, trimmedJSON
{
  "object": "list",
  "data": [
    {
      "object": "policy",
      "key": "profanity",
      "name": "Swear words",
      "description": "Swear words, including masked, spaced-out and misspelled forms, in every supported language.",
      "group": "profanity",
      "modalities": ["text"],
      "engine": "classifier",
      "tier": "basic",
      "check_weight": 0,
      "weight": 0.8,
      "default_threshold": 0.7,
      "default_mode": "trigger",
      "labels": ["explicit", "masked", "mild"],
      "experimental": false,
      "supported": true
    },
    {
      "object": "policy",
      "key": "guideline/no-off-site-deals",
      "name": "No off-site deals",
      "group": "custom",
      "engine": "llm",
      "tier": "custom",
      "modalities": ["text", "image"],
      "enabled": true
    },
    {
      "object": "policy",
      "key": "wordlist/competitors",
      "name": "Competitors",
      "group": "custom",
      "engine": "wordlist",
      "tier": "custom",
      "modalities": ["text"],
      "enabled": true,
      "mode": "block"
    }
  ],
  "has_more": false,
  "next_cursor": null
}
keystring

The name of the policy in policies, in triggers and in content rules. A guideline is guideline/<slug>, a wordlist is wordlist/<slug>.

modalitiesarray

What the policy reads: text, image or both.

default_thresholdnumber

The score from which the policy counts as flagged, unless a template sets its own.

default_modestring

The mode the dashboard gives the policy when you turn it on in a template.

One oftriggerobserve

weightnumber

How much the score counts for severity, from 0 to 1.

tierstring

advanced policies need a plan that includes them. custom marks your guidelines and wordlists, which carry enabled in place of the catalog attributes.

One ofbasicadvancedcustom

supportedboolean

false for a policy in development. It is listed and never scored.

List policies in the API reference describes every attribute.

Pre-built policies

"Runs on" says what a policy reads. The text Infrared reads inside an image is screened as well, by some of the text policies: Text inside the image says which.

PolicyDetectsRuns onThresholdModeTier
toxicityInsults, harassment, threats and demeaning language aimed at a person or groupText0.70TriggerBasic
hate_speechAttacks or slurs based on ethnicity, nationality, religion, gender, sexuality or disabilityText0.70TriggerBasic
profanitySwear words, including masked, spaced-out and misspelled formsText0.70TriggerBasic
violenceThreats, graphic violence and its glorificationText, image0.70TriggerBasic
self_harmEncouragement, instructions or intent of self-harm and suicideText, image0.70TriggerBasic
sexualSexually explicit content and solicitationText, image0.70TriggerBasic
personal_dataEmails, phone numbers, card numbers, IBANs, national ID numbers and, when you turn them on, street addressesText0.50TriggerBasic
spamPromotion of unrelated products or sites, keyword stuffing, misleading urgency, copy-pasted fillerText0.70TriggerBasic
links_contactWays to reach the author outside your platform: URLs, emails, phone numbers, social handles, messenger links. On an image, a picture whose main purpose is to show contact detailsText, image0.50TriggerBasic
duplicateThe same text or image submitted recently in the project, by the same author or by anotherText, image0.50TriggerBasic
illicitProhibited or regulated goods and services, in ten categories you can narrowText, image0.70TriggerBasic
made_with_aiThe likelihood that a text or an image was generated by a model. ExperimentalText, image0.90ObserveAdvanced
lookalike_charactersLetters borrowed from another alphabet inside a word, and invisible characters, used to slip past filtersText0.50TriggerBasic
off_topicPolitics, religion and other subjects that do not belong on your platformText0.70TriggerBasic
gibberishKeyboard mash, word salad, filler and repetition in place of meaningful textText0.70TriggerBasic
instructionsWhat the template's AI instructions ask for, judged across all fieldsText, image0.70TriggerBasic
screenshotA screenshot of a phone, a desktop or an app uploaded in place of a photographImage0.70TriggerBasic
image_qualityBlurry, very dark, overexposed or very small imagesImage0.70TriggerBasic
watermarkVisible stock-photo watermarks and the watermarks of other platformsImage0.70TriggerBasic

Threshold, mode and tier

The three right-hand columns are defaults. A template can change the first two for its own content.

  • Threshold is the score from which the policy counts as flagged.
  • Mode says whether the policy decides anything. In Trigger mode it can flag the content or send it to review, and it counts for severity. In Observe mode it is scored and returned, and nothing more.
  • Tier says which plans can turn the policy on in a template.
LimitFreeStarterGrowthBusiness
Templates, per projectNot included520100
Advanced policiesNot includedNot includedIncludedIncluded

Policy options and instructions covers what a template can set for each policy, and Triggers covers what happens when one fires.

Policies that match a pattern

Most policies return a probability. Four look for a pattern instead: personal_data, links_contact, lookalike_characters and duplicate. Every wordlist does the same. Their score says what was found.

  • personal_data scores 0.75 for one match, 0.90 for two and 1.00 for three or more.
  • links_contact scores 0.90 for a URL or a messenger link, 0.85 for a social handle and 0.70 for steering off the platform when the template counts it. More than two matches add 0.10.
  • duplicate scores 0.70 when the same author posted the content before and 0.95 when another author did. For an image, which of the two you get is not reliable today.
  • lookalike_characters scores 0.70 or more for an invisible character and 0.50 or more for a word that mixes alphabets. The zero-width joiner counts as invisible, so an emoji built from several joined emoji scores 0.70 or more.

A match decides on its own. Any match triggers the policy whatever its threshold, and a match counts as at least 0.85 for severity. With the default weights, one URL is enough for triage to reject.

Made with AI

made_with_ai estimates whether a text or an image was generated by a model. It is experimental: read its score as a reason to look, not as proof.

  • Turning it on in a template adds it in Observe mode. It is scored and returned and decides nothing.
  • In Trigger mode its default weight of 0.60 keeps it under the reject line on its own. The most triage does with it is send the content to review.
  • A content rule can act on its score in either mode.
  • It needs a plan with advanced policies, and on images it adds one check for every image it scores. Checks has the arithmetic.

Labels

details can name what a policy found, in labels: insult, phone, same_author. The labels of a catalog row list the usual ones for that policy. Some labels come from a safety pass that runs beside the main scoring, and both sets can change.

Show labels to a moderator. Branch your code on recommendation and on scores.

In the dashboard

Open Policies and choose Pre-built policies. The catalog is listed by group, each policy with its tier, its default Threshold and Weight, an Experimental badge where it applies and a lock where your plan does not include it.

The catalog of pre-built policies, its first four groups: each policy with its key, the content types it reads, its default threshold and its weight.
Dashboard, Policies, Pre-built policiesThe catalog by group, with each policy's default threshold and weight.

The page is read only. You turn a policy on in a template, on its Policies tab.

The dashboard prints a name for each key. Two differ from what the key suggests: profanity is Swear words and gibberish is Meaningless text.

Next

Something missing or unclear on this page? Write to support@useinfrared.com.