Text captcha

Captcha types

How to send a text captcha picture and how to read the answer, a case-sensitive string.

On this page

Use textcaptcha for a picture with distorted letters and digits. The answer is the text.

#What to send

Exactly one base64 picture in image_data. No task text is needed.

Request
{"image_data": ["BASE64_IMAGE"]}

#What you get

An array with one string: the recognised text. The text is case-sensitive.

Answer
{"data": ["K7m2Q"]}

#Example

cURL

cURL
IMG=$(base64 -w0 captcha.png)
curl -X POST "https://api.solvecha.com/v1/recognition/textcaptcha" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"image_data\": [\"$IMG\"]}"

Python

Python
import base64
import requests

with open("captcha.png", "rb") as f:
    image = base64.b64encode(f.read()).decode()

job = requests.post(
    "https://api.solvecha.com/v1/recognition/textcaptcha",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={"image_data": [image]},
).json()

Node.js

Node.js
import { readFile } from "node:fs/promises";

const image = (await readFile("captcha.png")).toString("base64");
const job = await fetch("https://api.solvecha.com/v1/recognition/textcaptcha", {
  method: "POST",
  headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
  body: JSON.stringify({ image_data: [image] }),
}).then((r) => r.json());

Then fetch the answer with job.data as the id.

Solvecha is an independent service. It is not affiliated with NopeCHA, 2Captcha, CapSolver, Google or CloakHQ. Their names describe compatibility or recommendations only. Figures come from our own tests, see the compare page.

    ↑↓ to moveEnter to open