Batch Check
Update:
Submit up to 100 texts for synchronous moderation.
POSThttps://tsafe.ilivedata.com/api/v2/text/batchCheck
Results are returned in checkResults, with an individual errorCode for each item.
Request Parameters
Request Headers
All headers below are required.
Header
Value
Description
Content-Type
application/json; charset=UTF-8
Request body format
Accept
application/json; charset=UTF-8
Response format
X-AppId
—
Project ID from Console → Service Configuration
X-TimeStamp
—
UTC time when the request is sent, in W3C format.
Format example: 2026-09-30T02:30:00Z. Use the current time for actual requests.
Authorization
—
See Request Signature below
Request Body
When contents[].strategyId is omitted, the DEFAULT policy is used.
Parameter
Type
Required
Description
contents
Array
Required
batch check content items, max count:100
contents[].id
String
Optional
Uniquely identifies for item
contents[].content
String
Required
The text to be detected. This text is UTF-8 encoded strings with no more than 2048 characters.
contents[].strategyId
String
Optional
Policy number. The default policy DEFAULT is used when not passed.
contents[].country
String
Optional
country The default country setting is used when omitted.
contents[].userId
String
Optional
Unique end user ID. The userID should be no more than 64 characters.
contents[].userName
String
Optional
User name, nickname. The user name should be no more than 32 characters.
contents[].userLevel
Number
Optional
User level
contents[].userIp
String
Optional
User IP address
contents[].sessionId
String
Optional
sessionId, The sessionId should be no more than 64 characters.
contents[].receiverId
String
Optional
receiverId, The receiverId should be no more than 64 characters.
contents[].totalPay
Number
Optional
User total payment. Support up to 2 digits after the decimal point.
contents[].registrationDate
Number
Optional
User registration date. 10 digit timestamp.
contents[].msgCount
Number
Optional
Number of message sent
contents[].msgType
String
Optional
Message type
contents[].pkgChannel
String
Optional
Package channel
contents[].did
String
Optional
User device ID
contents[].dtype
String
Optional
1 iPhone, 2 Android, 3 iPad, 4 Windows Phone;
5 PC, 6 Web, 7 WAP.
contents[].extra
Object
Optional
Additional key-value data, such as {"server":"123","version":"456"}.
contents[].checkTags
Array
Optional
First-level categories; see the category table below.
Supported Check Categories
Use the following first-level codes in contents[].checkTags .
Code
Category
100
Politics
110
Violence and terrorism
120
Prohibited content
130
Eroticism
150
Advertising
160
Insults
170
Hate speech
180
Minor protection
190
Sensitive hot topics
220
Private transactions
410
Irregular emoticons
420
Nicknames
999
Custom categories
Request Example
{
"contents": [
{
"id": "1",
"content": "测试语句1",
"strategyId": "DEFAULT"
},
{
"id": "2",
"content": "测试语句2",
"strategyId": "DEFAULT"
}
]
}
Request Signature
Calculate Authorization using Request Signature with these parameters.
Signing Parameter
Value
HTTPMethod
POST
HostHeaderInLowercase
tsafe.ilivedata.com
HTTPRequestURI
/api/v2/text/batchCheck
HTTP Response
Content-Type: application/json;charset=UTF-8
Response Fields
Field
Type
Description
errorCode
Number
Error code: 0 means success
errorMessage
String
Error message
checkResults
CheckResult[]
Classified information
checkResults[]
Field
Type
Description
id
String
‘id’ which come from request
errorCode
Number
Error code: 0 means success
textSpam
Object
Result information
taskId
String
Unique identifier to distinguish different calls
startTime
Number
Timestamp, representing the detection text call time
endTime
Number
Timestamp, representing the return time of the detected text result
textSpam
For each result item: checkResults[].textSpam.
Field
Type
Description
content
String
After the detection is complete, sensitive words will change to asterisks if they contain sensitive words, and other content will be returned normally.
result
Number
0: Pass, 1: Recommended for review, 2: Fail
tags
Tag[]
Classified information
wordList
String[]
List of sensitive words
tags[]
Parent field: textSpam.tags.
Field
Type
Description
tag
Number
First-level category code; see Classification Codes.
tagName
String
Detect first-level type names for text hits
tagNameEn
String
Detect first-level type names for text hits(English)
level
Number
Classification level, 0:Normal, 1:Suspected, 2:Abnormal
confidence
Number
confidence, between 0 and 100, only when tag=150, confidence is not null; The higher the value, the more likely to be an advertisement
subTags
SubTag[]
Secondary classification of sensitive information
subTags[]
Parent field: textSpam.tags[].subTags.
Field
Type
Description
subTag
Number
Secondary classification information reference Classification Code
subTagName
String
Detect secondary type names for text hits
subTagNameEn
String
Detect secondary type names for text hits(English)
wordList
String[]
hit details
Response Example
{
"errorCode": 0,
"errorMessage": "OK",
"checkResults": [
{
"errorCode": 0,
"textSpam": {
"content": "fuck",
"result": 0
},
"taskId": "367ef301-c627-4ae7-b23f-93d8219ade23",
"language": "en",
"startTime": 1699265265989,
"endTime": 1699265268714,
"id": "1"
},
{
"errorCode": 0,
"textSpam": {
"content": "caonima",
"result": 1,
"tags": [
{
"tag": 999,
"tagName": "用户自定义 ",
"level": 1,
"subTags": [
{
"subTag": 999001,
"subTagName": "用户自定义敏感词一类",
"wordList": [
"caonima"
]
}
]
}
],
"wordList": [
"caonima"
]
},
"taskId": "4967e9d1-f4ca-47de-aa52-6e6b0372ddcc",
"language": "Italian",
"companyId": "1",
"startTime": 1699265269127,
"endTime": 1699265269138,
"adRisk": 1,
"id": "2"
}
]
}
Error Codes
For common request and authentication errors, see Common Error Codes.
For text-specific conditions, see Single Text Check — Error Codes. Batch results also include an errorCode for each item.
Submit up to 100 texts for synchronous moderation.
POST
https://tsafe.ilivedata.com/api/v2/text/batchCheckResults are returned in checkResults, with an individual errorCode for each item.
Request Parameters
Request Headers
All headers below are required.
| Header | Value | Description |
|---|---|---|
Content-Type |
application/json; charset=UTF-8 |
Request body format |
Accept |
application/json; charset=UTF-8 |
Response format |
X-AppId |
— | Project ID from Console → Service Configuration |
X-TimeStamp |
— | UTC time when the request is sent, in W3C format. Format example: 2026-09-30T02:30:00Z. Use the current time for actual requests. |
Authorization |
— | See Request Signature below |
Request Body
When contents[]. is omitted, the DEFAULT policy is used.
| Parameter | Type | Required | Description |
|---|---|---|---|
contents |
Array |
Required | batch check content items, max count:100 |
contents[]. |
String |
Optional | Uniquely identifies for item |
contents[]. |
String |
Required | The text to be detected. This text is UTF-8 encoded strings with no more than 2048 characters. |
contents[]. |
String |
Optional | Policy number. The default policy DEFAULT is used when not passed. |
contents[]. |
String |
Optional | country The default country setting is used when omitted. |
contents[]. |
String |
Optional | Unique end user ID. The userID should be no more than 64 characters. |
contents[]. |
String |
Optional | User name, nickname. The user name should be no more than 32 characters. |
contents[]. |
Number |
Optional | User level |
contents[]. |
String |
Optional | User IP address |
contents[]. |
String |
Optional | sessionId, The sessionId should be no more than 64 characters. |
contents[]. |
String |
Optional | receiverId, The receiverId should be no more than 64 characters. |
contents[]. |
Number |
Optional | User total payment. Support up to 2 digits after the decimal point. |
contents[]. |
Number |
Optional | User registration date. 10 digit timestamp. |
contents[]. |
Number |
Optional | Number of message sent |
contents[]. |
String |
Optional | Message type |
contents[]. |
String |
Optional | Package channel |
contents[]. |
String |
Optional | User device ID |
contents[]. |
String |
Optional | 1 iPhone, 2 Android, 3 iPad, 4 Windows Phone;5 PC, 6 Web, 7 WAP. |
contents[]. |
Object |
Optional | Additional key-value data, such as {"server":"123","version":"456"}. |
contents[]. |
Array |
Optional | First-level categories; see the category table below. |
Supported Check Categories
Use the following first-level codes in contents[]..
| Code | Category |
|---|---|
100 |
Politics |
110 |
Violence and terrorism |
120 |
Prohibited content |
130 |
Eroticism |
150 |
Advertising |
160 |
Insults |
170 |
Hate speech |
180 |
Minor protection |
190 |
Sensitive hot topics |
220 |
Private transactions |
410 |
Irregular emoticons |
420 |
Nicknames |
999 |
Custom categories |
Request Example
{
"contents": [
{
"id": "1",
"content": "测试语句1",
"strategyId": "DEFAULT"
},
{
"id": "2",
"content": "测试语句2",
"strategyId": "DEFAULT"
}
]
}
Request Signature
Calculate Authorization using Request Signature with these parameters.
| Signing Parameter | Value |
|---|---|
HTTPMethod |
POST |
HostHeaderInLowercase |
tsafe.ilivedata.com |
HTTPRequestURI |
/api/v2/text/batchCheck |
HTTP Response
Content-Type: application/json;charset=UTF-8
Response Fields
| Field | Type | Description |
|---|---|---|
errorCode |
Number |
Error code: 0 means success |
errorMessage |
String |
Error message |
checkResults |
CheckResult[] |
Classified information |
checkResults[]
| Field | Type | Description |
|---|---|---|
id |
String |
‘id’ which come from request |
errorCode |
Number |
Error code: 0 means success |
textSpam |
Object |
Result information |
taskId |
String |
Unique identifier to distinguish different calls |
startTime |
Number |
Timestamp, representing the detection text call time |
endTime |
Number |
Timestamp, representing the return time of the detected text result |
textSpam
For each result item: checkResults[].textSpam.
| Field | Type | Description |
|---|---|---|
content |
String |
After the detection is complete, sensitive words will change to asterisks if they contain sensitive words, and other content will be returned normally. |
result |
Number |
0: Pass, 1: Recommended for review, 2: Fail |
tags |
Tag[] |
Classified information |
wordList |
String[] |
List of sensitive words |
tags[]
Parent field: textSpam.tags.
| Field | Type | Description |
|---|---|---|
tag |
Number |
First-level category code; see Classification Codes. |
tagName |
String |
Detect first-level type names for text hits |
tagNameEn |
String |
Detect first-level type names for text hits(English) |
level |
Number |
Classification level, 0:Normal, 1:Suspected, 2:Abnormal |
confidence |
Number |
confidence, between 0 and 100, only when tag=150, confidence is not null; The higher the value, the more likely to be an advertisement |
subTags |
SubTag[] |
Secondary classification of sensitive information |
subTags[]
Parent field: textSpam.tags[].subTags.
| Field | Type | Description |
|---|---|---|
subTag |
Number |
Secondary classification information reference Classification Code |
subTagName |
String |
Detect secondary type names for text hits |
subTagNameEn |
String |
Detect secondary type names for text hits(English) |
wordList |
String[] |
hit details |
Response Example
{
"errorCode": 0,
"errorMessage": "OK",
"checkResults": [
{
"errorCode": 0,
"textSpam": {
"content": "fuck",
"result": 0
},
"taskId": "367ef301-c627-4ae7-b23f-93d8219ade23",
"language": "en",
"startTime": 1699265265989,
"endTime": 1699265268714,
"id": "1"
},
{
"errorCode": 0,
"textSpam": {
"content": "caonima",
"result": 1,
"tags": [
{
"tag": 999,
"tagName": "用户自定义 ",
"level": 1,
"subTags": [
{
"subTag": 999001,
"subTagName": "用户自定义敏感词一类",
"wordList": [
"caonima"
]
}
]
}
],
"wordList": [
"caonima"
]
},
"taskId": "4967e9d1-f4ca-47de-aa52-6e6b0372ddcc",
"language": "Italian",
"companyId": "1",
"startTime": 1699265269127,
"endTime": 1699265269138,
"adRisk": 1,
"id": "2"
}
]
}
Error Codes
For common request and authentication errors, see Common Error Codes.
For text-specific conditions, see Single Text Check — Error Codes. Batch results also include an errorCode for each item.