Skip to content

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"
200 OK, trimmedJSON
{
  "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

keystringRequired

A key of the catalog, guideline/<slug> or wordlist/<slug>. A template lists a policy once.

modestringDefault trigger

trigger: 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 oftriggerobserve

thresholdnumber

The score, from 0 to 1, from which the policy counts as flagged. Default: the catalog's threshold, or 0.70 for a guideline.

effectstringDefault flag

What the policy's own trigger does when it fires. flag sets flagged to true. review turns an allow from triage into a review and leaves flagged alone.

One offlagreview

weightnumber

How much the score counts for severity, from 0 to 1. Default: the catalog's weight, or 1 for a guideline or a wordlist.

instructionsstring

Guidance for the models on how the policy applies to this content, 600 characters at most.

optionsobject

Settings 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.

A policy with instructions and a lower weightJSON
{
  "key": "profanity",
  "mode": "trigger",
  "weight": 0.5,
  "instructions": "Colloquial swearing in the description is acceptable here. Flag abuse aimed at a person."
}
  • personal_data and lookalike_characters are 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.

allowed_domainsarray of strings

Hosts 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_phrasesbooleanDefault false

Also 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_textstringDefault evidence

What to do with contact details in text read from an image. evidence reports them with a score of 0.30 at most and never triggers. flag treats them like typed text. ignore skips them.

One ofevidenceflagignore

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 strings

Which kinds count: email, phone, iban, card, national_id, address. Default: every kind except address, so street addresses count only when you add it.

image_textstringDefault evidence

The same three choices as for links, for personal data in text read from an image.

One ofevidenceflagignore

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 strings

The 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 as gambling where betting is legal. One must stay.

duplicate

window_daysintegerDefault 7

How far back to look, from 1 to 90 days.

min_charsintegerDefault 20

Texts shorter than this are never duplicates, so "ok" and "thanks" do not count. Images are not affected.

cross_authorbooleanDefault true

false counts 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, duplicate included. 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.

The Links and trust section of a project's settings: one allowed domain, acme.example.com, and the trust rules folded under it.
Dashboard, Settings, ProjectLinks and trust in a project's settings, with one allowed host.

A change reaches content that was already screened once its cached result expires, six hours at most.

Set them in the template editor

  1. 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.

  2. 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.

  3. 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.

    The Policies tab of a template with the Toxicity policy open: its mode, threshold, effect and weight, the switch for its template-level trigger, and its instructions.
    Dashboard, TemplatesA policy row open on the Policies tab of a template.
  4. 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

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