Skip to Content
AnySolver logo
AnySolver
Recognition

TextRecognition

Read the text in a CAPTCHA image with automated OCR models. Covers the request schema, an example and each provider's price per 1,000.

TextRecognition reads the text in a CAPTCHA image with recognition models and returns it in solution.text. For images that need a person, such as colour rules or special instructions, use HumanRecognition.

A distorted text CAPTCHA image

Send the image

  • imageBase64: the image encoded as base64. A data:image/...;base64, prefix is stripped for you. Providers limit the format and size of the image: for example, 2Captcha accepts JPEG, PNG and GIF up to 100 kB and 1000 px on a side. Check the provider's documentation.
  • websiteURL: the page the CAPTCHA appears on. Providers that read it use it to improve accuracy.
  • module: optional. Selects a recognition model on a specific provider, such as common, the CapSolver default. Modules differ between providers and are not interchangeable, and not every provider reads the field. Omit it unless you know the module name on the provider you route to.

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

Supported Providers

ProviderPrice per 1,000Routing
CapSolver
$0.40
CapMonster
$0.30
Multibot
$0.12
Solverify
$0.10
SCTG
$0.017
VoidCaptcha
$1.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 captcha image containing text to recognize.

Example: /9j/4AAQSkZJRgABA...

websiteURL*
URLYes

Page URL where the captcha appears. Providers that read it use it to improve recognition accuracy.

Example: https://example.com/login

module
stringNo

Provider-specific recognition module, such as common (the CapSolver default). Modules are not cross-compatible between providers and not every provider reads this field. See the provider documentation for the available values.

Example: common

{
    "clientKey": "YOUR_API_KEY",
    "task": {
        "type": "TextRecognition",
        "imageBase64": "/9j/4AAQSkZJRgABA...",
        "websiteURL": "https://example.com/login"
    }
}

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
text*
stringYes

Recognized text from the captcha image.

Example: W68HP

raw*
Record<string, unknown>Yes

Raw provider response data for advanced use cases.