NSFW (not safe for work) policies cover content that’s inappropriate for general audiences — explicit material, graphic violence, profanity, and content related to self-harm.
Policies
id | Type | Supported | What it does |
|---|
sexual | classifier | text, image, video, audio | Sexually explicit or suggestive content. |
flirtation | classifier | text, audio | Compliments on looks, subtle innuendo, pickup lines, flirtatious behavior. Lighter than sexual. |
profanity | classifier | text, audio | Swearing, vulgar language, offensive words. |
violence | classifier | text, image, video, audio | Violent content, threats, or graphic violence. |
self_harm | classifier | text, image, video, audio | Self-harm, suicide, and eating-disorder content. |
Reading the result
const sexual = response.policies.find(p => p.id === "sexual");
if (sexual?.flagged) {
// Send to review queue or reject outright depending on threshold.
}
self_harm content often warrants a different response than other NSFW flags — for example, surfacing a support resource link rather than just rejecting the post. Use the recommendation.action plus the policy id to branch.
See Understanding API responses for the full response shape.