Batch Image Synchronous Moderation
Update:
API Overview
POSThttps://isafe.ilivedata.com/api/v2/image/batchCheck
Image requirements
Supported types: URL, BASE64
Supported formats: jpg, png, bmp, gif, webp, tiff, heic, avif
Supported image size: < 10M
Description of gif/long image: Automatically cut gif/long image (ratio of length and width greater than 5) into frames and check, up to 5 images. Gif/long images are billed according to the actual number of screenshots.
Request Parameters
Request Headers
Header
Value
Description
Content-Type
application/json;charset=UTF-8
Request body type
Accept
application/json;charset=UTF-8
Return type accepted
X-AppId
—
The unique identifier of the project, from Console - Service Configuration
X-TimeStamp
—
UTC time when the request is sent, in W3C format.
Example: 2026-09-30T02:30:00Z. Use the current time for actual requests.
Authorization
—
Signature value
Request Body
Parameter
Type
Required
Description
images
Array
Required
Images to moderate, up to 20 elements. See structure below
requestId
String
Optional
Request ID used to identify the parent request ID for this batch request; a random value is generated by the server if not provided
images[].type
Number
Required
Image content type: 1: image URL; 2: image BASE64 value
images[].image
String
Required
Image content. When type=1 it is the image URL; when type=2 it is the image BASE64 value
images[].strategyId
String
Optional
Strategy ID; uses default strategy DEFAULT when not provided
images[].checkTags
List<Number>
Optional
Restrict detection categories, supports first-level categories enabled in the strategy
images[].referImage
String
Optional
Reference image for face comparison, type must match image. Supported formats: jpg, png; size < 10M
images[].userId
String
Optional
Unique end user ID, no more than 32 characters
images[].extra
Object
Optional
Extension fields transparently passed through. No more than 20 key/value pairs; a single key must not be nested more than 3 levels deep. If exceeded, the audit log will not record the extra value for this task, but extra transparent passthrough in the response is unaffected
Request Example
{
"requestId": "batch_f1a2556604274a35831c0f07d4ecc8c2",
"images": [
{
"type": 1,
"image": "http://abc.com/a.jpg",
"userId": "testUser1"
},
{
"type": 2,
"image": "T2dnUwACAAAAAAAAAAAd8pVTAAAAAGsIvpMBE...",
"userId": "testUser2"
}
]
}
Request Signature
See Request Signature in Help Center. Use these values for this endpoint:
Signing Parameter
Value
HTTPMethod
POST
HostHeaderInLowercase
isafe.ilivedata.com
HTTPRequestURI
/api/v2/image/batchCheck
HTTP Response
Content-Type: application/json;charset=UTF-8
The response is a JSON object with the following structure:
Parameter
Type
Description
errorCode
Number
Error code: 0 if any item has errorCode 0; otherwise the first item’s errorCode
requestId
String
Request ID that identifies the parent request ID for this batch request
result
Array
Moderation result array; each element corresponds to one image in the request images
result element structure
Same as the single image response, plus the following fields:
Parameter
Type
Description
index
Number
Index of the corresponding image in the request images
For other fields (errorCode, errorMessage, result, taskId, mediaType, imageSize, snapshotUrl, imageSpams, ocr, personInfo, labels, extra), see Single Image Synchronous Moderation (V2) - HTTP Response.
Response Example
{
"errorCode": 0,
"requestId": "batch_f1a2556604274a35831c0f07d4ecc8c2",
"result": [
{
"index": 0,
"errorCode": 0,
"result": 2,
"taskId": "ap_634e686ef7e54447af7463f4dd060d6d_1783514588456",
"imageSpams": {
"tags": [
{
"tag": 130,
"level": 2,
"confidence": 100,
"nameZh": "色情",
"nameEn": "porn",
"subTags": [
{
"subTag": 130001,
"level": 2,
"confidence": 100,
"nameZh": "女胸裸露",
"nameEn": "bare breasts"
}
]
}
]
},
"personInfo": {
"human": { "number": 1 },
"face": { "number": 4 }
},
"extra": {}
},
{
"index": 1,
"errorCode": 0,
"result": 0,
"taskId": "ap_a868a01f9d8a45648df79a03cfa25bcb_1783514588456",
"imageSpams": { "tags": [] },
"extra": {}
}
]
}
Error Codes
See Common Error Codes in Help Center
API Overview
https://isafe.ilivedata.com/api/v2/image/batchCheckImage requirements
Supported types: URL, BASE64
Supported formats: jpg, png, bmp, gif, webp, tiff, heic, avif
Supported image size: < 10M
Description of gif/long image: Automatically cut gif/long image (ratio of length and width greater than 5) into frames and check, up to 5 images. Gif/long images are billed according to the actual number of screenshots.
Request Parameters
Request Headers
| Header | Value | Description |
|---|---|---|
Content-Type |
application/json;charset=UTF-8 | Request body type |
Accept |
application/json;charset=UTF-8 | Return type accepted |
X-AppId |
— | The unique identifier of the project, from Console - Service Configuration |
X-TimeStamp |
— | UTC time when the request is sent, in W3C format. Example: 2026-09-30T02:30:00Z. Use the current time for actual requests. |
Authorization |
— | Signature value |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
images |
Array | Required | Images to moderate, up to 20 elements. See structure below |
requestId |
String | Optional | Request ID used to identify the parent request ID for this batch request; a random value is generated by the server if not provided |
images[].type |
Number | Required | Image content type: 1: image URL; 2: image BASE64 value |
images[].image |
String | Required | Image content. When type=1 it is the image URL; when type=2 it is the image BASE64 value |
images[].strategyId |
String | Optional | Strategy ID; uses default strategy DEFAULT when not provided |
images[].checkTags |
List<Number> | Optional | Restrict detection categories, supports first-level categories enabled in the strategy |
images[].referImage |
String | Optional | Reference image for face comparison, type must match image. Supported formats: jpg, png; size < 10M |
images[].userId |
String | Optional | Unique end user ID, no more than 32 characters |
images[].extra |
Object | Optional | Extension fields transparently passed through. No more than 20 key/value pairs; a single key must not be nested more than 3 levels deep. If exceeded, the audit log will not record the extra value for this task, but extra transparent passthrough in the response is unaffected |
Request Example
{
"requestId": "batch_f1a2556604274a35831c0f07d4ecc8c2",
"images": [
{
"type": 1,
"image": "http://abc.com/a.jpg",
"userId": "testUser1"
},
{
"type": 2,
"image": "T2dnUwACAAAAAAAAAAAd8pVTAAAAAGsIvpMBE...",
"userId": "testUser2"
}
]
}
Request Signature
See Request Signature in Help Center. Use these values for this endpoint:
| Signing Parameter | Value |
|---|---|
HTTPMethod |
POST |
HostHeaderInLowercase |
isafe.ilivedata.com |
HTTPRequestURI |
/api/v2/image/batchCheck |
HTTP Response
Content-Type: application/json;charset=UTF-8
The response is a JSON object with the following structure:
| Parameter | Type | Description |
|---|---|---|
errorCode |
Number | Error code: 0 if any item has errorCode 0; otherwise the first item’s errorCode |
requestId |
String | Request ID that identifies the parent request ID for this batch request |
result |
Array | Moderation result array; each element corresponds to one image in the request images |
result element structure
Same as the single image response, plus the following fields:
| Parameter | Type | Description |
|---|---|---|
index |
Number | Index of the corresponding image in the request images |
For other fields (errorCode, errorMessage, result, taskId, mediaType, imageSize, snapshotUrl, imageSpams, ocr, personInfo, labels, extra), see Single Image Synchronous Moderation (V2) - HTTP Response.
Response Example
{
"errorCode": 0,
"requestId": "batch_f1a2556604274a35831c0f07d4ecc8c2",
"result": [
{
"index": 0,
"errorCode": 0,
"result": 2,
"taskId": "ap_634e686ef7e54447af7463f4dd060d6d_1783514588456",
"imageSpams": {
"tags": [
{
"tag": 130,
"level": 2,
"confidence": 100,
"nameZh": "色情",
"nameEn": "porn",
"subTags": [
{
"subTag": 130001,
"level": 2,
"confidence": 100,
"nameZh": "女胸裸露",
"nameEn": "bare breasts"
}
]
}
]
},
"personInfo": {
"human": { "number": 1 },
"face": { "number": 4 }
},
"extra": {}
},
{
"index": 1,
"errorCode": 0,
"result": 0,
"taskId": "ap_a868a01f9d8a45648df79a03cfa25bcb_1783514588456",
"imageSpams": { "tags": [] },
"extra": {}
}
]
}
Error Codes
See Common Error Codes in Help Center