Every API here is available over the APIs.io API and to AI agents over MCP.
{
"openapi": "3.1.0",
"info": {
"title": "Unprofane API",
"version": "1.0.0",
"description": "A profanity and toxicity API that is hard to fool: one call answers whether a text can be shown (profanity, insults, slurs, threats, sexual content, sexual content involving a minor, which every policy blocks, and rudeness and the writer's own self-harm, which a standard policy holds for review), with the evidence (which words, where, how they were disguised, how severe), a one-sentence reason and a censored version. The rules read every text at the edge. In balanced mode, the default, the model also reads every text but a word or two the rules block outright; fast mode keeps a check on the rules alone. Every response says which answered. A byte-compatible drop-in for Google's Perspective API at `/v1alpha1/comments:analyze`: the same request, response and error envelope, the key accepted as `?key=`. Texts the model reads are kept for 90 days to improve the engine, with no account, key or sender's address; no log holds one.",
"contact": {
"email": "hello@unprofane.com",
"url": "https://unprofane.com/docs/"
},
"x-limits": {
"maxTextChars": 10000,
"maxUsernameChars": 64,
"maxBatchItems": 100,
"maxRequestChars": 30000
}
},
"servers": [
{
"url": "https://api.unprofane.com"
}
],
"security": [
{
"bearer": []
}
],
"components": {
"securitySchemes": {
"bearer": {
"type": "http",
"scheme": "bearer",
"description": "An API key: up_live_… (billed, needs a plan), up_test_… (free, capped daily) or up_pk_… (publishable, browsers, /v1/check only, needs a plan)."
}
},
"schemas": {
"CheckRequest": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"text": {
"type": "string",
"minLength": 1,
"maxLength": 10000
},
"context": {
"default": "general",
"type": "string",
"enum": [
"general",
"username",
"display_name",
"comment",
"chat",
"gaming",
"educational",
"creative",
"review",
"custom_text"
]
},
"policy": {
"default": "standard",
"anyOf": [
{
"type": "string",
"enum": [
"kids",
"teen",
"standard",
"strict",
"casual"
]
},
{
"type": "string",
"pattern": "^pol_[A-Za-z0-9]{8,32}$"
},
{
"type": "object",
"properties": {
"mild_profanity": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
},
"profanity": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
},
"sexual": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
},
"insult": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
},
"slur": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
},
"threat": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
},
"rude": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
},
"sexual_minors": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
},
"self_harm": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
},
"reserved": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
}
},
"additionalProperties": false
}
]
},
"mode": {
"default": "balanced",
"type": "string",
"enum": [
"fast",
"balanced",
"thorough"
]
},
"language": {
"default": "auto",
"type": "string",
"enum": [
"auto",
"en",
"es",
"pt",
"fr",
"de",
"it",
"nl",
"pl",
"tr",
"ru",
"ar",
"he",
"hi",
"id",
"ja",
"zh",
"ko"
]
},
"country": {
"type": "string",
"pattern": "^[A-Za-z]{2}$"
},
"mask": {
"default": "asterisk",
"type": "string",
"enum": [
"asterisk",
"first_letter",
"grawlix",
"remove"
]
},
"engine": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"lists": {
"type": "object",
"properties": {
"allow": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 64
}
},
"block": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 64
}
}
},
"additionalProperties": false
}
},
"required": [
"text"
],
"additionalProperties": false
},
"CheckResponse": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^chk_[A-Za-z0-9]{16,32}$"
},
"allowed": {
"type": "boolean"
},
"action": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
},
"score": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"severity": {
"type": "string",
"enum": [
"none",
"mild",
"moderate",
"strong",
"extreme"
]
},
"categories": {
"type": "object",
"properties": {
"mild_profanity": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"profanity": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"sexual": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"insult": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"slur": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"threat": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"rude": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"sexual_minors": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"self_harm": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"reserved": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"mild_profanity",
"profanity",
"sexual",
"insult",
"slur",
"threat",
"rude",
"sexual_minors",
"self_harm",
"reserved"
],
"additionalProperties": false
},
"obfuscated": {
"type": "boolean"
},
"evasion": {
"type": "array",
"items": {
"type": "string",
"enum": [
"homoglyph",
"zero_width",
"separator",
"leetspeak",
"repeated_chars",
"diacritics",
"mixed_script",
"fullwidth",
"combining_marks",
"phonetic",
"reversed",
"concatenation",
"case_mixing",
"self_censored",
"misspelled",
"spoonerism",
"pun"
]
}
},
"matches": {
"type": "array",
"items": {
"type": "object",
"properties": {
"start": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"end": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"text": {
"type": "string"
},
"normalized": {
"type": "string"
},
"term_id": {
"type": "string"
},
"category": {
"type": "string",
"enum": [
"profanity",
"sexual",
"insult",
"slur",
"threat",
"reserved"
]
},
"severity": {
"type": "string",
"enum": [
"none",
"mild",
"moderate",
"strong",
"extreme"
]
},
"evasion": {
"type": "array",
"items": {
"type": "string",
"enum": [
"homoglyph",
"zero_width",
"separator",
"leetspeak",
"repeated_chars",
"diacritics",
"mixed_script",
"fullwidth",
"combining_marks",
"phonetic",
"reversed",
"concatenation",
"case_mixing",
"self_censored",
"misspelled",
"spoonerism",
"pun"
]
}
}
},
"required": [
"start",
"end",
"text",
"normalized",
"term_id",
"category",
"severity",
"evasion"
],
"additionalProperties": false
}
},
"censored": {
"type": "string"
},
"reason": {
"type": "string"
},
"decided_by": {
"type": "array",
"items": {
"type": "object",
"properties": {
"category": {
"type": "string",
"enum": [
"mild_profanity",
"profanity",
"sexual",
"insult",
"slur",
"threat",
"rude",
"sexual_minors",
"self_harm",
"reserved"
]
},
"action": {
"type": "string",
"enum": [
"review",
"block"
]
},
"from": {
"type": "string",
"enum": [
"words",
"context"
]
}
},
"required": [
"category",
"action",
"from"
],
"additionalProperties": false
}
},
"language": {
"type": "object",
"properties": {
"detected": {
"type": "string"
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"detected",
"confidence"
],
"additionalProperties": false
},
"engine": {
"type": "object",
"properties": {
"version": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"route": {
"type": "string",
"enum": [
"rules",
"model",
"cache"
]
},
"degraded": {
"type": "boolean"
}
},
"required": [
"version",
"route",
"degraded"
],
"additionalProperties": false
},
"timing_ms": {
"type": "number",
"minimum": 0
}
},
"required": [
"id",
"allowed",
"action",
"score",
"severity",
"categories",
"obfuscated",
"evasion",
"matches",
"censored",
"reason",
"decided_by",
"language",
"engine",
"timing_ms"
],
"additionalProperties": false
},
"BatchRequest": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"items": {
"minItems": 1,
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"text": {
"type": "string",
"minLength": 1,
"maxLength": 10000
},
"context": {
"type": "string",
"enum": [
"general",
"username",
"display_name",
"comment",
"chat",
"gaming",
"educational",
"creative",
"review",
"custom_text"
]
},
"policy": {
"anyOf": [
{
"type": "string",
"enum": [
"kids",
"teen",
"standard",
"strict",
"casual"
]
},
{
"type": "string",
"pattern": "^pol_[A-Za-z0-9]{8,32}$"
},
{
"type": "object",
"properties": {
"mild_profanity": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
},
"profanity": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
},
"sexual": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
},
"insult": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
},
"slur": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
},
"threat": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
},
"rude": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
},
"sexual_minors": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
},
"self_harm": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
},
"reserved": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
}
},
"additionalProperties": false
}
]
}
},
"required": [
"id",
"text"
],
"additionalProperties": false
}
},
"context": {
"default": "general",
"type": "string",
"enum": [
"general",
"username",
"display_name",
"comment",
"chat",
"gaming",
"educational",
"creative",
"review",
"custom_text"
]
},
"policy": {
"default": "standard",
"anyOf": [
{
"type": "string",
"enum": [
"kids",
"teen",
"standard",
"strict",
"casual"
]
},
{
"type": "string",
"pattern": "^pol_[A-Za-z0-9]{8,32}$"
},
{
"type": "object",
"properties": {
"mild_profanity": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
},
"profanity": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
},
"sexual": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
},
"insult": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
},
"slur": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
},
"threat": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
},
"rude": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
},
"sexual_minors": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
},
"self_harm": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
},
"reserved": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
}
},
"additionalProperties": false
}
]
},
"mode": {
"default": "balanced",
"type": "string",
"enum": [
"fast",
"balanced",
"thorough"
]
},
"language": {
"default": "auto",
"type": "string",
"enum": [
"auto",
"en",
"es",
"pt",
"fr",
"de",
"it",
"nl",
"pl",
"tr",
"ru",
"ar",
"he",
"hi",
"id",
"ja",
"zh",
"ko"
]
},
"country": {
"type": "string",
"pattern": "^[A-Za-z]{2}$"
},
"mask": {
"default": "asterisk",
"type": "string",
"enum": [
"asterisk",
"first_letter",
"grawlix",
"remove"
]
},
"engine": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"lists": {
"type": "object",
"properties": {
"allow": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 64
}
},
"block": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 64
}
}
},
"additionalProperties": false
}
},
"required": [
"items"
],
"additionalProperties": false
},
"BatchResponse": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"results": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"result": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^chk_[A-Za-z0-9]{16,32}$"
},
"allowed": {
"type": "boolean"
},
"action": {
"type": "string",
"enum": [
"allow",
"review",
"block"
]
},
"score": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"severity": {
"type": "string",
"enum": [
"none",
"mild",
"moderate",
"strong",
"extreme"
]
},
"categories": {
"type": "object",
"properties": {
"mild_profanity": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"profanity": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"sexual": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"insult": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"slur": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"threat": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"rude": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"sexual_minors": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"self_harm": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"reserved": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"mild_profanity",
"profanity",
"sexual",
"insult",
"slur",
"threat",
"rude",
"sexual_minors",
"self_harm",
"reserved"
],
"additionalProperties": false
},
"obfuscated": {
"type": "boolean"
},
"evasion": {
"type": "array",
"items": {
"type": "string",
"enum": [
"homoglyph",
"zero_width",
"separator",
"leetspeak",
"repeated_chars",
"diacritics",
"mixed_script",
"fullwidth",
"combining_marks",
"phonetic",
"reversed",
"concatenation",
"case_mixing",
"self_censored",
"misspelled",
"spoonerism",
"pun"
]
}
},
"matches": {
"type": "array",
"items": {
"type": "object",
"properties": {
"start": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"end": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"text": {
"type": "string"
},
"normalized": {
"type": "string"
# --- truncated at 32 KB (65 KB total) ---
# Full source: https://artifacts.apis.io/unprofane-com/openapi/_original/unprofane-com-api-openapi.json