Content Safety
The Content Safety block screens a piece of text with AI-powered content safety and emits a verdict a workflow can branch on. Point it at any text in your workflow, and it reports whether that text reaches a harmful level and how severe each category is.
What it screens
The block checks the text against four categories of harmful content:
- Hate - hateful or discriminatory content
- Violence - violent or threatening content
- Sexual - sexual content
- Self-harm - content that encourages or depicts self-harm
Each category is scored on a severity scale from 0 to 7, where 0 is clean and 7 is the most severe.
Input
The block takes one text field. It supports {{ref}} references to earlier blocks, so you can screen a chat message, a trigger value, or the output of any upstream block. Use the reference picker in the field to insert a reference.
Threshold and categories
Two settings decide when the text is flagged:
- Flag threshold - the severity, from 0 to 7, at or above which a selected category counts as harmful. The default is 4.
- Categories - which of the four categories count toward the flagged result. All four are selected by default.
The text is flagged when any selected category reaches the threshold. A category you do not select never flags the text, but its severity is still reported in the verdict so you can branch on it yourself.
The verdict output
The block emits a typed verdict as its output:
{
"flagged": true,
"max_severity": 4,
"categories": { "Hate": 4, "Violence": 0, "Sexual": 2, "SelfHarm": 0 }
}flaggedis true when any selected category is at or above the threshold.max_severityis the highest severity across all four categories.categoriesalways reports the raw severity of all four categories, so you can branch on a single category even when it is not in the flagged set.
Branch on the verdict
The block always succeeds and reports the verdict. It never fails the run because content is flagged. Deciding what to do is your job: wire the block into a downstream Conditional and branch on the verdict, for example on {{safety.flagged}}, where safety is the reference name of your Content Safety block. One path handles clean text and the other handles flagged text.
For a hard stop when text is flagged, wire the flagged branch of the Conditional into a Stop and Error block, which ends the run with an error.
Pro and Business only
The Content Safety block is available on the Pro and Business tiers. A Free workspace that runs a workflow containing the block gets a 402 response with an upgrade hint. See Billing & Limits to upgrade.
Credit usage
The block uses credits per run, like any other block, and the amount scales with how much text is screened. A short check costs a fraction of a penny. The credit cost of each run is shown in the run trace and on your billing usage, in credits at the price you pay.
Next: Knowledge Base or Custom A2A