ai.visionengine.image

Create the task with the createTask interface to use Vision Engine for image recognition

WARNING

Create the task with the createTask.

This interface does not need to obtain the results separately, will directly return the image recognition results!

The task type field is as follows

  • ai.visionengine.image

Create Task

Create the task with the createTask.

Task Object Structure

Note that this type of task returns the task execution result directly after createTask, rather than getting it asynchronously through getTaskResult.

PropertiesTypeRequiredDescription
serviceStringRequiredai.visionengine.image
moduleStringRequiredAll supported models are shown in the table below
websiteURLStringOptionalPage source url to improve accuracy
imageStringRequiredbase64 encoded content of the image (no newlines, no data:image/***;charset=utf-8;base64,)
imageBackgroundStringRequiredbase64 encoded content of the background image (no newlines, no data:image/***;charset=utf-8;base64,)
questionStringOptionalspace_detection requires

SUPPORT IMG TYPES

moduleCaptcha ExampleimageimageBackground
slider_1img.pngimg.pngimg.png
rotate_1img_2.pngimg_2.pngimg_2.png
rotate_2img_3.pngimg_3.png
sheinimg_4.pngimg_4.png

Example Request

// Example request using slider module
POST https://api.pixelant.ai/createTask
Host: api.pixelant.ai
Content-Type: application/json
x-api-key: sk_0cqyZoycFci4eIQnQSgucyCTkZU...W31wLlefAt9IF2tn1YFV0

Payload:
{
  "service": "ai.visionengine.image",
  "input": {
    "module": "slider_1",
    "image": "/9j/4AAQSkZJRgABA......",
    "imageBackground": "/9j/4AAQSkZJRgABA......",
    "websiteURL": "https://xxxx.com"
  }
}


// Example Response using slider module
{
  "errorId": 0,
  "errorCode": "",
  "errorDescription": "",
  "status": "ready",
  "solution": {
     "distance": 213,
  },
  "taskId": "..."
}
// Example request using rotate module
POST https://api.pixelant.ai/createTask
Host: api.pixelant.ai
Content-Type: application/json
x-api-key: sk_0cqyZoycFci4eIQnQSgucyCTkZU...W31wLlefAt9IF2tn1YFV0

Payload:
{
  "service": "ai.visionengine.image",
  "input": {
    "module": "rotate_1",
    "image": "/9j/4AAQSkZJRgABA......",
    "imageBackground": "/9j/4AAQSkZJRgABA......",
    "websiteURL": "https://xxxx.com"
  }
}


// Example Response using rotate_1 module
{
  "errorId": 0,
  "errorCode": "",
  "errorDescription": "",
  "status": "ready",
  "solution": {
     "angle": 154,
  },
  "taskId": "..."
}
// Example request using rotate module
POST https://api.pixelant.ai/createTask
Host: api.pixelant.ai
Content-Type: application/json
x-api-key: sk_0cqyZoycFci4eIQnQSgucyCTkZU...W31wLlefAt9IF2tn1YFV0

Payload:
{
  "service": "ai.visionengine.image",
  "input": {
    "module": "rotate_2",
    "image": "/9j/4AAQSkZJRgABA......",
    "websiteURL": "https://xxxx.com"
  }
}


// Example Response using rotate_2 module
{
  "errorId": 0,
  "errorCode": "",
  "errorDescription": "",
  "status": "ready",
  "solution": {
     "angle": 168,
  },
  "taskId": "..."
}
// Example request using rotate module
POST https://api.pixelant.ai/createTask
Host: api.pixelant.ai
Content-Type: application/json
x-api-key: sk_0cqyZoycFci4eIQnQSgucyCTkZU...W31wLlefAt9IF2tn1YFV0

Payload:
{
  "service": "ai.visionengine.image",
  "input": {
    "module": "shein",
    "image": "/9j/4AAQSkZJRgABA......",
    "question": "Please select the following graphics in order",
    "websiteURL": "https://xxxx.com"
  }
}


// Example Response using rotate module
{
  "errorId": 0,
  "errorCode": "",
  "errorDescription": "",
  "status": "ready",
  "solution": {
    "rects": [
      {
        "x1": 4,
        "y1": 126,
        "x2": 64,
        "y2": 184
      },
      {
        "x1": 140,
        "y1": 166,
        "x2": 190,
        "y2": 217
      },
      {
        "x1": 30,
        "y1": 16,
        "x2": 87,
        "y2": 70
      }
    ]
  },
  "taskId": "..."
}

Last updated on