Profanity Filter

Detect and censor profanity in text. Returns a censored copy of the input and the list of flagged words found.

Get API Key

Vue d'ensemble

Cas d'utilisation

  • User-generated content moderation
  • Chat and comment filtering
  • Forum and community platforms
  • Child-safe application layers

Fonctionnalités

Case-insensitive detection
Censors flagged words with asterisks
Returns deduplicated list of flagged words
Preserves surrounding punctuation and whitespace

Points de terminaison de l'API

Check Profanity

Checks text for profanity, returning a censored version and the list of flagged words.

POST
https://requiems.xyz/v1/validation/profanity

Paramètres

Nom Type Requis Description
text string Requis The text to check for profanity.

Essayez-le

Démo en direct
Requête

The text to check for profanity.

Champs de réponse

Champ Type Description
has_profanity boolean Whether any profanity was detected in the text
censored string The input text with profane words replaced by asterisks
flagged_words array<string> Deduplicated list of profane words found (lowercase)

Exemples de code

curl -X POST https://requiems.xyz/v1/validation/profanity \
  -H "requiems-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "Some text to check"}'

Réponses d'erreur

validation_failed

The text field is missing or empty.

bad_request

The request body is missing or malformed.

internal_error

Unexpected server error.

Batch Check Profanity

Check up to 50 texts for profanity in a single request. Results are returned in input order.

POST
https://requiems.xyz/v1/validation/profanity/batch

Paramètres

Nom Type Requis Description
texts array<string> Requis List of texts to check (1–50 items, each non-empty).

Essayez-le

Démo en direct
Requête

List of texts to check (1–50 items, each non-empty).

Champs de réponse

Champ Type Description
results array<object> Per-item results in input order.
results[].text string The original text that was checked.
results[].result.has_profanity boolean Whether any profanity was detected.
results[].result.censored string Text with profane words replaced by asterisks.
results[].result.flagged_words array<string> Deduplicated list of detected profane words (lowercase).
total integer Total number of items processed.

Exemples de code

curl -X POST https://requiems.xyz/v1/validation/profanity/batch \
  -H "requiems-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"texts": ["hello world", "some bad word here"]}'

Réponses d'erreur

validation_failed

The texts array is missing, empty, or exceeds 50 items.

bad_request

The request body is missing or malformed.

Foire aux questions