此页内容

FunCaptchaClassification图像识别

captchaRun

1647字约5分钟

2024-09-28

警告

该任务类型处于维护中,服务不可用,可用时间待定

请求参数

参考 🔗创建任务: /v2/tasks

参数名类型是否必填说明
captchaTypeString固定为 FunCaptchaClassification
imageStringBase64 编码的图片文件,可以是截图
imginstructionsString 问题的名称。这个参数值来自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开始
}

问题名称表

  • 支持的问题列表
    • maze
    • maze2
    • icons ("alien", "anchor", "ant", "apple" ... input the name of the icon)
    • square_icon_pair
    • dice_pair
    • dice_revised
    • dice_5_revised
    • dice_8_revised
    • dice_slow_14_revised
    • dice_7_revised
    • dice14
    • materialshapes ("materialshapes-FuzzCubeStripeCub" ... input the name of the icon)
    • dart,dart01,dart02,dart03,dart04,dart05,dart06
    • icon_connect
    • rotated
    • galaxies
    • dicematch
    • frankenhead
    • flockCompass
    • 3d_rollball_objects
    • mismatched-cube
    • mismatched-jigsaw
    • penguins
    • animalLookStanding
    • shadow-puppets
    • card
    • shadows

支持类型

支持的图片类型的问题如下:

类型英文名称描述
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_objectsChoose 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