图片验证码识别-定制版

本产品主要针对基础版产品识别率低或者无法识别提供专业定制模型训练,训练需求可联系客服。

  • 0元/10次
  • 1元 / 15次
  • 10元 / 200次
  • 100元 / 2500次
  • 500元 / 15000次
  • 1000元 / 40000次
  • 10次
  • 0.0
  • 支付宝
  • 暂无。
  • 免费试用

    免费提供试用服务
    满意再下单

  • 服务保障

    客服极速响应
    快速解决客户问题

  • 技术支持

    专业技术团队
    为客户提供技术支持

API接口
  • 定制版验证码识别

定制版验证码识别

接口地址:http://apigateway.jianjiaoshuju.com/api/v_1/fzyzm.html

请求方式:POST

返回类型:JSON

调试工具: 登录后方可调试    测试帮助>>

请求参数(Headers)
名称 类型 是否必须 描述
appCode STRING 必选 鉴权AppCode
appKey STRING 必选 鉴权AppKey
appSecret STRING 必选 鉴权AppSecret
请求参数(Body)
名称 类型 是否必须 描述
v_pic STRING 必选 验证码图片 base64加密字符串,可以参考:https://tool.css-js.com/base64.html
pri_id STRING 必选 定制模型编码(只有联系客服定制后方可在个人中心查看)。
请求示例
  • curl
  • Java
  • C#
  • PHP
  • Python
  • ObjectC
curl -i -X POST 'http://apigateway.jianjiaoshuju.com/api/v_1/fzyzm.html' -H 'AppCode:你自己的AppCode' -H 'AppKey:你自己的AppKey' -H 'AppSecret:你自己的AppSecret' --data 'v_pic=v_pic&v_type=v_type'
public static void main(String[] args) {
	String host = "http://apigateway.jianjiaoshuju.com";
	String path = "/api/v_1/fzyzm.html";
	String method = "POST";
	String appcode = "你自己的AppCode";
	String appKey = "你自己的AppKey";
	String appSecret = "你自己的AppSecret";
	Map headers = new HashMap();
	headers.put("appCode",appcode);
	headers.put("appKey",appKey);
	headers.put("appSecret",appSecret);
	headers.put("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
	Map querys = new HashMap();
	Map bodys = new HashMap();
	bodys.put("v_pic", "图片base64加密后的字符串");
	bodys.put("pri_id", "定制模型编码");
	try {
		/**
		* 重要提示如下:
		* HttpUtils请从
		* https://github.com/aliyun/api-gateway-demo-sign-java/blob/master/src/main/java/com/aliyun/api/gateway/demo/util/HttpUtils.java
		* 下载
		*
		* 相应的依赖请参照
		* https://github.com/aliyun/api-gateway-demo-sign-java/blob/master/pom.xml
		*/
		HttpResponse response = HttpUtils.doPost(host, path, method, headers, querys, bodys);
		System.out.println(response.toString());
		//获取response的body
		//System.out.println(EntityUtils.toString(response.getEntity()));
	} catch (Exception e) {
		e.printStackTrace();
	}
}
	    													
//using System.IO;
//using System.Text;
//using System.Net;
//using System.Net.Security;
//using System.Security.Cryptography.X509Certificates;

        private const String host = "http://apigateway.jianjiaoshuju.com";
        private const String path = "/api/v_1/fzyzm.html";
        private const String method = "POST";
        private const String appCode = "你自己的AppCode";
        private const String appKey = "你自己的AppKey";
        private const String appSecret = "你自己的AppSecret";

        static void Main(string[] args)
        {
            String querys = "";
            String bodys = "pri_id=pri_id&v_pic="+v_pic.Replace("+", "%2B");;
            String url = host + path;
            HttpWebRequest httpRequest = null;
            HttpWebResponse httpResponse = null;

            if (0 < querys.Length)
            {
                url = url + "?" + querys;
            }

            if (host.Contains("https://"))
            {
                ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult);
                httpRequest = (HttpWebRequest)WebRequest.CreateDefault(new Uri(url));
            }
            else
            {
                httpRequest = (HttpWebRequest)WebRequest.Create(url);
            }
            httpRequest.Method = method;
            httpRequest.Headers.Add("appCode",appCode);
            httpRequest.Headers.Add("appKey",appKey);
            httpRequest.Headers.Add("appSecret",appSecret);
            //根据API的要求,定义相对应的Content-Type
            httpRequest.ContentType = "application/x-www-form-urlencoded; charset=UTF-8";
            if (0 < bodys.Length)
            {
                byte[] data = Encoding.UTF8.GetBytes(bodys);
                using (Stream stream = httpRequest.GetRequestStream())
                {
                    stream.Write(data, 0, data.Length);
                }
            }
            try
            {
                httpResponse = (HttpWebResponse)httpRequest.GetResponse();
            }
            catch (WebException ex)
            {
                httpResponse = (HttpWebResponse)ex.Response;
            }

            Console.WriteLine(httpResponse.StatusCode);
            Console.WriteLine(httpResponse.Method);
            Console.WriteLine(httpResponse.Headers);
            Stream st = httpResponse.GetResponseStream();
            StreamReader reader = new StreamReader(st, Encoding.GetEncoding("utf-8"));
            Console.WriteLine(reader.ReadToEnd());
            Console.WriteLine("\n");

        }

        public static bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
        {
            return true;
        }
