Policy options and instructions
Decide how each policy behaves on a template: mode, threshold, effect and weight, guidance for the models, and the options four policies take.
The same policy means different things on different content. A phone number is a violation in a public listing and ordinary in a private message. Swearing is expected in a gaming chat and out of place in a product review.
A template says how each policy behaves on its content: whether it decides or only reports, from what score, with what weight, and what the models should know. You set this in the template editor, on the Policies tab. The API reads it back and does not write it.
What a template holds
curl https://api.useinfrared.com/v1/templates/listing \
-H "Authorization: Bearer $INFRARED_KEY"const response = await fetch("https://api.useinfrared.com/v1/templates/listing", {
headers: { Authorization: `Bearer ${process.env.INFRARED_KEY}` },
});
const template = await response.json();import os
import requests
response = requests.get(
"https://api.useinfrared.com/v1/templates/listing",
headers={"Authorization": f"Bearer {os.environ['INFRARED_KEY']}"},
)
template = response.json(){
"object": "template",
"id": "tpl_64mYq4nD3NXNfu0gcdaMZa",
"slug": "listing",
"name": "Listing",
"status": "active",
"version": 1,
"policies": [
{ "key": "toxicity", "mode": "trigger" },
{ "key": "links_contact", "mode": "trigger", "options": { "off_platform_phrases": true } },
{ "key": "lookalike_characters", "mode": "trigger", "effect": "review" },
{ "key": "duplicate", "mode": "trigger", "options": { "min_chars": 40, "window_days": 7 } },
{ "key": "made_with_ai", "mode": "trigger", "effect": "review", "threshold": 0.9 },
{ "key": "guideline/no-off-site-deals", "mode": "trigger" },
{ "key": "wordlist/competitors", "mode": "trigger" }
]
}Seven of the template's nineteen policies are shown. This template started from the Listing preset. It counts steering off the platform as a contact, sends lookalike characters to review, looks for duplicates among texts of 40 characters or more over 7 days, and sends content that looks generated to review from a score of 0.90.
Settings every policy takes
keystringRequiredA key of the catalog,
guideline/<slug>orwordlist/<slug>. A template lists a policy once.modestringDefaulttriggertrigger: the policy can flag the content or send it to review, and it counts for severity.observe: it is scored and returned, fires no trigger and adds nothing to severity.One of
triggerobservethresholdnumberThe score, from 0 to 1, from which the policy counts as flagged. Default: the catalog's threshold, or 0.70 for a guideline.
effectstringDefaultflagWhat the policy's own trigger does when it fires.
flagsetsflaggedto true.reviewturns an allow from triage into a review and leavesflaggedalone.One of
flagreviewweightnumberHow much the score counts for severity, from 0 to 1. Default: the catalog's weight, or 1 for a guideline or a wordlist.
instructionsstringGuidance for the models on how the policy applies to this content, 600 characters at most.
optionsobjectSettings that only this policy has. Four policies take options.
A policy with no trigger of its own anywhere in the template gets one from threshold and effect, for the whole submission. Triggers covers the explicit ones, per field or per template.
threshold does nothing for the policies that match a pattern: personal_data, links_contact, lookalike_characters, duplicate and every wordlist. Any match triggers them, and a match counts as at least 0.85 for severity. An effect of review changes flagged, not the outcome: one URL still reaches the reject line through triage. To soften a pattern policy, lower its weight, switch it to Observe, or let a content rule decide.
Instructions for the models
instructions is your guidance on how one policy applies to this kind of content, in plain language. The models read it next to the policy's own description.
{
"key": "profanity",
"mode": "trigger",
"weight": 0.5,
"instructions": "Colloquial swearing in the description is acceptable here. Flag abuse aimed at a person."
}personal_dataandlookalike_charactersare computed without a model, so instructions change nothing there.- Guidelines and wordlists take none. A guideline's own text is its instructions.
- To say what a whole submission should contain, write AI instructions for the template.
Options by policy
Four policies take options. An option you leave out keeps its default.
links_contact
allowed_domainsarray of stringsHosts that are not reported as links: up to 200, written bare, such as
example.com. They are added to the project's allowed domains.off_platform_phrasesbooleanDefaultfalseAlso counts steering to an outside channel that gives no value to act on: "write me on WhatsApp", "outside the platform". A plain "call me" never counts.
image_textstringDefaultevidenceWhat to do with contact details in text read from an image.
evidencereports them with a score of 0.30 at most and never triggers.flagtreats them like typed text.ignoreskips them.One of
evidenceflagignore
An allowed domain is matched by its exact host. With example.com allowed, https://www.example.com/item/1 is still reported, so list every host you link to. The list applies to the links found by pattern: the model that also scores this policy is not given it, and a link it reports still counts.
With off_platform_phrases on, naming a messenger is a match too, even in a sentence such as "I am mostly on Telegram these days".
personal_data
kindsarray of stringsWhich kinds count:
email,phone,iban,card,national_id,address. Default: every kind exceptaddress, so street addresses count only when you add it.image_textstringDefaultevidenceThe same three choices as for links, for personal data in text read from an image.
One of
evidenceflagignore
national_id recognises three formats today: the Kazakhstan IIN, the UK National Insurance number and the US Social Security number written with dashes.
illicit
categoriesarray of stringsThe categories that count:
drugs,prescription_meds,weapons,counterfeit,stolen_goods,money_laundering,gambling,pyramid_schemes,trafficking,adult_services. Default: all ten. Remove the ones your platform allows, such asgamblingwhere betting is legal. One must stay.
duplicate
window_daysintegerDefault7How far back to look, from 1 to 90 days.
min_charsintegerDefault20Texts shorter than this are never duplicates, so "ok" and "thanks" do not count. Images are not affected.
cross_authorbooleanDefaulttruefalsecounts only repeats by the same author. A request that names no author is then never a duplicate.
Three things to know before you rely on it:
- Results are cached for six hours and the cache is read first. An identical text sent again within six hours gets the first answer,
duplicateincluded. Turn Cache results off in Settings, Project where duplicates matter. - Moderations made with a test key are never counted as earlier copies.
- The editor shows 40 in the empty Ignore texts shorter than box. The default that applies is 20.
Allowed domains for the whole project
Open Settings, Project. Under Links and trust, add each host to Allowed domains and choose Save changes. The project's list applies to every template, together with what a template lists itself.
A change reaches content that was already screened once its cached result expires, six hours at most.
Set them in the template editor
Open the Policies tab
Open Templates, choose the template and open Policies. The catalog is listed by group. Your guidelines and wordlists come last, under Your guidelines and wordlists.
Turn a policy on and open its row
Turn a policy on with the switch at the start of its row. It is added in its default mode: Trigger, or Observe for Made with AI. Select the row to open its settings.
Switching a policy off also removes every trigger and rule condition that used it, and the editor says how many.
Set how it behaves
Mode, Threshold, Effect and Weight are the settings above. Instructions for the models takes the guidance. A policy with options shows them underneath: Allowed domains, Off-platform phrases and Contacts in images for links, Kinds for personal data, Categories for illicit goods, and Window, Ignore texts shorter than and Other authors count for duplicates.
Dashboard, TemplatesA policy row open on the Policies tab of a template. Save and publish
Save draft keeps the change in the draft. Publish version makes it live for every request that names the template. Versions covers what a draft is and how to go back.
Editing a template takes the Owner, Admin, Project admin or Developer role.
Next
- TriggersA trigger says what a policy's score sets off, a flag or a review, for the whole template or for one field. One of your own replaces the default.
- Content rulesOrdered rules on a template turn scores, author trust and field values into allow, review or reject. Severity triage decides when no rule matches.
- GuidelinesWrite a rule of your platform in plain language. Infrared scores every submission against it and returns the score as a policy of its own.
- WordlistsMatch your own terms, such as competitor names or banned phrases. A list's mode says whether a match is a violation, required or only reported.
Something missing or unclear on this page? Write to support@useinfrared.com.

