Dashboard

Captcha Solving

Scrayle provides automated CAPTCHA solving for reCAPTCHA v2/v3, hCaptcha, and Cloudflare Turnstile. Use the CAPTCHA service standalone or enable it as part of AI agent sessions.

Supported CAPTCHA Types

TypeTask Type ID
reCAPTCHA v2RecaptchaV2TaskProxyless
reCAPTCHA v3RecaptchaV3TaskProxyless
hCaptchaHCaptchaTaskProxyless
Cloudflare TurnstileTurnstileTaskProxyless

SDK Usage

Solve a CAPTCHA (sync - waits for result)

import { ScrayleClient } from '@scrayle/sdk';

const client = new ScrayleClient();

const solution = await client.captcha.captchaSolver({
  type: 'RecaptchaV2TaskProxyless',
  websiteURL: 'https://example.com/login',
  websiteKey: '6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-',
});

if (solution.status === 'ready') {
  console.log(solution.solution?.gRecaptchaResponse);
}

Async - Create and Poll

// Create the task
const task = await client.captcha.captchaCreate({
  type: 'HCaptchaTaskProxyless',
  websiteURL: 'https://example.com',
  websiteKey: 'abc123-site-key',
});

console.log(task.data.taskId);

// Poll for result
const result = await client.captcha.captchaResultGet(task.data.taskId);
if (result.data.status === 'ready') {
  console.log(result.data.solution?.token);
}

Cloudflare Turnstile

const solution = await client.captcha.captchaSolver({
  type: 'TurnstileTaskProxyless',
  websiteURL: 'https://example.com',
  websiteKey: '0x4AAAAAAAB...',
});

console.log(solution.solution?.token);

reCAPTCHA v3

const solution = await client.captcha.captchaSolver({
  type: 'RecaptchaV3TaskProxyless',
  websiteURL: 'https://example.com',
  websiteKey: '6Lc...',
  minScore: 0.7,
  pageAction: 'login',
});

REST API

POST https://api.scrayle.com/api/v1/captcha/create

Headers:
  x-api-key: YOUR_API_KEY
  Content-Type: application/json

Body:
{
  "type": "RecaptchaV2TaskProxyless",
  "websiteURL": "https://example.com",
  "websiteKey": "6Le-wvkS..."
}

Response:
{
  "taskId": "captcha_abc123"
}
GET https://api.scrayle.com/api/v1/captcha/result/{taskId}

Response:
{
  "taskId": "captcha_abc123",
  "status": "ready",
  "solution": {
    "gRecaptchaResponse": "03AGdBq26..."
  }
}

Using with AI Agent

Enable automatic CAPTCHA solving in AI agent sessions by setting captchaSolver: true. The agent will detect and solve CAPTCHAs automatically when encountered.

POST https://api.scrayle.com/api/v1/ai/agent
{
  "task": "Login to example.com with username [email protected]",
  "startUrl": "https://example.com/login",
  "captchaSolver": true
}
💡Credits

Each CAPTCHA solve costs 3 credits. When used with the AI agent, it adds 3 credits to the session cost.

Solution Object

interface CaptchaSolution {
  taskId: string;
  status: 'idle' | 'processing' | 'ready' | 'failed';
  solution?: {
    gRecaptchaResponse?: string;  // For reCAPTCHA
    token?: string;                // For hCaptcha / Turnstile
  };
  error?: string;
}