Skip to content

Policies

A policy is a scoring category. Every policy a template runs returns a score from 0 to 1 under policies in a moderation; this list holds the pre-built catalog and the project's guidelines and wordlists.

Endpoints

The policy object

A scoring category. Catalog policies carry every property; the entries for guidelines and wordlists carry object, key, name, group, engine, tier, modalities and enabled only.

The policy objectJSON
{
  "object": "policy",
  "key": "toxicity",
  "name": "Toxicity",
  "description": "Insults, harassment, threats and demeaning language aimed at a person or group.",
  "group": "toxicity_hate",
  "modalities": ["text"],
  "engine": "classifier",
  "tier": "basic",
  "check_weight": 1,
  "weight": 1,
  "default_threshold": 0.7,
  "default_mode": "trigger",
  "labels": ["insult", "harassment", "threat"],
  "experimental": false,
  "supported": true
}

Attributes

object"policy"

Always policy.

keystring

The key under policies in a moderation, for example toxicity, guideline/<slug> or wordlist/<slug>.

namestring

Display name.

groupstring

The catalog group: toxicity_hate, profanity, violence_self_harm, sexual, personal_data, spam_links, illicit, made_with_ai, lookalike, off_topic, image_quality, advanced or custom.

enginestring

How the score is produced: regex, wordlist, hash, classifier, llm, vision or transcription.

tierenum

basic: on every plan. advanced: can be enabled on a template only on a plan with advanced policies, and adds checks. custom: a guideline or a wordlist.

One ofbasicadvancedcustom

modalitiesarray of strings

The content types the policy scores: text, image or both. audio and video appear only on policies that are in development.

check_weightnumber

Checks an advanced policy adds to a moderation; a vision policy adds this amount per image. Basic policies add nothing whatever their weight: the base check of the moderation covers them.

default_thresholdnumber

Score from which the policy counts as flagged when the template sets no threshold of its own. Policies that work by matching (personal_data, links_contact, lookalike_characters, duplicate and wordlists) count as flagged on any match, whatever the threshold.

0 to 1.

default_modeenum

trigger: the policy can flag and affect the recommendation. observe: it is scored and returned only. A template can change the mode.

One oftriggerobserve

labelsarray of strings

The sub-labels the policy can assign, as they appear under details in a moderation.

experimentalboolean

True for a policy whose results are not reliable enough to enforce. Such a policy observes by default.

supportedboolean

False for a policy that is in the catalog and still in development. It is never scored.

descriptionstring

What the policy scores, in one or two sentences. Catalog entries only.

weightinteger

Severity weight from 0 to 1: the score is multiplied by it before severity triage. A template can change it. Catalog entries only.

enabled

Guideline and wordlist entries only: whether the guideline or wordlist is enabled.

mode

Wordlist entries only: the mode of the wordlist, block, require or collect.

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