Skip to Content
AnySolver logo
AnySolver
Recognition

DrawAroundRecognition

Get lines drawn around an object in an image by a human worker. Covers the request schema, an example and each provider's price per 1,000.

DrawAroundRecognition asks a human worker to draw a line around a specific object in an image and returns the drawn path in solution.canvas.

Send the image

Send the CAPTCHA image as base64 in imageBase64. A data-URI prefix is removed for you. 2Captcha documents JPEG, PNG or GIF, 600 kB maximum and 1000 px on any side.

Give the instruction

Send at least one of these fields. A request with neither is rejected.

  • comment: a text instruction, such as draw around an apple.
  • imgInstructions: a base64 instruction image, up to 100 kB on 2Captcha.

languagePool selects workers by language. 2Captcha accepts en (the default) and ru.

Read the answer

solution.canvas is a list of lines. Each line is an ordered list of { x, y } points in image pixels. An answer holds one or more strokes: draw the points one after another to reproduce each one.

Check Provider stats for live success rates and solve times before you pick a provider.

Supported Providers

ProviderPrice per 1,000Routing
2Captcha
$1.20

Request Schema

FieldTypeRequiredDescription
clientKey*
stringYes

Your API key. Create one in a workspace of the AnySolver dashboard.

Example: your-api-key-from-dashboard

task*
objectYes

The task body. Required fields depend on the task type. See Tasks for per-task schemas.

View task properties
settings
objectNo

Per-request settings for routing, Auto Retry, Auto Fallback, proxy reuse, response statistics and detailed analytics. Each field overrides the API key's value. See Routing modes.

View settings reference

Task Object Properties

The task field accepts an object with the following properties:

FieldTypeRequiredDescription
type*
Yes
imageBase64*
stringYes

Base64-encoded captcha image to draw a line around an object on. A data-URI prefix is removed for you. 2Captcha documents JPEG, PNG or GIF up to 600 kB and 1000 px on any side.

Example: /9j/4AAQSkZJ...OGSRF//Z

comment
stringNo

Text instruction shown to the worker, for example draw around an apple. Required when imgInstructions is missing.

Example: draw around an apple

imgInstructions
stringNo

Base64-encoded instruction image shown to the worker, up to 100 kB on 2Captcha. Required when comment is missing.

Example: iVBORw0KGgoAAAANSUhEUgAA...instructions

languagePool
stringNo

Selects workers by language. 2Captcha accepts en (English, the default) and ru (Russian).

Example: en

{
    "clientKey": "YOUR_API_KEY",
    "task": {
        "type": "DrawAroundRecognition",
        "imageBase64": "/9j/4AAQSkZJ...OGSRF//Z",
        "comment": "draw around an apple",
        "imgInstructions": "iVBORw0KGgoAAAANSUhEUgAA...instructions",
        "languagePool": "en"
    },
    "settings": {}
}

Optional fields are not guaranteed across providers

Required fields are guaranteed across every provider that supports this task. Optional fields may be honored by some providers and silently ignored by others. AnySolver does not document per-provider parameter support, so before relying on an optional field, check that provider's own docs for the task you are using.

Response Schema

FieldTypeRequiredDescription
status*
Yes

Task status: "processing", "ready", or "failed".

Example: ready

errorId*
Yes

0 on success; 1 or 2 on an error. Branch on errorCode: Error IDs explains the two error groups.

Example: 0

taskId
stringNo

Unique identifier returned when the task was created.

Example: 01KFNDF328KAN2AJ3BNHCQYE88

errorCode
No

Machine-readable error code.

Example: CAPTCHA_UNSOLVABLE

errorDescription
stringNo

Human-readable error message with resolution hints.

Example: The captcha could not be solved.

cost
numberNo

Actual cost charged for this task in USD.

Example: 0.002

taskType
No

The type of CAPTCHA task to solve.

Example: ReCaptchaV2TokenProxyLess

provider
No

Provider that handled this task. While processing, the provider currently solving it.

Example: Multibot

solution
objectNo

Solution Object Properties

The solution field contains an object with the following properties:

FieldTypeRequiredDescription
canvas*
object[][]Yes

Lines the worker drew around the object. Each inner array is one line, given as an ordered list of x/y points in image pixels.

Example: [[{"x":141,"y":93},{"x":145,"y":93}]]

raw*
Record<string, unknown>Yes

Raw provider response data for advanced use cases.