{
  "openapi": "3.0.3",
  "info": {
    "title": "车辆证件类OCR识别",
    "description": "OCR类图像识别-驾驶证OCR-行驶证OCR-车牌OCR-车款OCR-VIN码OCR，快速识别并提取出图片中关键字段信息，智能识别为结构化的文本。应用于车主身份认证、ETC出行、违章识别、停车场车辆进出管理等多种场景。",
    "termsOfService": "https://www.showapi.com/helpcenter/view#/4019/2",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://route.showapi.com"
    }
  ],
  "paths": {
    "/1333-8": {
      "x-pointCode": 8,
      "x-mode": "mapping",
      "x-read-timeout": 60,
      "x-connect-timeout": 20,
      "post": {
        "summary": "车型识别",
        "description": "检测一张车辆（目前只支持轿车）图片（需base64）的具体车型。即对于输入的一张图片（可正常解码，且长宽比适宜），输出图片的车辆品牌、型号及年份",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "result": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "confidence_level": {
                                    "type": "number",
                                    "description": "置信度(0-1)"
                                  },
                                  "name": {
                                    "type": "string",
                                    "description": "车系"
                                  },
                                  "year": {
                                    "type": "string",
                                    "description": "年款"
                                  }
                                }
                              },
                              "description": "识别结果集合 没有识别到时可能返回空集合"
                            },
                            "ret_code": {
                              "type": "number",
                              "description": "ret_code = 0 无异常\n10 参数错误   \n20 文件格式错误  \n30 操作失败,请勿重复提交\n40 文件下载失败\n50 文件内容过大\n60 图片解析失败\n70 识别失败\n80 服务超时\n90 未知错误(error_code)"
                            },
                            "remark": {
                              "type": "string",
                              "description": "错误信息"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "1333_8_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "img_base64": {
                    "type": "string",
                    "minLength": 0,
                    "maxLength": 10000000,
                    "description": "图片的base64编码，注意转码后得到的字符串一般不用进行urlencode，也就是说上传的base64字符串中含有+和/字符。png格式图片base64一般以iVBO开头，jpg图片的base64一般以/9j/开头，在此之前的修饰字符都是多余的，上传时必须去除。"
                  },
                  "img_url": {
                    "type": "string",
                    "description": "要识别图片的URL，与img_base64参数二选一作为入参方式，建议图片大小不超过2M，支持jpg jpeg png格式图片"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/1333-7": {
      "x-pointCode": 7,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "OCR车牌识别V2",
        "description": "准确识别出图像中车牌信息，输出车牌位置坐标、车牌号码、识别结果可信度共3个关键信息\n支持识别中国大陆机动车蓝牌、黄牌（单双行）、绿牌、大型新能源（黄绿）、领使馆车牌、警牌、武警牌（单双行）、军牌（单双行）、港澳出入境车牌、农用车牌、民航车牌的地域编号和车牌号\n图片要求：小于4M\n像素要求：短边像素大于256\n格式支持：PNG、JPG、JPEG、BMP",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "confidence_level": {
                              "type": "string",
                              "description": "可信度级别"
                            },
                            "ret_code": {
                              "type": "number",
                              "description": "0 成功\n10 文件下载失败\n20 图片解析失败\n30 OCR识别失败\n40 参数错误\n50 文件内容过大\n60 文件格式错误\n70 操作失败,请勿重复提交\n80 服务超时\n90 未知错误()"
                            },
                            "range": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "y": {
                                    "type": "number",
                                    "description": "该点距离图片顶部的像素"
                                  },
                                  "x": {
                                    "type": "number",
                                    "description": "该点距离图片左侧的像素"
                                  }
                                }
                              },
                              "description": "识别内容所在区域,用四个点来表示"
                            },
                            "car_no": {
                              "type": "string",
                              "description": "车牌"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "1333_7_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "img_base64": {
                    "type": "string",
                    "minLength": 0,
                    "maxLength": 10000000,
                    "description": "图片base64字符串\n\nimg_base64和img_url 二选一，同时存在以base64为主"
                  },
                  "img_url": {
                    "type": "string",
                    "description": "图片url\n\nimg_base64和img_url 二选一，同时存在以base64为主"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/1333-6": {
      "x-pointCode": 6,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "vin码识别",
        "description": "识别VIN码，即车辆识别号码\n图片要求：小于4M\n像素要求：短边像素大于256\n格式支持：PNG、JPG、JPEG、BMP",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "ret_code": {
                              "type": "number",
                              "description": "0 成功\n10 文件下载失败\n20 图片解析失败\n30 OCR识别失败\n40 参数错误\n50 文件内容过大\n60 文件格式错误\n70 操作失败,请勿重复提交\n80 服务超时\n90 未知错误()"
                            },
                            "vin_code": {
                              "type": "string",
                              "description": "检测到的车辆 VIN 码。"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "1333_6_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "img_base64": {
                    "type": "string",
                    "minLength": 0,
                    "maxLength": 10000000,
                    "description": "图片base64字符串\n\nimg_base64和img_url 二选一，同时存在以base64为主"
                  },
                  "img_url": {
                    "type": "string",
                    "description": "图片url\n\nimg_base64和img_url 二选一，同时存在以base64为主"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/1333-5": {
      "x-pointCode": 5,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "行驶证识别",
        "description": "识别行驶证信息正副页\n对机动车行驶证主页及副页进行结构化识别，包括号牌号码、车辆类型、所有人、品牌型号、车辆识别代码、发动机号码、核定载人数、质量、尺寸、检验记录等。\n图片要求：小于4M\n像素要求：短边像素大于256\n格式支持：PNG、JPG、JPEG、BMP",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "ret_code": {
                              "type": "number",
                              "description": "0 无异常\n10 参数错误   \n20 文件格式错误  \n30 操作失败,请勿重复提交\n40 文件下载失败\n50 文件内容过大\n60 图片解析失败\n70 OCR识别失败\n80 服务超时\n90 未知错误"
                            },
                            "back_result": {
                              "type": "object",
                              "properties": {
                                "car_size": {
                                  "type": "string",
                                  "description": "车辆尺寸"
                                },
                                "traction_weight": {
                                  "type": "string",
                                  "description": "准牵引总质量"
                                },
                                "insp_record": {
                                  "type": "string",
                                  "description": "检验记录"
                                },
                                "unload_weight": {
                                  "type": "string",
                                  "description": "整备质量"
                                },
                                "total_mass": {
                                  "type": "string",
                                  "description": "总质量"
                                },
                                "file_no": {
                                  "type": "string",
                                  "description": "档案编号"
                                },
                                "approved_passenger_num": {
                                  "type": "string",
                                  "description": "核载人数"
                                },
                                "approved_weirht": {
                                  "type": "string",
                                  "description": "核定载重量"
                                },
                                "car_no": {
                                  "type": "string",
                                  "description": "号牌号码"
                                }
                              },
                              "description": "行驶证副页"
                            },
                            "front_result": {
                              "type": "object",
                              "properties": {
                                "vehicle_type": {
                                  "type": "string",
                                  "description": "车辆类型"
                                },
                                "register_date": {
                                  "type": "string",
                                  "description": "注册日期，格式：YYYYMMDD。"
                                },
                                "eng_num": {
                                  "type": "string",
                                  "description": "发动机号码"
                                },
                                "vin_code": {
                                  "type": "string",
                                  "description": "车辆识别代号"
                                },
                                "car_model": {
                                  "type": "string",
                                  "description": "品牌型号"
                                },
                                "owner": {
                                  "type": "string",
                                  "description": "所有人名称"
                                },
                                "use_type": {
                                  "type": "string",
                                  "description": "使用性质"
                                },
                                "issue_date": {
                                  "type": "string",
                                  "description": "发证日期，格式：YYYYMMDD"
                                },
                                "addr": {
                                  "type": "string",
                                  "description": "地址"
                                },
                                "car_no": {
                                  "type": "string",
                                  "description": "车牌号码"
                                },
                                "issue_unit": {
                                  "type": "string",
                                  "description": "发证单位"
                                }
                              },
                              "description": "行驶证首页"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "1333_5_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "img_base64": {
                    "type": "string",
                    "minLength": 0,
                    "maxLength": 10000000,
                    "description": "图片base64字符串\n\nimg_base64和img_url 二选一，同时存在以base64为主"
                  },
                  "img_url": {
                    "type": "string",
                    "description": "图片url\n\nimg_base64和img_url 二选一，同时存在以base64为主"
                  },
                  "side": {
                    "type": "string",
                    "description": "1：正面\n2：背面"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/1333-4": {
      "x-pointCode": 4,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "驾驶证识别",
        "description": "识别驾驶证信息正副页\n支持对机动车驾驶证正页及副页进行结构化识别，包括证号、姓名、性别、国籍、住址、出生日期、初次领证日期、准驾车型、有效期限、发证单位、档案编号等。\n图片要求：小于4M\n像素要求：短边像素大于256\n格式支持：PNG、JPG、JPEG、BMP",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "ret_code": {
                              "type": "number",
                              "description": "0 成功\n10 文件下载失败\n20 图片解析失败\n30 OCR识别失败\n40 参数错误\n50 文件内容过大\n60 文件格式错误\n70 操作失败,请勿重复提交\n80 服务超时\n90 未知错误()"
                            },
                            "back_result": {
                              "type": "object",
                              "properties": {
                                "archive_code": {
                                  "type": "string",
                                  "description": "档案编号"
                                },
                                "record": {
                                  "type": "string",
                                  "description": "记录"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "姓名"
                                },
                                "card_no": {
                                  "type": "string",
                                  "description": "证号"
                                }
                              },
                              "description": "驾驶证副页"
                            },
                            "front_result:": {
                              "type": "object",
                              "properties": {
                                "license_num": {
                                  "type": "string",
                                  "description": "证号"
                                },
                                "sex": {
                                  "type": "string",
                                  "description": "性别"
                                },
                                "end_date": {
                                  "type": "string",
                                  "description": "驾驶证有效期时长或有效期截止日期。 格式：YYYYMMDD"
                                },
                                "birth_date": {
                                  "type": "string",
                                  "description": "出生日期"
                                },
                                "vehicle_type": {
                                  "type": "string",
                                  "description": "准驾车型"
                                },
                                "issue_unit": {
                                  "type": "string",
                                  "description": "发证单位"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "姓名"
                                },
                                "addr": {
                                  "type": "string",
                                  "description": "地址"
                                },
                                "issue_date": {
                                  "type": "string",
                                  "description": "初次发证日期。格式：YYYYMMDD，"
                                },
                                "start_date": {
                                  "type": "string",
                                  "description": "驾驶证有效期开始时间，格式：YYYYMMDD "
                                }
                              },
                              "description": "驾驶证首页"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "1333_4_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "img_base64": {
                    "type": "string",
                    "minLength": 0,
                    "maxLength": 10000000,
                    "description": "图片base64字符串\n\nimg_base64和img_url 二选一，同时存在以base64为主"
                  },
                  "img_url": {
                    "type": "string",
                    "description": "图片url\n\nimg_base64和img_url 二选一，同时存在以base64为主"
                  },
                  "side": {
                    "type": "string",
                    "description": "1：正面\n2：背面"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/1333-3": {
      "x-pointCode": 3,
      "x-mode": "mapping",
      "x-read-timeout": 35,
      "x-connect-timeout": 35,
      "post": {
        "summary": "OCR车牌识别V1(文件上传)",
        "description": "准确识别出上传文件的图像中车牌信息，输出车牌位置坐标、车牌号码、车牌颜色、识别可信度、亮度评估值、车辆类型、移动方向，共7个关键信息。\n图片的大小控制在1MB以内,太大会影响识别的效率和准确率。",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "ret_code": {
                              "type": "string",
                              "description": "接口调用是否成功,0为成功,其他为失败"
                            },
                            "flag": {
                              "type": "string",
                              "description": "业务调用是否成功"
                            },
                            "msg": {
                              "type": "string",
                              "description": "提示信息"
                            },
                            "color": {
                              "type": "string",
                              "description": "车牌颜色"
                            },
                            "light": {
                              "type": "string",
                              "description": "亮度评估值"
                            },
                            "num": {
                              "type": "string",
                              "description": "请填写参数描述"
                            },
                            "confidence": {
                              "type": "string",
                              "description": "识别的可信度"
                            },
                            "position": {
                              "type": "string",
                              "description": "车牌在整张图中的像素位置,用left\\right\\top\\bottom表示,对应左\\右\\上\\下"
                            },
                            "type": {
                              "type": "string",
                              "description": "车辆类型"
                            },
                            "move_direction": {
                              "type": "string",
                              "description": "移动方向的判断"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "1333_3_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "imgData": {
                    "type": "string",
                    "format": "binary",
                    "description": "上传的文件,图片的大小控制在1MB以内,太大会影响识别的效率和准确率"
                  }
                },
                "required": [
                  "imgData"
                ]
              }
            }
          }
        }
      }
    },
    "/1333-1": {
      "x-pointCode": 1,
      "x-mode": "mapping",
      "x-read-timeout": 40,
      "x-connect-timeout": 35,
      "post": {
        "summary": "OCR车牌识别V1",
        "description": "准确识别出图像中车牌信息，输出车牌位置坐标、车牌号码、车牌颜色、识别可信度、亮度评估值、车辆类型、移动方向，共7个关键信息。\n图片的大小控制在1MB以内,太大会影响识别的效率和准确率准。",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "ret_code": {
                              "type": "string",
                              "description": "接口调用是否成功,0为成功,其他为失败"
                            },
                            "flag": {
                              "type": "string",
                              "description": "业务调用是否成功"
                            },
                            "msg": {
                              "type": "string",
                              "description": "提示信息"
                            },
                            "color": {
                              "type": "string",
                              "description": "车牌颜色"
                            },
                            "light": {
                              "type": "string",
                              "description": "亮度评估值"
                            },
                            "num": {
                              "type": "string",
                              "description": "请填写参数描述"
                            },
                            "confidence": {
                              "type": "string",
                              "description": "识别的可信度"
                            },
                            "position": {
                              "type": "string",
                              "description": "车牌在整张图中的像素位置,用left\\right\\top\\bottom表示,对应左\\右\\上\\下"
                            },
                            "type": {
                              "type": "string",
                              "description": "车辆类型"
                            },
                            "move_direction": {
                              "type": "string",
                              "description": "移动方向的判断"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "1333_1_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "imgData": {
                    "type": "string",
                    "minLength": 10,
                    "maxLength": 10000000,
                    "description": "车牌图片的base64信息,图片的大小控制在1MB以内,太大会影响识别的效率和准确率"
                  }
                },
                "required": [
                  "imgData"
                ]
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "AppKeyAuth": {
        "type": "apiKey",
        "in": "query",
        "name": "appKey",
        "description": "从 ShowAPI 控制台获取的 appKey，管理地址：https://www.showapi.com/console#/myApp"
      }
    },
    "schemas": {
      "ShowapiResEnvelope": {
        "type": "object",
        "description": "ShowAPI 统一返回包裹（业务数据位于 showapi_res_body）",
        "properties": {
          "showapi_res_code": {
            "type": "integer",
            "description": "API 返回的状态码"
          },
          "showapi_res_error": {
            "type": "string",
            "description": "API 返回的错误信息"
          },
          "showapi_res_id": {
            "type": "string",
            "description": "API 请求的唯一标识"
          },
          "showapi_fee_num": {
            "type": "integer",
            "description": "API 调用计费次数"
          }
        }
      }
    }
  },
  "security": [
    {
      "AppKeyAuth": []
    }
  ],
  "externalDocs": {
    "url": "https://www.showapi.com/apiGateway/view/1333?tab=book"
  },
  "x-apiCode": "1333",
  "x-is-own": false,
  "x-is-op": true
}