captchaRun
1647字约5分钟
2024-09-28
警告
该任务类型处于维护中,服务不可用,可用时间待定
参数名 | 类型 | 是否必填 | 说明 |
captchaType | String | 是 | 固定为 FunCaptchaClassification |
image | String | 是 | Base64 编码的图片文件,可以是截图 |
imginstructions | String | 是 | 问题的名称。这个参数值来自API响应的 game_variant 字段。 案例: maze,maze2,flockCompass,3d_rollball_objects |
注意
图片 Base64 请不要包含 "data:image/***;base64,"
POST https://api.captcha.run/v2/tasks
Content-Type: application/json
Authorization: Bearer 00000000-0000-0000-0000-000000000000
{
"captchaType": "FunCaptchaClassification",
"image": "/9j/4AAQSkZJRgABAQAAAkiOOIucyMmHHVdLmLXpRtPg3Vqboi/jze0nKm5DJ3aQ+19/zHmK292ZU8O0h...",
"imginstructions": "3d_rollball_objects"
}
Curl
curl -X POST "https://api.captcha.run/v2/tasks" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer 00000000-0000-0000-0000-000000000000" \
-d '{
"captchaType": "FunCaptchaClassification",
"image": "/9j/4AAQSkZJRgABAQAAAkiOOIucyMmHHVdLmLXpRtPg3Vqboi/jze0nKm5DJ3aQ+19/zHmK292ZU8O0h...",
"imginstructions": "3d_rollball_objects"
}'
Python
import requests
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer 00000000-0000-0000-0000-000000000000',
}
json_data = {
'captchaType': 'FunCaptchaClassification',
'image': '/9j/4AAQSkZJRgABAQAAAkiOOIucyMmHHVdLmLXpRtPg3Vqboi/jze0nKm5DJ3aQ+19/zHmK292ZU8O0h...',
'imginstructions': '3d_rollball_objects',
}
response = requests.post('https://api.captcha.run/v2/tasks', headers=headers, json=json_data)
Javascript
const resp = await fetch('https://api.captcha.run/v2/tasks', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer 00000000-0000-0000-0000-000000000000'
},
body: JSON.stringify({
"captchaType": "FunCaptchaClassification",
"image": "/9j/4AAQSkZJRgABAQAAAkiOOIucyMmHHVdLmLXpRtPg3Vqboi/jze0nKm5DJ3aQ+19/zHmK292ZU8O0h...",
"imginstructions": "3d_rollball_objects"
}),
});
const json = await resp.json();
console.info(json);
Python-Demo
import requests
import base64
token = "xxxxx"
import requests
headers = {
'Content-Type': 'application/json',
'Authorization': f'Bearer {token}',
}
with open("payload.jpg", "rb") as image_file:
encoded_string = base64.b64encode(image_file.read()).decode('utf-8')
json_data = {
'captchaType': 'FunCaptchaClassification',
'image': encoded_string,
'imginstructions': '3d_rollball_objects',
}
response = requests.post('https://api.captcha.run/v2/tasks', headers=headers, json=json_data)
print(response.json())
重要
本接口为同步返回结果,无需调用获取结果接口
{
"taskId": "ada7d30b-a12f-4105-85a5-0aa90bf0487a",
"result": 4 // 从0开始
}
支持的图片类型的问题如下:
类型 | 英文名称 | 描述 |
![]() | Pick the bicycle | 此类型目前支持95个分类 |
![]() | Pick the bicycle | 动物的类型有兔子,犀牛等,都已经支持 |
![]() | Pick the spiral galaxy | 选择银河类型的小图 |
![]() | Pick any square | 选择方形图的小图,目前使用此图片类型网站的较少 |
![]() | Pick the mouse that can't reach the cheese | 只有当ip被检测的情况下会出现此类型图片,正确率一般,建议更换ip |
![]() | Pick the bicycle | 有2个骰子和3个骰子两种类型,目前都已经支持 |
![]() | Pick the dice pair whose top sides add up to 7 | 选择顶面和为7的小图 |
![]() | Pick the dice pair whose top sides add up to 5 | 选择顶面和为5的小图,还有和为6图片,这两种图片类型一样 |
![]() | Pick the dice pair whose top sides add up to 8 | 选择顶面和为8的小图,还有和为9的图片,这两种图片类型一样 |
![]() | Pick the dice pair whose top sides add up to 14 | 选择顶面和为14的小图 |
![]() | Pick the image where the darts add up to 8 | 选择飞镖所在的数字和为8,或者10,12,14的小图 |
![]() | Pick the image where the darts add up to 16 | 选择飞镖所在的数字和为16或者18的图片 |
![]() | Pick one square that shows two identical objects | 选择有相同的图标的小图,此类型使用的网站较多 |
![]() | Pick the image where all animals are walking in the same direction as the arrow | 选择动物和箭头的朝向一致的小图 |
![]() | Pick the shadow that matches the icons at the top of the image | 选择图像和阴影相匹配的小图 |
![]() | Pick the shadow with a different object silhouette | 选择图像和阴影不匹配的小图 |
![]() | Pick the wrong shadow | 选择图像和影子不匹配的小图 |
![]() | Pick the matching cards | 选择两张卡片上图案和数字相同的小图 |
![]() | Pick the animal looking at the shape that matchets the shape it's standing on | 选择动物眼睛朝向的方向对应的图形和脚底的图形一致的小图(比如这张图片选择第4张小图,眼睛和脚底的图形都是五角星) |
![]() | 1. Pick the image of the fuzzy cube and the striped cube 2. Pick the image of the striped cube and the checkered cube 3. Pick the image of the brick cube and the striped heart 4. Pick the image of the brick cube and the striped sphere 5. Pick the image of the striped cube and the checkered heart | 选择图像条纹和形状都匹配的小图,此类型图片问题较多,目前支持了5种问题 |
![]() | Pick the puzzle with the wrong pieces | 选择拼图错误的小图(比如当前这张图老虎和蝴蝶拼图错误) |
![]() | Pick the cube with icons split in half | 选择图像上半身和下半身不匹配的小图 |
![]() | Pick the penguin | 选择较大那只企鹅坐所在的小图 |
![]() | 3d_rollball_objects | Choose a picture with the finger pointing in the same direction as the animal is facing |
![]() | hopscotch_v2 | |
![]() | hopscotch_highsec | |
![]() | numericalmatch | |
![]() | coordinatesmatch | |
![]() | 3d_rollball_objects_multi | |
![]() | hand_number_puzzle | |
![]() | trains_simple | |
![]() | icon_connect | |
![]() | knotsCrossesCircle |