Task Submit
Update:
This is the V1 API. The V2 API is now available with a cleaner request/response structure and is recommended: Task Submission (V2).
Parameter Specification
- Request URL:
https://isafe.ilivedata.com/api/v1/image/batchCheck/async
- Interface description:
Image asynchronous detection interface. After the task is submitted, the image will be detected, and the results will be returned through callbacks. The callback configuration can be configured in the console service configuration or passed in through parameters.
-
Image requirements:
- Supported types: URL, BASE64
- Supported formats: jpg, png, bmp, gif, webp, tiff, heic;
- Supported image size: <10M;
- Description of gif/long image: Automatically cut gif/long image into frame and check, up to 5 images. Gif/long images are billed according to the actual number of screenshots; Definition of long image: images whose ratio of length and width is greater than 5.
-
HTTP request Header:
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 only identifier of the project or application.
X-TimeStamp
The UTC timestamp of the request. Timestamps need to be formatted according to W3C standards, for example: 2010-01-31T23:59:59Z. (http://www.w3.org/TR/xmlschema-2/#dateTime)
Authorization
Signature value
-
Request method:POST
-
Request body JSON object:
- Public Parameters
Parameter
Required
Type
Description
images
Required
json array
array length does not exceed 20
-
New Parameters
Parameter
Required
Type
Description
callbackRegion
Optional
String
Callback region: default cn, optional cn, us, ap. If not given or not within the value range, cn will be used by default to initiate the callback.
callbackUrl
Optional
String
Callback url: http protocol
callbackSecretKey
Optional
String
The callback key can be customized. The key needs to be consistent in the callback signature verification method. Otherwise, it cannot be verified whether the callback data has been tampered with.
callbackWaitForAll
Optional
boolean
Whether to wait for all review processes to be completed before callbacking; ’true’ will follow the batch-callback protocol document, otherwise the callback will follow the callback protocol document
-
Example of request body:
{
"images": [
{
"id": "abcd",
"type": 1,
"userId": "123",
"image": "http://abc.com/a.jpg",
},
{
"type": 1,
"userId": "123",
"image": " http://abc.com/b.jpg",
}
]
}
-
Request signature:
This API requires the Authorization signature in the request Header. For the signature calculation rule, see Request Signature.
HTTP Response
Content-Type: application/json;charset=UTF-8
The result is in JSON format, please refer to the following example.
- Description of returning json field:
A json array consisting of a single image result json object.
- Single image result json field description:
Parameter
Type
Description
errorCode
Number
Error code: 0 means success
errorMessage
String
Error message
taskId
String
Task ID
-
Response example:
[
{
"id":"abcd",
"errorCode":0,
"taskId":"Telnet-test_99b2bf004d4a4591bfedbba9574e74d4_1702882338368"},
{"errorCode":0,
"taskId":"Telnet-test_d8d58cc2ecf14edaafd18692997a1f67_1702882338368"}
]
Error Codes
See Common Exception Codes in Help Center
This is the V1 API. The V2 API is now available with a cleaner request/response structure and is recommended: Task Submission (V2).
Parameter Specification
- Request URL:
https://isafe.ilivedata.com/api/v1/image/batchCheck/async
- Interface description:
Image asynchronous detection interface. After the task is submitted, the image will be detected, and the results will be returned through callbacks. The callback configuration can be configured in the console service configuration or passed in through parameters.
-
Image requirements:
- Supported types: URL, BASE64
- Supported formats: jpg, png, bmp, gif, webp, tiff, heic;
- Supported image size: <10M;
- Description of gif/long image: Automatically cut gif/long image into frame and check, up to 5 images. Gif/long images are billed according to the actual number of screenshots; Definition of long image: images whose ratio of length and width is greater than 5.
-
HTTP request Header:
| 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 only identifier of the project or application. | |
| X-TimeStamp | The UTC timestamp of the request. Timestamps need to be formatted according to W3C standards, for example: 2010-01-31T23:59:59Z. (http://www.w3.org/TR/xmlschema-2/#dateTime) | |
| Authorization | Signature value |
-
Request method:POST
-
Request body JSON object:
- Public Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| images | Required | json array | array length does not exceed 20 |
-
New Parameters
Parameter Required Type Description callbackRegion Optional String Callback region: default cn, optional cn, us, ap. If not given or not within the value range, cn will be used by default to initiate the callback. callbackUrl Optional String Callback url: http protocol callbackSecretKey Optional String The callback key can be customized. The key needs to be consistent in the callback signature verification method. Otherwise, it cannot be verified whether the callback data has been tampered with. callbackWaitForAll Optional boolean Whether to wait for all review processes to be completed before callbacking; ’true’ will follow the batch-callback protocol document, otherwise the callback will follow the callback protocol document -
Example of request body:
{ "images": [ { "id": "abcd", "type": 1, "userId": "123", "image": "http://abc.com/a.jpg", }, { "type": 1, "userId": "123", "image": " http://abc.com/b.jpg", } ] } -
Request signature:
This API requires the Authorization signature in the request Header. For the signature calculation rule, see Request Signature.
HTTP Response
Content-Type: application/json;charset=UTF-8
The result is in JSON format, please refer to the following example.
- Description of returning json field:
A json array consisting of a single image result json object.
- Single image result json field description:
Parameter |
Type |
Description |
|---|---|---|
| errorCode | Number | Error code: 0 means success |
| errorMessage | String | Error message |
| taskId | String | Task ID |
-
Response example:
[ { "id":"abcd", "errorCode":0, "taskId":"Telnet-test_99b2bf004d4a4591bfedbba9574e74d4_1702882338368"}, {"errorCode":0, "taskId":"Telnet-test_d8d58cc2ecf14edaafd18692997a1f67_1702882338368"} ]
Error Codes
See Common Exception Codes in Help Center