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 asdraw 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
| Provider | Price per 1,000 | Routing |
|---|---|---|
2Captcha | $1.20 |
Request Schema
| Field | Type | Required | Description |
|---|---|---|---|
clientKey* | string | Yes | Your API key. Create one in a workspace of the AnySolver dashboard. Example: |
task* | object | Yes | The task body. Required fields depend on the task type. See Tasks for per-task schemas. View task properties |
settings | object | No | 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:
| Field | Type | Required | Description |
|---|---|---|---|
type* | Yes | ||
imageBase64* | string | Yes | 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: |
comment | string | No | Text instruction shown to the worker, for example draw around an apple. Required when imgInstructions is missing. Example: |
imgInstructions | string | No | Base64-encoded instruction image shown to the worker, up to 100 kB on 2Captcha. Required when comment is missing. Example: |
languagePool | string | No | Selects workers by language. 2Captcha accepts en (English, the default) and ru (Russian). Example: |
{
"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
Response Schema
| Field | Type | Required | Description |
|---|---|---|---|
status* | Yes | Task status: "processing", "ready", or "failed". Example: | |
errorId* | Yes |
Example: | |
taskId | string | No | Unique identifier returned when the task was created. Example: |
errorCode | No | Machine-readable error code. Example: | |
errorDescription | string | No | Human-readable error message with resolution hints. Example: |
cost | number | No | Actual cost charged for this task in USD. Example: |
taskType | No | The type of CAPTCHA task to solve. Example: | |
provider | No | Provider that handled this task. While processing, the provider currently solving it. Example: | |
solution | object | No |
Solution Object Properties
The solution field contains an object with the following properties:
| Field | Type | Required | Description |
|---|---|---|---|
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: |
raw* | Record<string, unknown> | Yes | Raw provider response data for advanced use cases. |