Skip to content

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

ModequestionTypeDescriptionResponse
Grid / ClassifyobjectClassifySelect all matching images from a gridboolean[] β€” one per image
ClickobjectClickClick on the center of a target object{x, y}[] coordinates
Drag & DropobjectDragDrag 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/createTask
Hostapi.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 to queries[i] β€” true means 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

PropertyTypeRequiredDescription
typestringβœ…PopularCaptchaImage or PopularClassification
questionTypestringβœ…objectClassify, objectClick, or objectDrag
questionstringβœ…The challenge instruction text
queriesstring[]βœ…Base64-encoded images (grid tiles or main image)
examplesstring[]Drag onlyTarget objects for drag tasks
screenshortbooleanNoSet 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

apiKeystringYOUR_API_KEY
taskobject{...}
β”” typestringPopularCaptchaImage
β”” questionTypestringobjectClassify
β”” questionstringSelect all images with a bus
β”” queriesarray[2 items]

Error Codes

1KEY_DOES_NOT_EXIST
2NO_SLOT_AVAILABLE
3ZERO_BALANCE
10ERROR_BAD_PARAMETERS
12ERROR_CAPTCHA_UNSOLVABLE
14PLAN_EXPIRED
16RATE_LIMITED
17DAILY_LIMIT_EXCEEDED
18QUOTA_LIMIT_EXCEEDED
21SERVICE_UNAVAILABLE
Code
terminal