captchakings
v1.0.0
Published
Official Node.js client library for CaptchaKings API
Maintainers
Readme
CaptchaKings Node.js Library
Official Node.js client for the CaptchaKings API. Easily integrate CAPTCHA solving capabilities into your Node.js applications.
Installation
Install via npm:
npm install captchakingsUsage
Basic Example
const CaptchaKings = require('captchakings');
(async () => {
// Initialize with your API Key
const ck = new CaptchaKings('YOUR_API_KEY');
// Solve CAPTCHA
const result = await ck.solve('./captcha.jpg');
if (result.success) {
console.log(`Prediction: ${result.data.prediction}`);
console.log(`Confidence: ${result.data.confidence}`);
} else {
console.log(`Error: ${result.error}`);
}
})();Error Handling
The library handles API errors and network issues gracefully.
const result = await ck.solve('./missing-file.jpg');
if (!result.success) {
console.error('Failed to solve captcha:', result.error);
}Custom Timeout
You can set a custom timeout (default is 30 seconds).
ck.setTimeout(60000); // 60 secondsLicense
MIT
