文档中心
API调试

功能描述

保单识别

请求URL

https://api.textin.com/ai/service/v1/commercial_insurance_policy

HTTP请求方法(Method)

HTTP POST

请求头说明(Request Headers)

请在HTTP请求中添加以下自定义标头(Header)。

header 名
x-ti-app-id 请登录后前往 “工作台-账号设置-开发者信息” 查看 x-ti-app-id
x-ti-secret-code 请登录后前往 “工作台-账号设置-开发者信息” 查看 x-ti-secret-code

请求体说明(Request Body)

Content-Type: application/octet-stream

要上传的图片,目前支持jpg, png, bmp, pdf, tiff, 单帧gif等大部分格式.

请注意,请求体的数据格式为文件的二进制流,非 FormData 或其他格式。文件大小不超过 10M,图像宽高须介于 20 和 10000(像素)之间。

响应体说明(Response)

Content-Type: application/json

JSON结构说明如下:

字段名 类型 描述
code integer 错误码,详见“错误码说明”
message string

错误信息

result object
+ type string

识别保单类型

  • commercial_insurance_policy: 商业险保单
  • traffic_insurance_policy: 交强险保单
  • other: 其他
+ rotated_image_width integer

正方向时图片的宽

+ rotated_image_height integer

正方向时图片高

+ image_angle integer

图片角度,指原图需要经过顺时针旋转多少度,才能得到正方向的图片

+ version string

nlp基础服务版本号

+ duration integer

服务调用时间,单位ms

+ item_list array
   ++ key string

商业险识别的字段

  • policy_name 保单名称
  • insurance_company 保险公司名称
  • policy_no 保险单号
  • insured 被保险人
  • frame_number 车架号
  • engine_number 发动机号码
  • use_nature 使用性质
  • vehicles 机动车种类
  • motor_vehicle 机动车损失保险
  • motor_vehicle_liability 机动车第三者责任保险
  • total_premium 保险费合计
  • insurance_period 保险期间
  • special_agreement 特别约定
  • signature 保险人签章
  • plate_number 号牌号码
  • name_insurer 保险人公司名称
  • insured_card 被保险人证件号码
  • brand_model 厂牌型号
  • signature_whether_red 是否红章
  • total_fare 车船费合计
  • ship_amount_due 车船当年应缴金额
   ++ value string

商业险保单字段对应的结构化数据

   ++ confidence number
   ++ position array

识别的字段在旋转后图中的坐标, 是个长度为8的数组 [0,1,2,3,4,5,6,7]

  • (0, 1) 左上角坐标
  • (2, 3) 右上角坐标
  • (4, 5) 右下角坐标
  • (6, 7) 左下角坐标
   ++ description string

结构化识别字段的中文描述

   + insurance_list array
   ++ array
   +++ key string 商业险识别的字段
  • insurance_product 承保险种
  • insurance_fee 保险费
   +++ value string 商业险保单字段对应的结构化数据
   +++ confidence number
   +++ position array

识别的字段在旋转后图中的坐标, 是个长度为8的数组 [0,1,2,3,4,5,6,7]

  • (0, 1) 左上角坐标
  • (2, 3) 右上角坐标
  • (4, 5) 右下角坐标
  • (6, 7) 左下角坐标
   +++ description string

结构化识别字段的中文描述

JSON结构示例

{
    "code": 200,
    "message": "success",
    "result": {
        "type": "commercial_insurance_policy",
        "rotated_image_width": 1184,
        "rotated_image_height": 817,
        "image_angle": 90,
        "item_list": [
            {
                "key": "policy_name",
                "value": "机动车商业保险单",
                "confidence": 0.98,
                "position": [
                    242,
                    407,
                    435,
                    410,
                    435,
                    423,
                    242,
                    421
                ],
                "description": "所有人"
            }
        ],
        "insurance_list": [
            [
                {
                    "key": "insurance_product",
                    "value": "机动车损失保险",
                    "confidence": 0.98,
                    "position": [
                        242,
                        407,
                        435,
                        410,
                        435,
                        423,
                        242,
                        421
                    ],
                    "description": "承保险种"
                }
            ]
        ]
    },
    "version": "2.2.0",
    "duration": 600
}

错误码说明

错误码 描述
40101 x-ti-app-id 或 x-ti-secret-code 为空
40102 x-ti-app-id 或 x-ti-secret-code 无效,验证失败
40103 客户端IP不在白名单
40003 余额不足,请充值后再使用
40004 参数错误,请查看技术文档,检查传参
40007 机器人不存在或未发布
40008 机器人未开通,请至市场开通后重试
40301 图片类型不支持
40302 上传文件大小不符,文件大小不超过 10M
40303 文件类型不支持
40304 图片尺寸不符,图像宽高须介于 20 和 10000(像素)之间
40305 识别文件未上传
30203 基础服务故障,请稍后重试
500 服务器内部错误
官方社群
体验中心

联系我们