<?php
    $host = "http://apigateway.jianjiaoshuju.com";
    $path = "/api/v_1/fzyzm.html";
    $method = "POST";
    $appCode = "你自己的AppCode";
    $appKey = "你自己的AppKey";
    $appSecret = "你自己的AppSecret";
    $headers = array();
    array_push($headers, "appCode:" . $appCode);
    array_push($headers, "appKey:" . $appKey);
    array_push($headers, "appSecret:" . $appSecret);
    //根据API的要求,定义相对应的Content-Type
    array_push($headers, "Content-Type".":"."application/x-www-form-urlencoded; charset=UTF-8");
    $querys = "";
    $bodys = "v_pic=v_pic&pri_id=pri_id";
    $url = $host . $path;

    $curl = curl_init();
    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($curl, CURLOPT_FAILONERROR, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_HEADER, false);
    if (1 == strpos("$".$host, "https://"))
    {
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
    }
    curl_setopt($curl, CURLOPT_POSTFIELDS, $bodys);
    echo curl_exec($curl);
?>

import urllib, urllib2, sys

host = 'http://apigateway.jianjiaoshuju.com'
path = '/api/v_1/fzyzm.html'
method = 'POST'
appCode = '你自己的AppCode'
appKey = '你自己的AppKey'
appSecret = '你自己的AppSecret'
querys = ''
bodys = {}
url = host + path

bodys['v_pic'] = '''v_pic'''
bodys['pri_id'] = '''pri_id'''
post_data = urllib.urlencode(bodys)
request = urllib2.Request(url, post_data)
request.add_header('appCode', appCode)
request.add_header('appKey', appKey)
request.add_header('appSecret', appSecret)
//根据API的要求,定义相对应的Content-Type
request.add_header('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8')
response = urllib2.urlopen(request)
content = response.read()
if (content):
    print(content)
NSString *appCode = @"你自己的AppCode";
NSString *appKey = @"你自己的AppKey";
NSString *appSecret = @"你自己的AppSecret";
NSString *host = @"http://apigateway.jianjiaoshuju.com";
NSString *path = @"/api/v_1/fzyzm.html";
NSString *method = @"POST";
NSString *querys = @"";
NSString *url = [NSString stringWithFormat:@"%@%@%@",  host,  path , querys];
NSString *bodys = @"v_pic=v_pic&pri_id=pri_id";

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString: url]  cachePolicy:1  timeoutInterval:  5];
request.HTTPMethod  =  method;
[request addValue:  [NSString  stringWithFormat:appcode]  forHTTPHeaderField:  @"appCode"];
[request addValue:  [NSString  stringWithFormat:appKey]  forHTTPHeaderField:  @"appKey"];
[request addValue:  [NSString  stringWithFormat:appSecret]  forHTTPHeaderField:  @"appSecret"];
[request addValue: @"application/x-www-form-urlencoded; charset=UTF-8" forHTTPHeaderField: @"Content-Type"];
NSData *data = [bodys dataUsingEncoding: NSUTF8StringEncoding];
[request setHTTPBody: data];
NSURLSession *requestSession = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
NSURLSessionDataTask *task = [requestSession dataTaskWithRequest:request
    completionHandler:^(NSData * _Nullable body , NSURLResponse * _Nullable response, NSError * _Nullable error) {
    NSLog(@"Response object: %@" , response);
    NSString *bodyString = [[NSString alloc] initWithData:body encoding:NSUTF8StringEncoding];

    //打印应答中的body
    NSLog(@"Response body: %@" , bodyString);
    }];

[task resume];
正常返回示例
{
  "msg": "查询成功!",
  "v_type": "cn",
  "v_code": "东f龙巨乌4",
  "errCode": 0
}
错误码定义
错误码 错误信息 描述
0 查询成功! 查询成功!
101 接口参数错误! 接口参数错误!
102 接口错误! 接口错误!

