Task Submit

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
Subparameter Required Type Description
type Required Number 1: Image URL 2: Image BASE64 value
image Required String Image content, if type=1, then the value is the image URL, if type=2, then the value is the image BASE64 value.
strategyId Optional String Strategy ID, if empty, use DEFAULT Strategy
referImage Optional String Used for face comparison. The referImage type needs to be the same as image type. If image is a url, referImage must also be a url. Supported formats: jpg, png;Supported image size: <10M;
userId Optional String nique end user ID. The user ID should be no more than 32 characters.
userIP Optional String User IP address
did Optional String User device ID
dtype Optional String User device type:1:iPhone 2:android 3: ipad 4:wphone 5: pc 6:web 7:wap
id Optional String Extended field, can be used as identifier and transparently transmitted.
extra Optional json Extended fields, can pass multiple keys and values transparently. For example, pass two parameters: game server and game version: “extra” : {“server”: “123”,“version”:“456”}
  • 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