Skip to content
voidcaptcha

Task type

Image to Text solver API

The classic distorted-text captcha: a small image of letters and digits, sometimes with lines, noise or a coloured background. Send the image as base64 and the text comes back, usually in well under a second. It also answers the image rather than just reading it: a sum like 7*9=? returns 63, and a "fill in the missing number" sequence returns the missing number. No proxy is needed, because we never visit the site; we only read the picture you send. The request and response follow the Anti-Captcha ImageToTextTask shape, so existing integrations port over by changing the endpoint and the key.

Tip

Send task.type as ImageToTextTask and the solution arrives in solution.text, with solution.confidence beside it.

Before you integrate

  1. Send the image as it is served. Do not resize, recolour or crop it - the model was trained on captchas as sites deliver them.
  2. The image must be at most about 180 KB once base64-encoded, and no larger than 4000 px or 4 megapixels.

A site that will not solve is worth telling us about — coverage is per target as much as per type. The quickest route is Telegram (@VoidCaptchaSupport), where someone usually answers within minutes. You can also open a ticket from your dashboard or email [email protected]. Send the URL and the site key either way.

task.type
ImageToTextTask
Median
—
under 50 solves
Success
—
Price / 1k
$1.00
$0.0010 each
Proxy
Not needed

Solve request#

Solving Image to Text is a single synchronous call. You post one task object and the response carries the finished solution — no task id to store, nothing to poll for.

POSThttps://api.voidcaptcha.com/v1/getResult

The connection is held open for the whole solve. Set a client timeout that covers it — the default socket timeout in most HTTP libraries is shorter than the work. If holding a connection that long does not suit your worker fleet, the same task goes to /v1/createTask and you collect it from /v1/checkTask instead.

When to use it#

  • Legacy login and registration forms with a distorted-text captcha
  • Government, school and utility portals that still use image codes
  • Forms that ask for a sum or a missing number in a sequence

Task object structure#

These fields go inside task. The envelope around it — clientKey and the optional softId — is the same for every type and is described in the API reference.

PropertyTypeRequiredDescription
typestringRequiredLiteral "ImageToTextTask". Matching is case-insensitive.
bodystringRequiredThe captcha image, base64-encoded (PNG, JPG or GIF). A data: prefix is accepted.e.g. iVBORw0KGgoAAAANSUhEUgAA…
casebooleanOptionaltrue if the answer is case-sensitive. Default false.e.g. false
numericnumberOptional0 any characters, 1 digits only, 2 letters only, 4 digits and letters. Default 0.e.g. 0
mathbooleanOptionaltrue if the image is a sum to work out (12+7=?). It is also detected automatically.e.g. false
minLengthnumberOptionalShortest acceptable answer. 0 means no limit.e.g. 0
maxLengthnumberOptionalLongest acceptable answer. 0 means no limit.e.g. 0
commentstringOptionalThe instruction shown with the image, if any, e.g. "Fill in missing number". Overrides what is detected from the image.
scorenumberOptionalMinimum confidence from 0 to 1. A reading below it is refused as unsolvable and not billed.e.g. 0.5

Example payload#

The whole body, assembled from the table above — copy it formatted to read, or on one line to paste straight into a terminal or a REST client. The values are placeholders: swap the key for your own and the URL and site key for the page you are solving.

POSThttps://api.voidcaptcha.com/v1/getResult
{
  "clientKey": "void_a1b2c3d4e5f60718293a4b5c6d7e8f90",
  "task": {
    "type": "ImageToTextTask",
    "body": "iVBORw0KGgoAAAANSUhEUgAA…"
  }
}

Example request#

The smallest thing that gets a token back, in your language. Python and Node.js use the official client (pip install voidcaptcha, npm install voidcaptcha); every other language makes the HTTP call its standard library already has. The complete version, with the key read from the environment and the error envelope checked, is in Sample code at the bottom of this page.

Language choice is remembered across the whole site, so switching here carries to every other sample in the docs.

# pip install voidcaptcha
from voidcaptcha import VoidCaptcha

client = VoidCaptcha("void_a1b2c3d4e5f60718293a4b5c6d7e8f90")

result = client.solve({
    "type": "ImageToTextTask",
    "body": "iVBORw0KGgoAAAANSUhEUgAA…",
})

print(result["text"])

Example response#

A successful solve returns errorId: 0 and a solution object. The result is in solution.text. This type never opens a browser, so there is no userAgent.

solution carries those and nothing else — the gateway copies the result field, anything extra this type returns across, and drops the rest of whatever the solver sent. Timing arrives at the top level as elapsedMs, present only when the duration is known, beside cost and your remaining balance. The figures below are illustrative: nothing here is a published median.

This type also returns solution.confidence. How sure the model is, from 0 to 1. Use score in the request to have low-confidence readings refused instead of returned.

JSON
{
  "errorId": 0,
  "status": "ready",
  "solution": {
    "text": "FXBxDojZvu",
    "confidence": 0.93
  },
  "cost": "$0.0010",
  "balance": "$411.24",
  "elapsedMs": 4820
}

Errors for this type#

The codes Image to Text can return, on top of the shared authentication and billing set. Branch on errorCode, not on the HTTP status.

CodeHTTPMeaningRetry
ERROR_KEY_MISSING401No clientKey was supplied.Do not retry
ERROR_KEY_INVALID401The key does not exist or has been revoked.Do not retry
ERROR_KEY_SUSPENDED403The account attached to this key is suspended.Do not retry
ERROR_TYPE_NOT_ENABLED403This account is not enabled for the requested task type.Do not retry
ERROR_BAD_REQUEST400The body was not valid JSON, or task was missing.Do not retry
ERROR_CAPTCHA_UNSOLVABLE200The challenge was served but could not be completed.Retry
ERROR_INSUFFICIENT_BALANCE402Your balance will not cover this solve.Do not retry
ERROR_THREAD_LIMIT429You have more solves in flight than your key permits.Retry with backoff
ERROR_RATE_LIMITED429Too many requests in a short window.Retry with backoff

Every code, with the fix for each, is on the error reference. A failed solve is never charged.

Sample code#

A complete file: key from the environment, task built, errors handled, result used. Python and Node.js use the official SDK (pip install voidcaptcha, npm install voidcaptcha); the other languages call the endpoint directly.

# pip install voidcaptcha
import sys

import voidcaptcha

# The key comes from the VOIDCAPTCHA_KEY environment variable. A key in a
# committed script is a key someone else is already spending.
client = voidcaptcha.VoidCaptcha()

try:
    result = client.solve({
        "type": "ImageToTextTask",
        "body": "iVBORw0KGgoAAAANSUhEUgAA…",
    })
except voidcaptcha.SolveError as e:
    # The solve failed. It was not charged, and it is safe to retry.
    sys.exit(f"{e.code}: {e.description}")
except voidcaptcha.VoidCaptchaError as e:
    # Key, balance, limits or a bad request; e.retryable says if a retry helps.
    sys.exit(f"{e.code}: {e.description}")

print(result["text"])
print(result.cost)

Last updated on 2 August 2026