You need to enable JavaScript to run this app.
导航
接口文档
最近更新时间:2022.02.25 11:08:45首次发布时间:2022.02.25 11:08:45
我的收藏
有用
有用
无用
无用

接入指引

请先查看接入指引了解具体接入方式,再参考此文档完成接入。

请求API

名称内容
请求方式POST
Content-Typeapplication/x-www-form-urlencoded
图片要求1. 图片格式:JPG、JPEG、PNG、BMP等常见格式,建议使用JPG格式。
2. 图片文件大小:最大 5 MB。

输入参数

Query参数:

参数可选/必选类型说明
Action必选String接口名,取值:OcrSeal
Version必选String版本号,取值:2021-08-23

Body参数:

参数可选/必选类型说明
image_base64必选String图片base64编码

API返回 (通用返回字段见通用返回字段及错误码

data 字段说明

字段类型说明备注
seal_infosArray of seal_info检测到的每一个印章信息字段说明见下方

seal_info 字段说明

字段类型说明备注
seal_typeString印章类型seal_noise(不完整印章)/normal_seal(圆形印章)/ellipse_seal(椭圆印章)
seal_colorString印章颜色red(红章)/blue(蓝章)/black(黑白章)
curve_textString曲文主页信息
curve_text_polyArray of points曲文位置外接多边形
plain_text_1String税号主页信息
plain_text_1_polyArray of points税号位置外接多边形
plain_text_2String专用章类型主页信息
plain_text_2_polyArray of points专用章类型位置外接多边形
polyArray of points印章位置印章的bbox角点 [左上,右上,右下,左下]

错误码(通用错误码见通用返回字段及错误码

HttpCode错误码错误消息描述
20010000请求成功
40060103"Missing Input Parameters: empty input image"输入图片为空
40060301"Invalid Input Image: get input image error"获取图片错误
40061301"Invalid Input Parameters: Input image can not be decoded"输入图片错误

返回值示例

主页面图片返回值示例

{
    "code":10000,
    "data":{
        "seal_infos":[
            {
                "seal_type":"ellipse_seal",
                "seal_color":"red",
                "curve_text":"宁波迅途信息技术有限公司",
                "curve_text_poly":[
                    [641, 454], [641, 461], [655, 461], [656, 459], [657, 446], [661, 436], [665, 433], [675, 425], [682, 423], [697, 419], [722, 419], [740, 426], [749, 434], [756, 441], [758, 447], [758, 457], [760, 461], [772, 459], [773, 447], [771, 439], [764, 426], [753, 416], [745, 412], [730, 407], [717, 403], [706, 403], [679, 408], [659, 418], [651, 426], [646, 434], [642, 445]
                ]
                "plain_text_1":"913302820629019631",
                "plain_text_1_poly":[
                    [661, 447], [661, 458], [663, 459], [753, 459], [754, 458], [753, 457], [753, 446], [753, 446], [663, 446]
                ]
                "plain_text_2":"发票专用章",
                "plain_text_2_poly":[
                    674, 470], [675, 471], [675, 476], [674, 476], [674, 485], [675, 486], [679, 486], [679, 485], [739, 485], [740, 484], [740, 482], [740, 481], [740, 476], [740, 476], [740, 471], [740, 471], [740, 469], [739, 469], [675, 469], [675, 470]
                ]
                "poly":[
                    [636, 399], [780, 399], [780, 506], [636, 506]
                ]
            },
        ]
    },
    "message":"Success",
    "request_id":"68465821727368171521594094134",
    "time_elapsed":"509.475088ms"
}