Sensitive Word Detection

Sensitive Word Detection (Fast)

0calls
1 credits / call

When you need to filter content that is not suitable for display in your community or application, this endpoint can help you quickly complete the detection.

POST
uapis.cn
/api/v1/text/profanitycheck
Body
text
string
required

Text content to be detected. Supports simplified and traditional Chinese. Maximum 256KB per request (measured in UTF-8 bytes; ~87k Chinese characters), oversized text returns 413.

Overview

This endpoint can identify sensitive words in text and return whether they are hit, list of hit words and other results, suitable for comment sections, communities, forums and content publishing scenarios.

Key Features

  • Fast Detection: Can process multiple hits in a whole paragraph of text at once
  • Simplified/Traditional Support: Supports simplified Chinese, traditional Chinese and mixed text detection
  • Intuitive Results: Returns clear detection results, convenient for direct integration into review processes
  • Stable Response: Suitable for daily content moderation and batch checking scenarios

Whether it's a forum, social platform or comment system, this endpoint can help you quickly build content moderation functionality.

Request body

JSON object containing the text 'text' to be detected

text
stringrequired

Text content to be detected. Supports simplified and traditional Chinese. Maximum 256KB per request (measured in UTF-8 bytes; ~87k Chinese characters), oversized text returns 413.

Response

200 / OK

Success response

JSON
{
  "status": "forbidden",
  "original_text": "Pretend it's a prohibited word",
  "masked_text": "Pretend it's a masked word",
  "forbidden_words": [
    "string"
  ]
}

400 / Bad Request

Request body is invalid or text is empty

JSON
{
  "code": "INVALID_ARGUMENT",
  "details": {},
  "message": "Request body is invalid or text is empty."
}

413 /

Text exceeds the size limit (maximum 256KB per request)

JSON
{
  "error": "Text exceeds maximum length of 256KB"
}