DocumentationAPI v1
Captcha Recognition•Proxyless Vision / Audio AI~190ms avg99.0% accuracy$0.55 / 1k

hCaptcha Visual Grid, Click & Drag Classification

POST/api/v1/tasks:solve
POST/api/v1/createTask

Fast (~190ms) recognition for all three hCaptcha visual task types: 9-tile binary selection (image_label_binary), single-canvas point clicks (image_label_area_select), and drag-and-drop segment matching (image_drag_drop).

Prefer a direct h-captcha-response token without automating UI clicks?View hCaptcha Token Solver →
Live hCaptcha Drag & Drop Vision Preview

Real-time bounding-box & drag vector coordinate detection.

hCaptcha • Drag & Drop

Supported Task Types & Modes

Task TypeModeRecommended ForRate / 1k
HCaptchaClassification (Binary Grid)9 Queries → boolean[]image_label_binary: pass 1–9 Base64 tile images in queries → returns [true, false, ...]$0.55
HCaptchaClassification (Area Select)1 Canvas → [x, y]image_label_area_select: click specific entity/head/center → returns box: [x, y]$0.55
HCaptchaClassification (Drag & Drop)Drag Vector → [x1,y1,x2,y2]image_drag_drop: match floating puzzle piece to target slot → returns source & target coordinates$0.60

Mapping hCaptcha /getcaptcha request_type to Solution Output

Inspect request_type in the hcaptcha.com/getcaptcha/... JSON response:

hCaptcha request_typeInput PayloadReturned Solution Structure
image_label_binaryqueries: [9 Base64 tiles], questionsolution.objects: [true, false, true, ...]
image_label_area_selectqueries: [1 Base64 canvas], questionsolution.box: [x, y] click coordinate
image_drag_dropqueries: [composite canvas Base64], questionsolution.drags: [{from: [x1, y1], to: [x2, y2]}]
image_label_multiple_choicequeries: [1 Base64 image + 3 options]solution.objects: [selectedOptionIndex]
How to Locate Required Parameters
  1. Intercept POST https://api.hcaptcha.com/getcaptcha/<sitekey> in Playwright to read requester_question.en and tasklist[].datapoint_uri.
  2. Download each datapoint_uri image (plus requester_restricted_answer_set / example images if shown) and encode as Base64.
  3. Submit queries (array of Base64 strings), question, and optional examples to HCaptchaClassification via /api/v1/tasks:solve.
  4. Apply clicks or drag gestures inside the challenge iframe using natural randomized bezier mouse movements.

Request Parameters

ParameterTypeRequiredDescription
task.typestringRequired
Must be "HCaptchaClassification".
Example: "HCaptchaClassification"
task.queriesstring[]Required
Array of 1–9 raw Base64 task images (without data-URI prefix).
Example: ["iVBORw0KGgoAAA...", "iVBORw0KGgoAAA..."]
task.questionstringRequired
English prompt from requester_question.en.
Example: "Please click each image containing a hedgehog"
task.examplesstring[]Optional
Optional reference example Base64 images shown in the top banner for visual-similarity prompts.
Example: ["iVBORw0KGgoAAA...ref1"]
task.coordinatebooleanOptional
Set true for image_label_area_select to force pixel [x, y] output.
Example: true

Request Examples

Create & Poll Task
curl -X POST https://api.byecap.org/api/v1/tasks:solve \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
    "task": {
      "type": "HCaptchaClassification",
      "queries": [
        "/9j/4AAQSkZJRgABAQ...img0",
        "/9j/4AAQSkZJRgABAQ...img1"
      ],
      "question": "Please click each image containing a hedgehog"
    }
  }'

Response Format

200 OK — Ready Solution
{
  "errorId": 0,
  "taskId": "hc6610b2-8f19-4c22-910a-44e9102c88d1",
  "status": "ready",
  "latency_ms": 176,
  "solution": {
    "objects": [true, false, false, true, false, true, false, false, true]
  }
}
Response FieldTypeDescription
solution.objectsboolean[]Boolean flags corresponding 1:1 with task.queries[] for binary 9-tile grids.
solution.box[number, number]Pixel [x, y] coordinate for image_label_area_select.
solution.dragsArray<{from: [number,number], to: [number,number]}>Start and destination pixel coordinates for drag-and-drop segments.

Executing Human-Like Drag & Drop in Playwright

Browser / Client Integration
for (const seg of solution.drags ?? []) {
  const [x1, y1] = seg.from;
  const [x2, y2] = seg.to;
  await page.mouse.move(canvasBox.x + x1, canvasBox.y + y1, { steps: 8 });
  await page.mouse.down();
  await page.mouse.move(canvasBox.x + x2, canvasBox.y + y2, { steps: 18 });
  await page.mouse.up();
}

Error Codes & Troubleshooting

Error CodeCommon CauseResolution
ERROR_EMPTY_QUERIESqueries array was empty or contained data-URI headers.Pass 1–9 raw Base64 strings in task.queries.
Best Practices & Billing Protection
  • Always pass task.examples when hCaptcha shows reference images in the prompt header—modern zero-shot hCaptcha prompts rely heavily on visual comparison against the banner example!
  • Add 12–25 mouse interpolation steps when executing drags so motion biometrics look natural.
  • Failed classifications are refunded 100% automatically.
Need custom concurrency or a dedicated model? View Pricing & Enterprise Plans →