Skip to main content

ImageToTextTask

Object structure

ParameterTypeRequiredPossible valuesDescription
typeStringyesImageToTextTaskDefines the type of the task.
bodyStringyes-File body encoded in base64. Make sure to send it without line breaks.
CapMonsterModuleStringnoyandex, special and othersThe name of recognizing module, for example, “yandex“. Alternative way to pass module name and list of all available modules you can find here.
recognizingThresholdIntno0-100Captcha recognition threshold with a possible value from 0 to 100. For example, if recognizingThreshold was set to 90 and the task was solved with a confidence of 80, you won't be charged. In this case the user will get a response ERROR_CAPTCHA_UNSOLVABLE.
CaseBooleannotrue, falsetrue - if captcha is case sensitive.
numericIntno0, 11 - if captcha contains numbers only.
mathBooleannotrue, falsefalse — undefined;
true — if captcha requires a mathematical operation (for example: captcha 2 + 6 = will return a value of 8).

Request example

Method

<https://api.capmonster.cloud/createTask>

{
"clientKey":"67b6bcbb1a728ea8d563de6d169a2057",
"task": {
"type":"ImageToTextTask",
"body":"BASE64_BODY_HERE!"
}
}

Response example

{
"errorId":0,
"taskId":53456
}

Getting the result

Method

<https://api.capmonster.cloud/getTaskResult>

Use the getTaskResult method to get the captcha solution. Depending on the system load, you will receive an answer within an interval from 300ms to 6s

PropertyTypeDescription
textStringCaptcha answer

Example:

{
"errorId":0,
"status":"ready",
"solution": {
"text":"answer"
}
}