Skip to content

Popular Captcha 求解器

使用 PopularCaptchaImagePopularClassification 任务类型解决对象交互验证码。questionType 字段决定挑战的处理方式。

支持的模式

questionType说明响应格式
objectClassify从九宫格中选择所有匹配的图片每张图片一个 boolean[]
objectClick点击目标对象的中心{x, y}[] 坐标
objectDrag将拼图块拖到正确位置{start, end}[]
objectTag为图片中的对象打标签标签数组
grid通用九宫格选择布尔数组
bbox边界框检测坐标

创建任务 —— 九宫格分类

POST/createTask
Hostapi.captchasonic.com
Content-Typeapplication/json
{
    "apiKey": "YOUR_API_KEY",
    "task": {
        "type": "PopularCaptchaImage",
        "questionType": "objectClassify",
        "question": "Select all objects with a bridge",
        "queries": ["BASE64_IMG_1", "BASE64_IMG_2"]
    }
}

响应

{
    "code": 200,
    "msg": "",
    "answers": [true, false, true, true, false, true],
    "questionType": "objectClassify",
    "meta": { "pass_report": true, "fail_report": true }
}

创建任务 —— 对象点击

{
    "apiKey": "YOUR_API_KEY",
    "task": {
        "type": "PopularCaptchaImage",
        "questionType": "objectClick",
        "question": "Click on the center of the car",
        "queries": ["BASE64_MAIN_IMAGE"]
    }
}

创建任务 —— 对象拖放

{
    "apiKey": "YOUR_API_KEY",
    "task": {
        "type": "PopularCaptchaImage",
        "questionType": "objectDrag",
        "question": "Drag the puzzle piece to the gap",
        "queries": ["BASE64_BACKGROUND"],
        "examples": ["BASE64_PUZZLE_PIECE"]
    }
}

任务参数

字段类型必填说明
typestringPopularCaptchaImagePopularClassification
questionTypestringobjectClassifyobjectClickobjectDragobjectTaggridbbox
questionstring挑战指令文本
queriesstring[]base64 编码的图片
examplesstring[]仅拖放拖放任务的目标对象
screenshortboolean若图片是截图,设为 true

API 演练场

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 objects with a brid…
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