指定颜色验证码识别

接口地址:http://apigateway.jianjiaoshuju.com/api/v_1/ysyzm.html

请求方式:POST

返回类型:JSON

调试工具: 登录后方可调试    测试帮助>>

请求参数(Headers)
名称 类型 是否必须 描述
appCode STRING 必选 鉴权AppCode
appKey STRING 必选 鉴权AppKey
appSecret STRING 必选 鉴权AppSecret
请求参数(Body)
名称 类型 是否必须 描述
v_pic STRING 必选 验证码图片 base64加密字符串,可以参考:https://tool.css-js.com/base64.html
v_type STRING 必选 验证码类型(固定值:col),请准确填写,以免影响识别准确性。
v_color STRING 可选 验证码图片要识别的颜色,如果图片中包含有要识别的提示汉字可不传此参数,参数值为颜色汉字(如:红色,蓝色等),避免乱码问题,请使用utf8编码。
请求示例
  • curl
  • Java
  • C#
  • PHP
  • Python
  • ObjectC
curl -i -X POST 'http://apigateway.jianjiaoshuju.com/api/v_1/ysyzm.html' -H 'AppCode:你自己的AppCode' -H 'AppKey:你自己的AppKey' -H 'AppSecret:你自己的AppSecret' --data 'v_color=%E5%A6%82%EF%BC%9A%E7%BA%A2%E8%89%B2&v_pic=v_pic&v_type=v_type'
public static void main(String[] args) {
	String host = "http://apigateway.jianjiaoshuju.com";
	String path = "/api/v_1/ysyzm.html";
	String method = "POST";
	String appcode = "你自己的AppCode";
	String appKey = "你自己的AppKey";
	String appSecret = "你自己的AppSecret";
	Map headers = new HashMap();
	headers.put("appcode",appcode);
	headers.put("appKey",appKey);
	headers.put("appSecret",appSecret);
	headers.put("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
	Map querys = new HashMap();
	Map bodys = new HashMap();
	bodys.put("v_pic", "图片base64加密后的字符串");
	bodys.put("v_type", "验证码类型");
	bodys.put("v_color", "红色");
	try {
		/**
		* 重要提示如下:
		* HttpUtils请从
		* https://github.com/aliyun/api-gateway-demo-sign-java/blob/master/src/main/java/com/aliyun/api/gateway/demo/util/HttpUtils.java
		* 下载
		*
		* 相应的依赖请参照
		* https://github.com/aliyun/api-gateway-demo-sign-java/blob/master/pom.xml
		*/
		HttpResponse response = HttpUtils.doPost(host, path, method, headers, querys, bodys);
		System.out.println(response.toString());
		//获取response的body
		//System.out.println(EntityUtils.toString(response.getEntity()));
	} catch (Exception e) {
		e.printStackTrace();
	}
}
	    													
//using System.IO;
//using System.Text;
//using System.Net;
//using System.Net.Security;
//using System.Security.Cryptography.X509Certificates;

        private const String host = "http://apigateway.jianjiaoshuju.com";
        private const String path = "/api/v_1/ysyzm.html";
        private const String method = "POST";
        private const String appcode = "你自己的AppCode";
        private const String appKey = "你自己的AppKey";
        private const String appSecret = "你自己的AppSecret";

        static void Main(string[] args)
        {
            String querys = "";
            String bodys = "v_color=v_color&v_type=v_type&v_pic="+v_pic.Replace("+", "%2B");;
            String url = host + path;
            HttpWebRequest httpRequest = null;
            HttpWebResponse httpResponse = null;

            if (0 < querys.Length)
            {
                url = url + "?" + querys;
            }

            if (host.Contains("https://"))
            {
                ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult);
                httpRequest = (HttpWebRequest)WebRequest.CreateDefault(new Uri(url));
            }
            else
            {
                httpRequest = (HttpWebRequest)WebRequest.Create(url);
            }
            httpRequest.Method = method;
            httpRequest.Headers.Add("appcode",appcode);
            httpRequest.Headers.Add("appKey",appKey);
            httpRequest.Headers.Add("appSecret",appSecret);
            //根据API的要求,定义相对应的Content-Type
            httpRequest.ContentType = "application/x-www-form-urlencoded; charset=UTF-8";
            if (0 < bodys.Length)
            {
                byte[] data = Encoding.UTF8.GetBytes(bodys);
                using (Stream stream = httpRequest.GetRequestStream())
                {
                    stream.Write(data, 0, data.Length);
                }
            }
            try
            {
                httpResponse = (HttpWebResponse)httpRequest.GetResponse();
            }
            catch (WebException ex)
            {
                httpResponse = (HttpWebResponse)ex.Response;
            }

            Console.WriteLine(httpResponse.StatusCode);
            Console.WriteLine(httpResponse.Method);
            Console.WriteLine(httpResponse.Headers);
            Stream st = httpResponse.GetResponseStream();
            StreamReader reader = new StreamReader(st, Encoding.GetEncoding("utf-8"));
            Console.WriteLine(reader.ReadToEnd());
            Console.WriteLine("\n");

        }

        public static bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
        {
            return true;
        }
