Moderations
A moderation is one moderated object and its result: a verdict (flagged), a recommendation (allow, review or reject) and a score from 0 to 1 for every policy the template runs. A whole form produces one parent moderation and one moderation per content field.
Endpoints
- GET/v1/moderationsList moderations
- POST/v1/moderationsCreate a moderation
- POST/v1/moderations/batchCreate a batch
- GET/v1/moderations/{id}Retrieve a moderation
- POST/v1/moderations/{id}/remoderateRe-moderate
The moderation object
One moderated object and its result. A form is one parent moderation of the type form with one moderation per content field under fields.
{
"object": "moderation",
"id": "mod_20KilKON2Z1Lf75c7AXP6m",
"template": {
"slug": "review",
"version": 1
},
"type": "text",
"status": "completed",
"flagged": true,
"recommendation": "reject",
"severity": "critical",
"policies": {
"personal_data": 0,
"lookalike_characters": 0,
"profanity": 0,
"hate_speech": 0,
"toxicity": 0.98,
"violence": 0,
"self_harm": 0,
"sexual": 0,
"spam": 0,
"links_contact": 0,
"illicit": 0,
"gibberish": 0,
"off_topic": 0,
"made_with_ai": 0,
"instructions": 1
},
"triggered": ["toxicity", "instructions"],
"rule": null,
"reasons": [
"trigger:toxicity:flag",
"trigger:instructions:flag",
"triage:reject"
],
"details": {
"toxicity": {
"labels": ["insult"],
"matches": [
{
"label": "insult",
"value": "Worst seller ever. You are a complete idiot."
}
]
},
"instructions": {
"labels": ["confidence:100"],
"matches": [
{
"label": "evidence",
"value": "You are a complete idiot.",
"field": "input"
}
],
"explanation": "The review contains personal attacks against the seller rather than focusing on the product or service, which violates the policy against personal attacks.",
"field": "input"
}
},
"author": null,
"language": "en",
"usage": {
"checks": 1,
"cached": false
},
"latency_ms": 2184,
"dry_run": false,
"content_id": null,
"context_id": null,
"metadata": null,
"created_at": "2026-10-08T09:28:34.691Z",
"completed_at": "2026-10-08T09:28:37.066Z"
}Attributes
object"moderation"Always
moderation.idstringId of the moderation:
mod_plus 22 base62 characters. Null in the result of a template test.templateobject or nullThe template the moderation ran on.
slugstringSlug of the template.
basicis the built-in basic check.versionintegerNumber of the template version that ran. Versions start at 1 and every publish adds one.
typeenumtext,imageorform.audioandvideoare in development and are never returned.One of
textimageaudiovideoformfieldstringKey of the template field this object is. Present on a form's field moderations and on single objects sent with
field; absent otherwise.statusenumscreening: queued or running.completed: every policy answered.partial: at least one policy failed and the others stand.invalid: the submission failed the template's validation.failed: the run itself failed and no check was consumed.One of
screeningcompletedpartialfailedinvalidflaggedbooleanThe verdict: true when at least one trigger with the
flageffect fired, or when validation failed. It is separate fromrecommendation: a content rule can allow a flagged moderation.recommendationenum or nullWhat to do with the content:
allow,revieworreject. It comes from the first matching content rule, else from severity triage, and is then adjusted byclient_action. Null while the status isscreeningand on a failed moderation.One of
allowreviewrejectseverityenum or nullnone,low,medium,highorcritical, from the highest weighted policy score:mediumfrom the template's review threshold (default 0.40),highfrom its reject threshold (default 0.80) andcriticalfrom 0.95.nonefor an invalid submission. Null while screening and on a failed moderation.One of
nonelowmediumhighcriticalpoliciesmapThe score of every policy the template runs, from 0 (clean) to 1 (certain violation), keyed by policy key and rounded to two decimals. For a form, the highest score of each policy across its fields. Guidelines and wordlists appear as
guideline/<slug>andwordlist/<slug>. A policy that does not apply to the content type scores 0. Empty while screening.triggeredarray of stringsKeys of the policies whose trigger fired.
ruleobject or nullThe content rule that decided the recommendation, or null when severity triage decided.
idstringId of the rule within the template, for example
r4.namestringName of the rule.
actionenumThe rule's outcome:
allow,revieworreject.One of
allowreviewreject
reasonsarray of stringsThe path to the decision, in order, as strings:
trigger:<policy>:<effect>(with@<field>after the policy for a field trigger),rule:<id>,triage:<recommendation>,review_trigger,client_action:<action>:<recommendation>,partial:<policies>,partial_reviewandvalidation_failed.detailspolicy details objectEvidence per policy, as an object keyed by policy key. A policy has an entry only when it produced labels, matches or an explanation, came from the result cache, or failed. On the parent of a form it covers the AI instructions and the guidelines; the evidence of each field is under that field's own moderation. Absent while screening.
labelsarray of stringsSub-labels the policy assigned, for example
phoneforpersonal_data,urlforlinks_contactorinsultfortoxicity.matchesarray of mapsThe pieces of evidence. Every item has a
labeland usually avalue, the matched or quoted text. Pattern policies addstartandend, character offsets in the normalised text; wordlists addterm,canonicalandsimilarity; quotes from a model addreason.canonical_termstringFor a wordlist, the canonical spelling of the first matched term, for example
tradelywhen the text saidtr4dely.masked_outputstringFor
personal_data, the text with every match masked, for examplecall +44***23.explanationstringA short explanation from the model: why a guideline or the AI instructions scored as they did, or a one-line description of an image.
fieldstringKey of the template field the result belongs to.
cachedbooleanTrue when the result came from the result cache. Absent otherwise.
errorstringWhy the policy could not be scored. Present only when the policy failed, in which case the moderation's
statusispartial.
validation_errorsarray of objectsWhy validation failed. Present only when it did.
fieldstringKey of the field at fault. For a single object it is
inputorfield, or null for an image sent withoutfield.codestringrequired,type,min_length,max_length,numeric,pattern,enum,min,max,min_items,max_items,url,unknown_fieldortype_mismatch.messagestringA sentence that names the field and the rule, for example
Title must be at least 10 characters.urlOn the moderation of a form's image field: the URL of the image the entry is about, in place of
field. Such an entry reports an image that could not be fetched or that broke the field's size limits, with a code such asfetch_failed,too_large,unsupported_type,max_bytesordimensions, and does not make the moderation invalid.
authorobject or nullThe author as the decision saw them. Null when the request had no
author_id.idstring or nullId of the author:
aut_plus 22 base62 characters. Null in a template test when the author does not exist.external_idstringYour id for the author.
statusenumThe author's status when the decision was made:
enabled,suspendedorblocked. A suspension past its end date reads asenabled. Not included in list items.One of
enabledsuspendedblockedtrust_levelenumThe author's effective trust level when the decision was made. Not included in list items.
One of
newbasicregularestablishedtrustedknownAlways true when present: the author record existed when the decision was made. Not included in list items.
languagestring or nullISO 639-1 code of the content's main language, for example
en. Null for images, and for text of fewer than 12 letters when the template has no language hint.usageobjectWhat the moderation cost.
checksintegerChecks consumed: one per object, one more per image, plus the check weight of each advanced policy the template enables. 0 for test keys, template tests and invalid submissions.
cachedbooleanTrue when every policy result came from the result cache. Such a moderation is charged a quarter of its checks, rounded up.
estimatedTemplate tests only: the checks a live request with the same content would consume.
latency_msinteger or nullTime the pipeline took, in milliseconds. Time spent waiting in the queue is not included. Null while screening.
dry_runbooleanTrue when the request asked for a dry run or the project runs in dry run. Do not enforce the recommendation of a dry run.
testbooleanTrue for a moderation made with a test key or by a template test. Absent otherwise.
content_idstring or nullYour id for the object, or null.
context_idstring or nullYour id for the conversation, order or other context, or null.
metadataobject or nullThe metadata sent with the request, or null. Removed after the retention period.
fieldsmapForms only: one moderation per text or image field that had a value, keyed by field key. Number, boolean, enum, url and json fields are validated and readable by content rules, and have no entry.
created_attimestampWhen the moderation was created, ISO 8601 in UTC.
completed_attimestamp or nullWhen the result was ready, ISO 8601 in UTC. Null while screening.
parent_idOn a form's field moderation: id of the parent moderation.
errorOn a failed moderation: an object with
codeandmessage.
Something missing or unclear on this page? Write to support@useinfrared.com.