Skip to main content
Are you experiencing issues obtaining the token?
Contact support

ComplexImageTask Recognition

Request parameters

type<string>required

ComplexImageTask


class<string>required

recognition


imagesBase64<array>required

Images array in base64 encoding. Example: [ “/9j/4AAQSkZJRgABAQEAAAAAAAD…”]


metadata.Task<string>required

Possible values: oocl_rotate_new and others
Task name (in English).

oocl_rotate_new

Create task oocl_rotate_new

ComplexImageTask
$0.3 / 1000 answers
99%

In the request we pass two images: background and circle.

POST
https://api.capmonster.cloud/createTask

Request

{
"clientKey": "API_KEY",
"task": {
"type": "ComplexImageTask",
"class": "recognition",
"imagesBase64": [
"{background_base64}",
"{circle_base64}"
],
"metadata": {
"Task": "oocl_rotate_new"
}
}
}

Background example (background_base64):

Circle example (circle_base64):

Response

{
"errorId":0,
"taskId":407533072
}

Get task result oocl_rotate_new

POST
https://api.capmonster.cloud/getTaskResult

Request

{
"clientKey":"API_KEY",
"taskId": 407533072
}

Response Degrees by which the circle should be rotated clockwise.

{
"errorId":0,
"status":"ready",
"errorCode":null,
"errorDescription":null,
"solution": {
"answer":[130.90909]
},
"metadata": {
"AnswerType":"NumericArray"
}
}

oocl_rotate_double_new

Create task oocl_rotate_double_new

ComplexImageTask
$0.3 / 1000 answers
99%

In the request we pass three images: background, ring, circle.

POST
https://api.capmonster.cloud/createTask

Request

{ 
"clientKey": "API_KEY",
"task": {
"type": "ComplexImageTask",
"class": "recognition",
"imagesBase64": [
"{background_base64}",
"{ring_base64}",
"{circle_base64}"
],
"metadata": {
"Task": "oocl_rotate_double_new"
}
}
}

Background (background_base64):

Ring (ring_base64):

Circle (circle_base64):

Response

{
"errorId":0,
"taskId":407533072
}

Get task result oocl_rotate_double_new

POST
https://api.capmonster.cloud/getTaskResult

Request

{
"clientKey":"API_KEY",
"taskId": 407533072
}

Response Degrees by which the ring should be turned counterclockwise and the circle clockwise.

{
"errorId":0,
"status":"ready",
"errorCode":null,
"errorDescription":null,
"solution": {
"answer":[130.90909]
},
"metadata": {
"AnswerType":"NumericArray"
}
}

betpunch_3x3_rotate

Create task betpunch_3x3_rotate

ComplexImageTask
$0.3 / 1000 answers
99%

In the request we pass nine images. The images must be passed in the following order:

POST
https://api.capmonster.cloud/createTask

Request

{ 
"clientKey": "API_KEY",
"task": {
"type": "ComplexImageTask",
"class": "recognition",
"imagesBase64": [
"{image_1_Base64}",
"{image_2_Base64}",
"{image_3_Base64}",
"{image_4_Base64}",
"{image_5_Base64}",
"{image_6_Base64}",
"{image_7_Base64}",
"{image_8_Base64}",
"{image_9_Base64}",
],
"metadata": {
"Task": "betpunch_3x3_rotate"
}
}
}

Response

{
"errorId":0,
"taskId":407533072
}

Get task result betpunch_3x3_rotate

POST
https://api.capmonster.cloud/getTaskResult

Request

{
"clientKey":"API_KEY",
"taskId": 407533072
}

Response "answer":[X,X,X,X,X,X,X,X,X], where X is an integer value from 1 to 4 for each image. 4 - means that the image does not need to be rotated; 1-3 - the number of counterclockwise rotations of the image.

{
"errorId":0,
"status":"ready",
"errorCode":null,
"errorDescription":null,
"solution":
{
"answer":[4,4,4,4,4,3,1,2,2],
"metadata":{"AnswerType":"NumericArray"}
}
}

bls

Create task bls

Bls
$0.12 / 1000 images
99%

In the request, we send 9 images in base64 format. We also pass the sought value TaskArgument in the metadata.

POST
https://api.capmonster.cloud/createTask

Request

{
"clientKey":{{API_key}},
"task":
{
"type": "ComplexImageTask",
"class": "recognition",
"imagesBase64": [
"image1_to_base64",
"image2_to_base64",
"image3_to_base64",
"image4_to_base64",
"image5_to_base64",
"image6_to_base64",
"image7_to_base64",
"image8_to_base64",
"image9_to_base64"
],
"metadata": {
"Task": "bls_3x3",
"TaskArgument": "123"
}
}
}

Example task:

Send images converted to base64:

For this example: "TaskArgument": "546"

Response

{
"errorId":0,
"taskId":143998457
}

Get task result bls

POST
https://api.capmonster.cloud/getTaskResult

Request

{
"clientKey":"API_KEY",
"taskId": 143998457
}

Response An array of values with elements true or false, depending on whether the number in the image is the sought argument or not.

{
"errorId":0,
"status":"ready",
"errorCode":null,
"errorDescription":null,
"solution": {
"answer":[true,true,false,false,true,false,false,true,true],
"metadata": {
"AnswerType":"Grid"
}
}
}