<?php
    $host = "http://apigateway.jianjiaoshuju.com";
    $path = "/api/v_1/ysyzm.html";
    $method = "POST";
    $appcode = "你自己的AppCode";
    $appKey = "你自己的AppKey";
    $appSecret = "你自己的AppSecret";
    $headers = array();
    array_push($headers, "appcode:" . $appcode);
    array_push($headers, "appKey:" . $appKey);
    array_push($headers, "appSecret:" . $appSecret);
    //根据API的要求,定义相对应的Content-Type
    array_push($headers, "Content-Type".":"."application/x-www-form-urlencoded; charset=UTF-8");
    $querys = "";
    $bodys = "v_color=v_color&v_pic=v_pic&v_type=v_type";
    $url = $host . $path;

    $curl = curl_init();
    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($curl, CURLOPT_FAILONERROR, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_HEADER, false);
    if (1 == strpos("$".$host, "https://"))
    {
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
    }
    curl_setopt($curl, CURLOPT_POSTFIELDS, $bodys);
    echo curl_exec($curl);
?>

import urllib, urllib2, sys

host = 'http://apigateway.jianjiaoshuju.com'
path = '/api/v_1/ysyzm.html'
method = 'POST'
appcode = '你自己的AppCode'
appKey = '你自己的AppKey'
appSecret = '你自己的AppSecret'
querys = ''
bodys = {}
url = host + path

bodys['v_pic'] = '''v_pic'''
bodys['v_type'] = '''v_type'''
bodys['v_color'] = '红色'
post_data = urllib.urlencode(bodys)
request = urllib2.Request(url, post_data)
request.add_header('appcode', appcode)
request.add_header('appKey', appKey)
request.add_header('appSecret', appSecret)
//根据API的要求,定义相对应的Content-Type
request.add_header('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8')
response = urllib2.urlopen(request)
content = response.read()
if (content):
    print(content)
NSString *appcode = @"你自己的AppCode";
NSString *appKey = @"你自己的AppKey";
NSString *appSecret = @"你自己的AppSecret";
NSString *host = @"http://apigateway.jianjiaoshuju.com";
NSString *path = @"/api/v_1/ysyzm.html";
NSString *method = @"POST";
NSString *querys = @"";
NSString *url = [NSString stringWithFormat:@"%@%@%@",  host,  path , querys];
NSString *bodys = @"v_color=v_color&v_pic=v_pic&v_type=v_type";

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString: url]  cachePolicy:1  timeoutInterval:  5];
request.HTTPMethod  =  method;
[request addValue:  [NSString  stringWithFormat:appcode]  forHTTPHeaderField:  @"appcode"];
[request addValue:  [NSString  stringWithFormat:appKey]  forHTTPHeaderField:  @"appKey"];
[request addValue:  [NSString  stringWithFormat:appSecret]  forHTTPHeaderField:  @"appSecret"];
[request addValue: @"application/x-www-form-urlencoded; charset=UTF-8" forHTTPHeaderField: @"Content-Type"];
NSData *data = [bodys dataUsingEncoding: NSUTF8StringEncoding];
[request setHTTPBody: data];
NSURLSession *requestSession = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
NSURLSessionDataTask *task = [requestSession dataTaskWithRequest:request
    completionHandler:^(NSData * _Nullable body , NSURLResponse * _Nullable response, NSError * _Nullable error) {
    NSLog(@"Response object: %@" , response);
    NSString *bodyString = [[NSString alloc] initWithData:body encoding:NSUTF8StringEncoding];

    //打印应答中的body
    NSLog(@"Response body: %@" , bodyString);
    }];

[task resume];
正常返回示例
{
  "msg": "查询成功!",
  "v_code": "热k",
  "errCode": 0,
  "v_color": "黄色",
  "v_type": "col"
}
错误码定义
错误码 错误信息 描述
0 查询成功! 查询成功!
101 接口参数错误! 接口参数错误!
102 接口错误! 接口错误!

周一至周五 9:00-18:00

尖叫网络

尖叫数据