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.
{
"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.keystringThe key under
policiesin a moderation, for exampletoxicity,guideline/<slug>orwordlist/<slug>.namestringDisplay name.
groupstringThe catalog group:
toxicity_hate,profanity,violence_self_harm,sexual,personal_data,spam_links,illicit,made_with_ai,lookalike,off_topic,image_quality,advancedorcustom.enginestringHow the score is produced:
regex,wordlist,hash,classifier,llm,visionortranscription.tierenumbasic: 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 of
basicadvancedcustommodalitiesarray of stringsThe content types the policy scores:
text,imageor both.audioandvideoappear only on policies that are in development.check_weightnumberChecks 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_thresholdnumberScore 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,duplicateand wordlists) count as flagged on any match, whatever the threshold.0 to 1.
default_modeenumtrigger: the policy can flag and affect the recommendation.observe: it is scored and returned only. A template can change the mode.One of
triggerobservelabelsarray of stringsThe sub-labels the policy can assign, as they appear under
detailsin a moderation.experimentalbooleanTrue for a policy whose results are not reliable enough to enforce. Such a policy observes by default.
supportedbooleanFalse for a policy that is in the catalog and still in development. It is never scored.
descriptionstringWhat the policy scores, in one or two sentences. Catalog entries only.
weightintegerSeverity weight from 0 to 1: the score is multiplied by it before severity triage. A template can change it. Catalog entries only.
enabledGuideline and wordlist entries only: whether the guideline or wordlist is enabled.
modeWordlist entries only: the mode of the wordlist,
block,requireorcollect.
Something missing or unclear on this page? Write to support@useinfrared.com.