Skip to content
API
水龙头验证码

水龙头验证码

概述

超快速的水龙头验证码解决方案,价格优惠,提供自动反机器人解决扩展。反机器人验证码要求用户根据主图片选择正确的图片序列。

💰

反机器人验证码旨在防止水龙头网站(加密货币水龙头)上的垃圾邮件和自动领取机器人,用户在完成验证码后可以获得免费的加密货币。

插图

主图片:

Antibot Captcha Main

4张选择图片(编号从0到3):

图片 0

图片 0

图片 1

图片 1

图片 2

图片 2

图片 3

图片 3

1. 创建请求

请求

POST https://api.achicaptcha.com/createTask

参数

参数名称数据类型是否必需描述
clientKeystringAPI密钥
task.typestringAntibotCaptchaTask
task.imagestringbase64主图片|base64图片0|base64图片1|base64图片2|base64图片3
task.subTypestring值:0

请求示例

POST /createTask HTTP/1.1
Host: api.achicaptcha.com
Content-Type: application/json
 
{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "AntibotCaptchaTask",
    "image": "base64 main image|base64 image 0|base64 image 1|base64 image 2|base64 image 3",
    "subType": "0"
  }
}

响应

成功时,服务器返回 errorId = 0taskId

{
  "errorId": 0,
  "taskId": "f2fc70d6-c76b-4fba-9480-205ac1fe9fb9"
}

2. 获取结果

请求

POST https://api.achicaptcha.com/getTaskResult

参数

参数名称数据类型是否必需描述
clientKeystringAPI密钥
taskIdstring从(1)获取的TaskId

请求示例

POST /getTaskResult HTTP/1.1
Host: api.achicaptcha.com
Content-Type: application/json
 
{
  "clientKey": "YOUR_API_KEY",
  "taskId": "f2fc70d6-c76b-4fba-9480-205ac1fe9fb9"
}

响应

{
  "errorId": 0,
  "status": "ready",
  "solution": "swamn"
}

状态说明

  • errorId = 0status = ready:成功解决,在 solution 中读取结果,这是要点击的图片序列(从0开始)
  • errorId = 1status = processing:正在解决验证码,等待2秒后重试
  • errorId > 1:系统错误,返回错误代码和描述

集成示例

import requests
import time
 
def solve_antibot_captcha(image_base64_string, api_key='YOUR_API_KEY'):
    """
    image_base64_string 格式: "base64 main image|base64 image 0|base64 image 1|base64 image 2|base64 image 3"
    """
    
    # 步骤1:创建任务
    create_task_url = 'https://api.achicaptcha.com/createTask'
    create_task_payload = {
        'clientKey': api_key,
        'task': {
            'type': 'AntibotCaptchaTask',
            'image': image_base64_string,
            'subType': '0'
        }
    }
    
    response = requests.post(create_task_url, json=create_task_payload)
    result = response.json()
    
    if result['errorId'] != 0:
        raise Exception(result['errorDescription'])
    
    task_id = result['taskId']
    
    # 步骤2:获取结果
    get_result_url = 'https://api.achicaptcha.com/getTaskResult'
    
    while True:
        time.sleep(2)  # 等待2秒
        
        get_result_payload = {
            'clientKey': api_key,
            'taskId': task_id
        }
        
        response = requests.post(get_result_url, json=get_result_payload)
        result = response.json()
        
        if result['errorId'] == 0 and result['status'] == 'ready':
            # 返回要点击的图片序列(从0开始)
            return result['solution']
        
        if result['errorId'] == 1 and result['status'] == 'processing':
            # 处理中,继续循环
            continue
        
        # 其他错误
        raise Exception(result.get('errorDescription', 'Unknown error'))
 
# 使用方法
image_string = 'base64main|base64img0|base64img1|base64img2|base64img3'
solution = solve_antibot_captcha(image_string, 'YOUR_API_KEY')
print('反机器人验证码解决方案:', solution)
# solution 将是要点击的图片序列,例如:"swamn"

常见错误代码

错误代码描述备注
0成功成功
1处理中处理中
2缺少必填字段缺少必填字段,请再次检查参数
3不支持的任务不支持的任务类型
4任务创建失败任务创建失败
5客户端密钥不存在API密钥不存在,请再次检查API密钥
6账户余额不足账户余额不足,请充值
7任务失败,请创建新任务任务失败,请创建新任务
8任务ID不存在任务ID不存在

最佳实践

为了在使用Achicaptcha API时获得最佳结果,请遵循以下原则:

1. 图片质量

  • 使用高分辨率图片
  • 确保图片不过于模糊或有噪点
  • 正确捕获或裁剪验证码区域

2. 速率限制

  • 水龙头通常在领取之间有时间限制
  • 尊重水龙头的最小间隔
  • 不要发送垃圾请求以避免被封禁

3. 轮询间隔

  • 在结果检查之间至少等待2秒
  • 不要用过多连续请求轰炸API
  • 设置超时以避免无限循环

4. 重试逻辑

  • 对临时错误(如 ERROR_NO_SLOT_AVAILABLE)实施重试
  • 重试时使用指数退避
  • 限制最大重试次数

5. API密钥安全

  • 不要在代码中硬编码API密钥
  • 使用环境变量
  • 不要在客户端暴露API密钥

有用的链接: