@captcha-libs/solvecha
v0.0.0
Published
Solvecha NodeJS client, image captcha recognition service
Maintainers
Readme
Solvecha NodeJS captcha client - picture and text recognition
Docs: https://solvecha.com/docs
Solvecha recognises pictures and text. It has no token tasks (no reCAPTCHA token, hCaptcha, Turnstile and so on).
Supported tasks: ReCaptchaV2Classification (image and question) and ImageToTextTask.
Installation
npm i @captcha-libs/solvecha
Usage
import { Solvecha, ReCaptchaV2Classification } from "@captcha-libs/solvecha";
const solvechaClient = new Solvecha({
clientKey: "<YOUR_API_KEY>",
pollingInterval: 2000, // optional, default: 2000ms
timeout: 120_000, // optional, default: 120000ms
});
const request = new ReCaptchaV2Classification({
image: "<BASE64_IMAGE>",
question: "/m/04_sv",
});
const { solution } = await solvechaClient.solve(request);
// solution.objects: tile numbers counted from 0 (grid), solution.hasObject (single tile)import { Solvecha, ImageToTextTask } from "@captcha-libs/solvecha";
const { solution } = await solvechaClient.solve(
new ImageToTextTask({ body: "<BASE64_IMAGE>" })
);
// solution.textBalance
const { balance } = await solvechaClient.getBalance();getBalance returns the prepaid balance only. Plan quotas and the free daily quota are not part of it, so a balance of 0 does not mean that solving fails. The client never checks the balance before a solve.
Errors
API errors keep the message of the response, for example Solvecha: ERROR_KEY_DENIED_ACCESS - The clientKey is missing or wrong.
Contact: [email protected]
