TextRecognition
AI-powered image-to-text captcha recognition using automated OCR models.
TextRecognition uses AI models to read text from captcha images. For captchas that AI struggles with, use HumanRecognition instead.
Module
Use module to target a specific recognition model on a specific provider. Modules are not cross-compatible between providers. Check your provider's documentation for available values.
module parameter.Supported Providers
| Provider | Price per 1,000 | Routing |
|---|---|---|
| $0.40 | ||
| $0.30 | ||
| $0.14 |
Request Schema
| Field | Type | Required | Description |
|---|---|---|---|
clientKey* | string | Yes | Your API key. Create one in the [AnySolver dashboard](/dashboard/api-keys). Example: |
task* | object | Yes | The task body. Required fields depend on the task type. See [Tasks](/docs/tasks) for per-task schemas. View task properties |
provider | No | Specific provider to use. If omitted, automatic routing selects the best provider. Example: | |
selectionMode | No | Routing strategy for this request. Overrides the API key default. See [Routing Strategies](/docs/getting-started/routing-strategies). Example: | |
keyPoolMode | No | Which provider key pool to use: `all` (default, uses AnySolver-managed keys and your own) or `platformOnly` (AnySolver-managed keys only). See [Key Pool Mode](/docs/getting-started/routing-strategies#key-pool-mode). Example: |
Task Object Properties
The task field accepts an object with the following properties:
| Field | Type | Required | Description |
|---|---|---|---|
type* | Yes | ||
imageBase64* | unknown | Yes | Base64-encoded captcha image containing text to recognize. Example: |
websiteURL* | string | Yes | Page URL where the captcha appears. Helps AI models improve recognition accuracy. Example: |
module | string | No | Provider-specific recognition module for targeting a specific model on a specific provider. Modules are not cross-compatible between providers. See the provider documentation for available values. Example: |
{ "clientKey": "your-api-key-from-dashboard", "task": { "type": "TextRecognition", "imageBase64": "/9j/4AAQSkZJRgABA...", "websiteURL": "https://example.com/login" }}Optional fields are not guaranteed across providers
Response Schema
| Field | Type | Required | Description |
|---|---|---|---|
status* | Yes | Task status: "processing", "ready", or "failed". Example: | |
errorId* | Yes | 0 = success, 1 = external error, 2 = internal error. 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 | Specific provider to use. If omitted, automatic routing selects the best provider. Example: | |
solution | object | No |
Solution Object Properties
The solution field contains an object with the following properties:
| Field | Type | Required | Description |
|---|---|---|---|
text* | string | Yes | Recognized text from the captcha image. Example: |
raw* | Record<string, unknown> | Yes | Raw provider response data for advanced use cases. |