支持的图片格式: PNG, JPG, JPEG, GIF, BMP
请上传6位数字验证码图片
您也可以通过API接口直接调用验证码识别功能:
POST /predict
Content-Type: multipart/form-data
参数:
image: 图片文件
响应格式:
{
"success": true,
"captcha": "123456"
}
或者失败时:
{
"success": false,
"error": "错误信息"
}
示例调用:
curl -X POST -F "image=@captcha.png" http://localhost:5000/predict
POST /predict
Content-Type: application/json
参数:
{
"image": "base64编码的图片数据",
"filetype": "png" // 可选,文件类型,默认为png
}
响应格式:
{
"success": true,
"captcha": "123456"
}
或者失败时:
{
"success": false,
"error": "错误信息"
}
示例调用:
curl -X POST -H "Content-Type: application/json" -d '{"image":"iVBORw0KG..."}' http://localhost:5000/predict