Popular Captcha 求解器
使用 PopularCaptchaImage 或 PopularClassification 任务类型解决对象交互验证码。questionType 字段决定挑战的处理方式。
支持的模式
questionType | 说明 | 响应格式 |
|---|---|---|
objectClassify | 从九宫格中选择所有匹配的图片 | 每张图片一个 boolean[] |
objectClick | 点击目标对象的中心 | {x, y}[] 坐标 |
objectDrag | 将拼图块拖到正确位置 | {start, end}[] |
objectTag | 为图片中的对象打标签 | 标签数组 |
grid | 通用九宫格选择 | 布尔数组 |
bbox | 边界框检测 | 坐标 |
创建任务 —— 九宫格分类
POST
/createTaskHostapi.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"]
}
}
任务参数
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
type | string | ✅ | PopularCaptchaImage 或 PopularClassification |
questionType | string | ✅ | objectClassify、objectClick、objectDrag、objectTag、grid、bbox |
question | string | ✅ | 挑战指令文本 |
queries | string[] | ✅ | base64 编码的图片 |
examples | string[] | 仅拖放 | 拖放任务的目标对象 |
screenshort | boolean | 否 | 若图片是截图,设为 true |
API 演练场
POST
Log in to auto-fill your API key
Payload
Response
Hit Send to see response
⌘ + Enter
Parameters
Error Codes
terminal