Knowledge base type. Max input: 510 characters (exceeding this prevents knowledge base matching). Contact ISHUMEI sales to enable. See Knowledge Base Types.
translationTargetLang
string
No
Translate input text to a target language. Contact ISHUMEI sales to enable. zh: Chinese. en: English.
acceptLang
string
No
Language for returned labels. zh: Chinese. en: English. Defaults to Chinese if not specified.
callback
string
No
Callback HTTP URL. When non-empty, the service sends moderation results to this URL.
Detection Types
Combine multiple types with underscores (e.g., TEXTRISK_FRAUD). Combined types take the union of detection capabilities.
Text to be moderated. Max 10,000 characters per request (error returned if exceeded). If the nickname field is also provided, both text and nickname content are validated simultaneously.
relateText
string
No
Associated text for moderation. Max 128 characters (truncated if exceeded). When provided, it is reviewed in combination with text.
tokenId
string
Yes
User account identifier. Recommended to use your user UID (can be encrypted). Used for behavioral risk detection (spam, advertising, etc.). Must be an alphanumeric string with underscores and hyphens, up to 64 characters.
lang
string
No
Language of the text. Default: zh. For domestic clusters, omit or use zh. For international text that cannot be categorized, use auto for automatic language detection. See Supported Languages.
nickname
string
No
User nickname. Validates nickname content for risks. Max 150 characters (truncated if exceeded).
ip
string
No
Public IPv4 or IPv6 address of the user who sent the text.
Message receiver's tokenId for private chat scenarios. Alphanumeric with underscores and hyphens, up to 64 characters. Required when eventId is message.
topic
string
No
Topic ID, book review section ID, or forum post ID. When eventId is article, this field is strongly recommended to enable context recognition. Without it, context cannot be associated.
atId
string
No
tokenId of the @mentioned user in group chat scenarios. Alphanumeric with underscores and hyphens, up to 64 characters. Required when eventId is groupChat.
room
string
No
Live room / game room ID. When eventId is groupChat, this field is strongly recommended to enable context recognition. Without it, context cannot be associated.
sex
int
No
User gender. 0: male. 1: female. 2: unknown.
passThrough
json
No
Pass-through field. Content is returned as-is with the response.
Supported Languages
Value
Language
zh
Chinese (default)
en
English
ar
Arabic
hi
Hindi
es
Spanish
fr
French
ru
Russian
pt
Portuguese
id
Indonesian
de
German
ja
Japanese
tr
Turkish
vi
Vietnamese
it
Italian
th
Thai
tl
Filipino
ko
Korean
ms
Malay
auto
Automatic language detection
Response
Response Parameters
ℹ️
Parameters other than code, message, and requestId are only guaranteed to be returned when code is 1100.
Whether this is the final result. 1: final result (can be used directly for downstream processing). 0: intermediate result (machine moderation; human review will follow).
resultType
int
Yes
Current result stage. 0: machine moderation. 1: human moderation.
disposal
json_object
No
Custom disposition and mapping result. Returned only when a custom label system is configured. See disposal Object.
Response Codes
Code
Message
1100
Success
1901
QPS limit exceeded
1902
Invalid parameters
1903
Service failure
1905
Character count exceeded
9101
Unauthorized operation
riskDetail Object
Parameter
Type
Required
Description
matchedLists
json_array
No
Matched custom list information.
matchedLists[].name
string
No
Name of the matched list.
matchedLists[].words
json_array
No
Matched sensitive word details.
matchedLists[].words[].word
string
No
The matched sensitive word.
matchedLists[].words[].position
int_array
No
Position of the sensitive word.
riskSegments
json_array
No
High-risk content segments. Present when political, terrorism, prohibited, or advertising law content is detected.
riskSegments[].segment
string
No
High-risk content segment text.
riskSegments[].position
int_array
No
Position of the high-risk segment.
auxInfo Object
Parameter
Type
Required
Description
filteredText
string
No
Text with risky segments replaced by asterisks (*).
passThrough
json_object
No
Pass-through field. Same value as data.extra.passThrough in the request.
contactResult
json_array
No
Contact information detection results, including WeChat, QQ, and phone numbers.
Both tokenProfileLabels and tokenRiskLabels share the same structure:
Parameter
Type
Required
Description
label1
string
No
Level 1 label.
label2
string
No
Level 2 label.
label3
string
No
Level 3 label.
description
string
No
Label description.
timestamp
int
No
Label timestamp. 13-digit Unix timestamp in milliseconds.
langResult Object
Parameter
Type
Required
Description
detectedLang
string
No
Language detection result. Returned when lang is set to auto on an international text product. Value is a standard language code (e.g., zh, en, ar).
translatedText
string
No
Translation result. Returned when translationTargetLang is provided in the request.
kbDetail Object
Parameter
Type
Required
Description
qlabel
string
Yes
Question label. UNKNOWN: no match. CANNOT_ASK: question is not allowed. EXACTNESS: answer must be accurate (including stance). POSITIVE: answer must contain positive guidance. PENDING: temporary answer for streaming queries.
answer
string
Yes
Suggested answer. Provided when qlabel is EXACTNESS or POSITIVE.
isEnd
bool
Yes
Whether the full answer has been returned.
hasAnswer
int
Yes
Whether an answer is available. 0: no suggested answer. 1: suggested answer available. 2: streaming query needed. Default: 0.
disposal Object
Returned only when a custom label system is configured with ISHUMEI. ISHUMEI can return results aligned with your company's custom label system and identifiers.
Parameter
Type
Required
Description
riskLevel
string
Yes
Mapped disposition recommendation. If rule labels do not map, the default recommendation is returned.
riskLabel1
string
Yes
Mapped level 1 risk label. Returns normal when unmapped and riskLevel is PASS.
riskLabel2
string
Yes
Mapped level 2 risk label. Empty when unmapped and riskLevel is PASS.
riskLabel3
string
Yes
Mapped level 3 risk label. Empty when unmapped and riskLevel is PASS.
riskDescription
string
Yes
Mapped risk description. Returns "Normal" when riskLevel is PASS.