NeuroCaptcha

Image captcha

Image captcha: parameters, request, response and the 2Captcha method of ImageToTextTask.

On this page

A picture with distorted text or digits. Send the image in base64 and get the text in solution.text; the options say what the answer may contain (digits only, a sum to calculate, case, length, the language of the workers' pool).

Statuscoming soon
Type codesImageToTextTask — without a proxy
Proxynot needed
Also accepted as—
Priceset when the type is switched on — see pricing

Parameters#

Fields of the task object in createTask:

type
stringrequired
Task type: ImageToTextTask.
body
stringrequired
The captcha file in base64. Base64 picture (PNG, JPEG, GIF, WEBP or BMP), a data:image/…;base64, prefix is allowed; up to 600 KB decoded.
phrase
boolean
true when the answer has two or more words. true or false (1 and 0 are accepted too).
case
boolean
true when the answer is case-sensitive. true or false (1 and 0 are accepted too).
numeric
integer
0 any characters, 1 digits only, 2 letters only, 3 digits or letters, 4 both. Integer from 0 to 4.
math
boolean
true when the picture is a sum to calculate. true or false (1 and 0 are accepted too).
minLength
integer
Minimum length of the answer, 0 for no limit. Integer from 0 to 100.
maxLength
integer
Maximum length of the answer, 0 for no limit. Integer from 0 to 100.
comment
string
Instruction for the solver. One line of text, up to 1024 characters.
imgInstructions
string
Instruction as a picture. Base64 picture (PNG, JPEG, GIF, WEBP or BMP), a data:image/…;base64, prefix is allowed; up to 100 KB decoded.
languagePool
string
Language of the workers: en (default), ru, zh and other two-letter codes. It may also be sent next to task, as 2Captcha clients do. Letters, digits and _ - . :, up to 8 characters.

Request#

A ImageToTextTask task:

POST /createTask
{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "ImageToTextTask",
    "body": "iVBORw0KGgoAAAANSUhEUgAA…"
  }
}

Response#

getTaskResult once the task is solved:

getTaskResult
{
  "errorId": 0,
  "status": "ready",
  "solution": {
    "text": "x7k2p",
    "userAgent": ""
  },
  "cost": "0.000500",
  "ip": "198.51.100.7",
  "createTime": 1793370000,
  "endTime": 1793370012,
  "solveCount": 1
}

2Captcha in.php#

The same task through the 2Captcha API: method=base64 (or method=post with the picture in file), parameters → task fields:

in.phptask
bodybody
phrasephrase
regsensecase
numericnumeric
calcmath
min_lenminLength
max_lenmaxLength
textinstructionscomment
imginstructionsimgInstructions
langlanguagePool

res.php returns text of the solution as text (OK|…), or in request with json=1.