HCaptcha Solver
Solve hCaptcha image challenges by providing base64-encoded images and the question prompt. The API uses the PopularCaptchaImage task type, which supports three challenge modes.
Supported Modes
| Mode | questionType | Description | Response |
|---|---|---|---|
| Grid / Classify | objectClassify | Select all matching images from a grid | boolean[] β one per image |
| Click | objectClick | Click on the center of a target object | {x, y}[] coordinates |
| Drag & Drop | objectDrag | Drag puzzle pieces to their correct position | {start, end}[] coordinates |
Create Task β Grid / Classify
Most common mode. Send base64-encoded image tiles and the question text.
POST
/createTaskHostapi.captchasonic.com
Content-Typeapplication/json
{
"apiKey": "YOUR_API_KEY",
"task": {
"type": "PopularCaptchaImage",
"questionType": "objectClassify",
"question": "Select all images with a bus",
"queries": ["BASE64_IMG_1", "BASE64_IMG_2", "..."]
}
}
Response
{
"code": 200,
"msg": "",
"answers": [true, false, true, true, false, true, true, true, true],
"questionType": "objectClassify",
"meta": { "pass_report": true, "fail_report": true }
}
Each
answers[i]maps toqueries[i]βtruemeans the image matches the question.
Create Task β Click
Send a single image. The solver returns coordinates of the target object.
{
"apiKey": "YOUR_API_KEY",
"task": {
"type": "PopularCaptchaImage",
"questionType": "objectClick",
"question": "Click on the center of the cat",
"queries": ["BASE64_MAIN_IMAGE"]
}
}
Response
{
"code": 200,
"answers": [[{ "x": 142, "y": 205 }]],
"questionType": "objectClick"
}
Create Task β Drag & Drop
Send background image in queries and puzzle piece in examples.
{
"apiKey": "YOUR_API_KEY",
"task": {
"type": "PopularCaptchaImage",
"questionType": "objectDrag",
"question": "Drag the puzzle piece to the gap",
"queries": ["BASE64_BACKGROUND"],
"examples": ["BASE64_PUZZLE_PIECE"]
}
}
Response
{
"code": 200,
"answers": [[{ "start": [100, 200], "end": [150, 250] }]],
"questionType": "objectDrag"
}
Task Parameters
| Property | Type | Required | Description |
|---|---|---|---|
type | string | β | PopularCaptchaImage or PopularClassification |
questionType | string | β | objectClassify, objectClick, or objectDrag |
question | string | β | The challenge instruction text |
queries | string[] | β | Base64-encoded images (grid tiles or main image) |
examples | string[] | Drag only | Target objects for drag tasks |
screenshort | boolean | No | Set true if images are screenshots |
API Playground
POST
Log in to auto-fill your API key
Payload
Response
Hit Send to see response
β + Enter
Parameters
Error Codes
terminal