Skip to Content
AnySolver logo
AnySolver
Recognition

BoundingBoxRecognition

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

BoundingBoxRecognition asks a worker to draw a box around a specific object in an image and returns the box coordinates. Use it for CAPTCHAs that ask for an object to be selected or outlined.

What the image should contain

Send the whole CAPTCHA image as base64 in imageBase64. A data-URI prefix is removed for you. Limits documented by providers:

LimitValue
FormatsJPEG, PNG, GIF
Size600 kB maximum, and 1000 px on any side (2Captcha)
ScalingAnti-Captcha downscales images larger than 500 px on a side in the worker interface, so keep the image small when you can

Tell the worker what to box

Send comment, imgInstructions, or both. The worker needs at least one of them to know which object to box.

  • comment is a text instruction such as draw a tight box around the green apple. English has the widest provider support.
  • imgInstructions is a base64 instruction image of up to 100 kB, for an instruction that is itself a picture. Not every provider supports it, and those that do not ignore it.
  • canNoAnswer set to true lets the worker answer that nothing matches. Set it only when the image may contain no matching object. Not every provider supports it.

Read the answer

boundingBoxes is a list of boxes. Each has xMin, yMin, xMax and yMax, in pixels from the top-left corner of the image you sent. To click the box centre, use (xMin + xMax) / 2 and (yMin + yMax) / 2.

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

Supported Providers

ProviderPrice per 1,000Routing
2Captcha
$1.20
Anti-Captcha
$2.00

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 JPEG, PNG or GIF image to draw boxes on. A data URI prefix is stripped automatically. Keep it under 600 kB and 1000 px per side; some providers downscale anything wider than 500 px.

Example: /9j/4AAQSkZJRgABAQAAAQ..HIAAAAAAQwAABtbnRyUkdCIFhZ.wc5GOGSRF//Z

comment
stringNo

Instruction shown to the worker, for example "draw a tight box around the green apple". Send this or imgInstructions; use English for the widest provider support.

Example: draw a tight box around the green apple

imgInstructions
stringNo

Base64-encoded instruction image (max 100 kB) shown to the worker. Send this or comment. Not every provider supports it; those that do not ignore it.

Example: iVBORw0KGgoAAAANSUhEUgAA...instructions

canNoAnswer
booleanNo

Set true when the image may contain no matching object, so the worker can answer that nothing matches instead of guessing. Not every provider supports it.

Example: false

{
    "clientKey": "YOUR_API_KEY",
    "task": {
        "type": "BoundingBoxRecognition",
        "imageBase64": "/9j/4AAQSkZJRgABAQAAAQ..HIAAAAAAQwAABtbnRyUkdCIFhZ.wc5GOGSRF//Z"
    }
}

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
boundingBoxes*
object[]Yes

Boxes drawn around the matching objects, in pixels relative to the top-left corner of the image.

Example: [{"xMin":310,"yMin":231,"xMax":385,"yMax":308}]

raw*
Record<string, unknown>Yes

Raw provider response data for advanced use cases.