# Generated by ShowAPI OpenAPI generator # source: market/2568 # generated-at: 2026-07-26T02:43:22.890Z openapi: 3.0.3 info: title: 百度云-文字识别 description: 覆盖多种通用场景、多种语言的高精度整图文字检测和识别服务,包括各类印刷和手写文档、网络图片、表格、数字、二维码等;可用于纸质文档电子化、办公文档/报表识别、图像内容审核、快递面单识别等场景。 termsOfService: https://www.showapi.com/helpcenter/view#/4019/2 version: 1.0.0 servers: - url: https://route.showapi.com paths: /2568-36: x-pointCode: 36 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 网约车行程单识别 description: 对飞机行程单的24个字段进行结构化识别,包括电子客票号、印刷序号、姓名、始发站、目的站、航班号、日期、时间、票价、身份证号、承运人、保险费、燃油附加费、其他税费、合计金额、订票渠道等;同时,可识别单张行程单上的多航班信息。原接口订购地址:https://cloud.baidu.com/product/ocr_finance responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: log_id: type: number description: 唯一的log id,用于问题定位 words_result_num: type: number description: 识别结果数,表示words_result的元素个数 words_result: type: object properties: avg_score: type: string description: 识别结果的平均置信度 date: type: string description: 日期 destination_station: type: string description: 目的站 flight: type: string description: 航班号 name: type: string description: 姓名 starting_station: type: string description: 始发站 ticket_number: type: string description: 印刷序号 ticket_rates: type: string description: 票价 description: 定位和识别结果数组 description: 业务返回体 operationId: 2568_36_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string minLength: 0 maxLength: 1000000 description: |- 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 优先级:image > url > pdf_file,当image字段存在时,url、pdf_file字段失效 url: type: string description: |- 图片完整url,url长度不超过1024字节,url对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 优先级:image > url > pdf_file,当image字段存在时,url字段失效 请注意关闭URL防盗链 pdf_file: type: string minLength: 0 maxLength: 10000000 description: |- PDF文件,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px 优先级:image > url > pdf_file,当image、url字段存在时,pdf_file字段失效 pdf_file_num: type: string description: 需要识别的PDF文件的对应页码,当 pdf_file 参数有效时,识别传入页码的对应页面内容,若不传入,则默认识别第 1 页 required: - ds_id /2568-35: x-pointCode: 35 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 二维码识别 description: 对图片中的二维码、条形码进行检测和识别,返回存储的文字信息。原接口订购地址:https://cloud.baidu.com/product/ocr_general 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 codes_result_num: type: number description: 识别结果数,表示codes_result的元素个数 codes_result: type: array items: type: object properties: text: type: array items: type: string description: 条形码识别内容,暂时只限于识别中英文结果 type: type: string description: 识别码类型条码类型包括:9种条形码(UPC_A、UPC_E、EAN_13、EAN_8、CODE_39、CODE_93、CODE_128、ITF、CODABAR),4种二维码(QR_CODE、DATA_MATRIX、AZTEC、PDF_417) description: 定位和识别结果数组 log_id: type: number description: 唯一的log id,用于问题定位 description: 业务返回体 operationId: 2568_35_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string minLength: 0 maxLength: 10000000 description: |- 图像数据,base64编码后进行urlencode,需去掉编码头(data:image/jpeg;base64, ) 要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 url: type: string description: |- 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,当image字段存在时url字段失效 请注意关闭URL防盗链 location: type: string description: |- 是否输出二维码/条形码位置信息 - false:默认值,不返回位置信息; - true:返回图中二维码/条形码的位置信息,包括上边距、左边距、宽度、高度 required: - ds_id /2568-34: x-pointCode: 34 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 仪器仪表盘读数识别 description: 适用于不同品牌、不同型号的仪器仪表盘读数识别,广泛适用于各类血糖仪、血压仪、燃气表、电表等,可识别表盘上的数字、英文、符号,支持液晶屏、字轮表等表型。原接口订购地址:https://cloud.baidu.com/product/ocr_others 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 words_result: type: array items: type: object properties: words: type: string description: 识别结果字符串 location: type: object properties: height: type: number description: 表示定位位置的长方形的高度 width: type: number description: 表示定位位置的长方形的宽度 left: type: number description: 表示定位位置的长方形左上顶点的水平坐标 top: type: number description: 表示定位位置的长方形左上顶点的垂直坐标 description: 识别结果所在长方形位置信息 poly_location: type: array items: type: object properties: y: type: number x: type: number description: poly_location=true时存在。文字所在区域的外接四边形的4个点坐标信息 probability: type: object properties: min: type: number variance: type: number average: type: number description: probability=true时存在。识别结果中每一行的置信度值,包含average:行置信度平均值,variance:行置信度方差,min:行置信度最小值 description: 识别结果数组 words_result_num: type: number description: 识别结果数,表示words_result的元素个数 log_id: type: number description: 业务返回体 operationId: 2568_34_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string minLength: 0 maxLength: 10000000 description: 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px。支持jpg/jpeg/png/bmp格式.注意:图片的base64编码是不包含图片头的,如(data:image/jpg;base64,) url: type: string description: |- 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,当image字段存在时url字段失效 请注意关闭URL防盗链 probability: type: string description: 是否返回每行识别结果的置信度。默认为false poly_location: type: string description: |- 位置信息返回形式,默认:false false:只给出识别结果所在长方形位置信息 true:除了默认的识别文字所在长方形的位置信息,还会给出文字所在区域的最小外接旋转矩形的4个点坐标信息 required: - ds_id /2568-33: x-pointCode: 33 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 公式识别 description: 支持对试卷中的数学公式及题目内容进行识别,可提取公式部分进行单独识别,也可对题目和公式进行混合识别,并返回Latex格式公式内容及位置信息,便于进行后续处理。原接口订购地址:https://cloud.baidu.com/product/ocr_education 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 formula_result: type: array items: type: object properties: words: type: string description: 识别结果字符串 location: type: object properties: height: type: number description: 表示定位位置的长方形的高度 width: type: number description: 表示定位位置的长方形的宽度 left: type: number description: 表示定位位置的长方形左上顶点的水平坐标 top: type: number description: 表示定位位置的长方形左上顶点的垂直坐标 description: 位置数组(坐标0点为左上角) description: 是否返回单独公式识别结果,默认false formula_result_num: type: number description: 识别结果中的公式个数,表示formula_result的元素个数 words_result: type: array items: type: object properties: words: type: string description: 识别结果字符串 location: type: object properties: height: type: number width: type: number left: type: number top: type: number description: 位置数组(坐标0点为左上角) description: 识别结果数组 words_result_num: type: number description: 识别结果数,表示words_result的元素个数 log_id: type: number description: 业务返回体 operationId: 2568_33_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string minLength: 0 maxLength: 10000000 description: |- 图像数据,base64编码后进行urlencode,需去掉编码头(data:image/jpeg;base64, ) 要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,当image字段存在时url字段失效 url: type: string description: |- 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,当image字段存在时url字段失效 请注意关闭URL防盗链 detect_direction: type: string description: |- 是否检测图像朝向,默认不检测,即:false。朝向是指输入图像是正常方向、逆时针旋转90/180/270度。可选值包括: - true:检测朝向; - false:不检测朝向。 recognize_granularity: type: string description: 是否定位单字符位置,big:不定位单字符位置;small:定位单字符位置。默认值为big disp_formula: type: string description: 是否分离输出公式识别结果,在words_result外单独输出公式结果,展示在“formula_result”中 required: - ds_id /2568-32: x-pointCode: 32 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 试卷分析与识别 description: 可对文档版面进行分析,输出图、表、标题、文本的位置,并输出分版块内容的OCR识别结果,支持中、英两种语言,手写、印刷体混排多种场景。原接口订购地址:https://cloud.baidu.com/product/ocr_education responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: layouts_num: type: number description: 版面分析结果数,表示layout的元素个数 ret_code: type: number results_num: type: number description: 识别结果数,表示results的元素个数 img_direction: type: number description: detect_direction=true时返回。检测到的图像朝向,0 :正向; 1:逆时针旋转90度;2:逆时针旋转180度;3:逆时针旋转270度 results: type: array items: type: object properties: words: type: object properties: words_location: type: object properties: height: type: number description: 表示位置的长方形的高度 width: type: number description: 表示定位定位位置的长方形的宽度 left: type: number description: 表示定位位置的长方形左上顶点的水平坐标 top: type: number description: 表示定位位置的长方形左上顶点的垂直坐标 description: 整行的矩形框坐标。位置数组(坐标0点为左上角) line_probability: type: object properties: {} description: line_probability=true时返回。识别结果中每一行的置信度值,包含average:行置信度平均值,min:行置信度最小值 word: type: string description: 整行的识别结果 description: 整行的识别结果数组。 chars: type: array items: type: string description: result_type=small时返回。单字符结果数组。 words_type: type: string description: 文字属性(手写、印刷),handwriting 手写,print 印刷 description: 识别结果数组 log_id: type: number description: 唯一的log id,用于问题定位 description: 业务返回体 operationId: 2568_32_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string minLength: 0 maxLength: 10000000 description: |- 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 优先级:image > url > pdf_file,当image字段存在时,url、pdf_file字段失效 url: type: string description: |- 图片完整url,url长度不超过1024字节,url对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 优先级:image > url > pdf_file,当image字段存在时,url字段失效 请注意关闭URL防盗链 pdf_file: type: string minLength: 0 maxLength: 10000000 description: |- PDF文件,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px 优先级:image > url > pdf_file,当image、url字段存在时,pdf_file字段失效 pdf_file_num: type: string description: 需要识别的PDF文件的对应页码,当 pdf_file 参数有效时,识别传入页码的对应页面内容,若不传入,则默认识别第 1 页 language_type: type: string description: |- 识别语言类型,默认为CHN_ENG 可选值包括: = CHN_ENG:中英文 = ENG:英文 result_type: type: string description: |- 返回识别结果是按单行结果返回,还是按单字结果返回,默认为big。 = big:返回行识别结果 = small:返回行识别结果之上还会返回单字结果 detect_direction: type: string description: |- 是否检测图像朝向,默认不检测,即:false。朝向是指输入图像是正常方向、逆时针旋转90/180/270度。其中, 0 :正向 1:逆时针旋转90度 2:逆时针旋转180度 3:逆时针旋转270度 line_probability: type: string description: 是否返回每行识别结果的置信度。默认为false words_type: type: string description: |- 文字类型。 默认:印刷文字识别 = handwring_only:手写文字识别 = handprint_mix: 手写印刷混排识别 layout_analysis: type: string description: 是否分析文档版面:包括layout(图、表、标题、段落、目录);attribute(栏、页眉、页脚、页码、脚注)的分析输出 recg_formula: type: string description: |- 是否检测并识别公式,默认为false,公式以 Latex 格式文本返回。 =true:检测并识别公式 =false:不检测识别公式 required: - ds_id /2568-31: x-pointCode: 31 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 车辆合格证识别 description: 支持对车辆合格证的23个关键字段进行结构化识别,包括合格证编号、发证日期及制造企业名、品牌、名称、型号等车辆信息。原接口订购地址:https://cloud.baidu.com/product/ocr_cars responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: log_id: type: number description: 唯一的log id,用于问题定位 words_result_num: type: number description: 识别结果数,表示words_result的元素个数 words_result: type: object properties: AxleNum: type: string description: 轴数 CarName: type: string description: 车辆品牌/车辆名称 CertificationNo: type: string description: 合格证编号 ChassisType: type: string description: 底盘型号/底盘ID EmissionStandard: type: string description: 排放标准 EngineNo: type: string description: 发动机号 EngineType: type: string description: 发动机型号 FuelType: type: string description: 燃料种类 InnerSize: type: string description: 货箱内部尺寸 Power: type: string description: 功率 TyreNum: type: string description: 轮胎数 VinNo: type: string description: 车架号 description: 识别结果数组 description: 业务返回体 operationId: 2568_31_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string minLength: 0 maxLength: 10000000 description: |- 图像数据,base64编码后进行urlencode,需去掉编码头(data:image/jpeg;base64, ) 要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 url: type: string description: |- 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,当image字段存在时url字段失效 请注意关闭URL防盗链 required: - ds_id /2568-30: x-pointCode: 30 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 机动车销售发票识别 description: 支持对机动车销售发票的26个关键字段进行结构化识别,包括发票代码、号码、开票日期、机器编号、购买方信息、车辆信息、销货单位信息、价税合计、价税合计小写、税率、税额、不含税价格等。原接口订购地址:https://cloud.baidu.com/product/ocr_cars responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: log_id: type: number description: 唯一的log id,用于问题定位 words_result_num: type: number description: 识别结果数,表示words_result的元素个数 words_result: type: object properties: EngineNum: type: string description: 发动机号码 InvoiceCode: type: string description: 发票代码 InvoiceDate: type: string description: 开票日期 InvoiceNum: type: string description: 发票号码 MachineCode: type: string description: 机器编号 ManuModel: type: string description: 厂牌型号 PayerCode: type: string description: 纳税人识别号 Price: type: string description: 不含税价格 PriceTax: type: string description: 价税合计 PriceTaxLow: type: string description: 价税合计小写 Saler: type: string description: 销售方名称 Tax: type: string description: 税额 TaxRate: type: string description: 税率 VinNum: type: string description: 车架号 description: 识别结果数组 description: 业务返回体 operationId: 2568_30_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string minLength: 0 maxLength: 10000000 description: 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4m,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 url: type: string description: |- 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,当image字段存在时url字段失效 请注意关闭URL防盗链 required: - ds_id /2568-29: x-pointCode: 29 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: VIN码识别 description: 支持对车辆挡风玻璃处的车架号码进行识别。原接口订购地址:https://cloud.baidu.com/product/ocr_cars responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: log_id: type: number words_result: type: array items: type: object properties: "0": type: object properties: location: type: object properties: left: type: number top: type: number width: type: number height: type: number description: | 位置数组 words: type: string description: VIN码识别结果 words_result_num: type: number description: 识别结果数,表示words_result的元素个数 description: 业务返回体 operationId: 2568_29_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string minLength: 0 maxLength: 10000000 description: 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4m,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 url: type: string description: |- 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,当image字段存在时url字段失效 请注意关闭URL防盗链 required: - ds_id /2568-28: x-pointCode: 28 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 车牌识别 description: 对机动车蓝牌、绿牌、单/双行黄牌的地域编号和车牌号进行识别,并能同时识别图像中的多张车牌。原接口订购地址:https://cloud.baidu.com/product/ocr_cars responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: errno: type: number description: 请求标识码,随机数,唯一。 msg: type: string data: type: object properties: log_id: type: string words_result: type: object properties: color: type: string description: 车牌颜色:支持blue、green、yellow number: type: string description: 车牌号码 probability: type: array items: type: string description: 车牌中每个字符的置信度,区间为0-1 vertexes_location: type: array items: type: object properties: "0": type: object properties: y: type: number x: type: number "1": type: object properties: y: type: number x: type: number "2": type: object properties: y: type: number x: type: number "3": type: object properties: y: type: number x: type: number description: 返回文字外接多边形顶点位置 description: 业务返回体 operationId: 2568_28_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string minLength: 0 maxLength: 10000000 description: 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4m,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 url: type: string description: |- 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,当image字段存在时url字段失效 请注意关闭URL防盗链 multi_detect: type: string description: 是否检测多张车牌,默认为false,当置为true的时候可以对一张图片内的多张车牌进行识别 multi_scale: type: string description: 在高拍等车牌较小的场景下可开启,默认为false,当置为true时,能够提高对较小车牌的检测和识别 required: - ds_id /2568-27: x-pointCode: 27 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 驾驶证识别 description: 支持对机动车驾驶证正本所有9个字段进行结构化识别,包括证号、姓名、性别、国籍、住址、出生日期、初次领证日期、准驾车型、有效期限。原接口订购地址:https://cloud.baidu.com/product/ocr_cars responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: errno: type: number msg: type: string data: type: object properties: words_result_num: type: number words_result: type: object properties: 证号: type: object properties: words: type: string 有效期限: type: object properties: words: type: string 准驾车型: type: object properties: words: type: string 有效起始日期: type: object properties: words: type: string 住址: type: object properties: words: type: string 姓名: type: object properties: words: type: string 国籍: type: object properties: words: type: string 出生日期: type: object properties: words: type: string 性别: type: object properties: words: type: string 初次领证日期: type: object properties: words: type: string description: 业务返回体 operationId: 2568_27_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string minLength: 0 maxLength: 10000000 description: 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4m,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 url: type: string description: |- 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,当image字段存在时url字段失效 请注意关闭URL防盗链 detect_direction: type: string description: |- - false:默认值,不检测朝向,朝向是指输入图像是正常方向、逆时针旋转90/180/270度 - true:检测朝向 driving_license_side: type: string description: |- - front:默认值,识别驾驶证正页、电子驾驶证正页 - back:识别驾驶证副页 unified_valid_period: type: string description: |- - false: 默认值,不进行归一化处理 - true: 归一化格式输出,将驾驶证正页的「有效起始日期」+「有效期限」及「有效期限」+「至」,归一化为「有效起始日期」+「失效日期」格式输出 quality_warn: type: string description: |- 是否开启质量检测功能,仅在驾驶证正页识别时生效, - false:默认值,不输出质量告警信息 - true: 输出驾驶证遮挡、不完整质量告警信息 risk_warn: type: string description: |- 是否开启风险检测功能, - false:默认值,不输出风险告警信息 - true:开启,输出驾驶证复印、翻拍、PS等告警信息 required: - ds_id /2568-26: x-pointCode: 26 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 行驶证识别 description: 对机动车行驶证主页及副页所有21个字段进行结构化识别,包括号牌号码、车辆类型、所有人、品牌型号、车辆识别代码、发动机号码、核定载人数、检验记录等。原接口订购地址:https://cloud.baidu.com/product/ocr_cars responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: errno: type: number description: 错误码 msg: type: string description: 错误信息 data: type: object properties: words_result_num: type: number description: 识别结果数组 words_result: type: object properties: 品牌型号: type: object properties: words: type: string description: 识别结果字符串 发证日期: type: object properties: words: type: string 使用性质: type: object properties: words: type: string 发动机号码: type: object properties: words: type: string 号牌号码: type: object properties: words: type: string 所有人: type: object properties: words: type: string 住址: type: object properties: words: type: string 注册日期: type: object properties: words: type: string 车辆识别代号: type: object properties: words: type: string 车辆类型: type: object properties: words: type: string description: 业务返回体 operationId: 2568_26_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string minLength: 0 maxLength: 10000000 description: 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4m,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 url: type: string description: |- 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,当image字段存在时url字段失效 请注意关闭URL防盗链 detect_direction: type: string description: 是否矫正图像方向,默认不矫正,即:false。朝向是指输入图像是正常方向、逆时针旋转90/180/270度。可选值包括:- true:矫正方向;- false:不矫正 vehicle_license_side: type: string description: front:识别行驶证主页,back:识别行驶证副页,默认为正页 unified: type: string description: |- false:默认值,不进行归一化处理 - true:对输出字段进行归一化处理,将新/老版行驶证的“注册登记日期/注册日期”统一为”注册日期“进行输出 quality_warn: type: string description: |- 是否开启质量检测功能,仅在行驶证正页识别时生效, - false:默认值,不输出质量告警信息 - true: 输出行驶证遮挡、不完整质量告警信息 risk_warn: type: string description: |- 是否开启风险检测功能, - false:默认值,不输出风险告警信息 - true:开启,输出行驶证复印、翻拍、PS等告警信息 required: - ds_id /2568-24: x-pointCode: 24 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 通用票据识别 description: 用户向服务请求识别医疗票据、发票、的士票、保险保单等票据类图片中的所有文字,并返回文字在图中的位置信息。原接口订购地址:https://cloud.baidu.com/product/ocr_finance responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: log_id: type: number words_result_num: type: number description: 识别结果数,表示words_result的元素个数 words_result: type: array items: type: object properties: "0": type: object properties: location: type: object properties: left: type: number description: 表示定位位置的长方形左上顶点的水平坐标 top: type: number description: | 表示定位位置的长方形左上顶点的垂直坐标 width: type: number description: | 表示定位位置的长方形的宽度 height: type: number description: | 表示定位位置的长方形的高度 words: type: string description: | 识别结果字符串 description: 定位和识别结果数组 description: 业务返回体 operationId: 2568_24_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string minLength: 0 maxLength: 10000000 description: 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 url: type: string description: |- 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,当image字段存在时url字段失效 请注意关闭URL防盗链 pdf_file: type: string description: |- PDF文件,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过8M,最短边至少15px,最长边最大4096px 优先级:image > url > pdf_file > ofd_file,当image、url字段存在时,pdf_file字段失效 pdf_file_num: type: string description: 需要识别的PDF文件的对应页码,当 pdf_file 参数有效时,识别传入页码的对应页面内容,若不传入,则默认识别第 1 页 ofd_file: type: string description: |- OFD文件,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过8M,最短边至少15px,最长边最大4096px 优先级:image > url > pdf_file > ofd_file,当image、url、pdf_file字段存在时,ofd_file字段失效 ofd_file_num: type: string description: 需要识别的OFD文件的对应页码,当 ofd_file 参数有效时,识别传入页码的对应页面内容,若不传入,则默认识别第 1 页 recognize_granularity: type: string description: 是否定位单字符位置,big:不定位单字符位置,默认值;small:定位单字符位置 probability: type: string description: 是否返回识别结果中每一行的置信度 accuracy: type: string description: normal 使用快速服务;缺省或其它值使用高精度服务 detect_direction: type: string description: 是否检测图像朝向,默认不检测,即:false。可选值包括true - 检测朝向;false - 不检测朝向。朝向是指输入图像是正常方向、逆时针旋转90/180/270度。 required: - ds_id /2568-23: x-pointCode: 23 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 飞机行程单识别 description: 对飞机行程单的24个字段进行结构化识别,包括电子客票号、印刷序号、姓名、始发站、目的站、航班号、日期、时间、票价、身份证号、承运人、保险费、燃油附加费、其他税费、合计金额、订票渠道等;同时,可识别单张行程单上的多航班信息。原接口订购地址:https://cloud.baidu.com/product/ocr_finance responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: log_id: type: number description: 唯一的log id,用于问题定位 words_result_num: type: number description: 识别结果数,表示words_result的元素个数 words_result: type: object properties: avg_score: type: string description: 识别结果的平均置信度 date: type: string description: 日期 destination_station: type: string description: 目的站 flight: type: string description: 航班号 name: type: string description: 姓名 starting_station: type: string description: 始发站 ticket_number: type: string description: 印刷序号 ticket_rates: type: string description: 票价 description: 定位和识别结果数组 description: 业务返回体 operationId: 2568_23_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string minLength: 0 maxLength: 1000000 description: |- 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 优先级:image > url > pdf_file,当image字段存在时,url、pdf_file字段失效 url: type: string description: |- 图片完整url,url长度不超过1024字节,url对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 优先级:image > url > pdf_file,当image字段存在时,url字段失效 请注意关闭URL防盗链 pdf_file: type: string minLength: 0 maxLength: 10000000 description: |- PDF文件,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px 优先级:image > url > pdf_file,当image、url字段存在时,pdf_file字段失效 pdf_file_num: type: string description: 需要识别的PDF文件的对应页码,当 pdf_file 参数有效时,识别传入页码的对应页面内容,若不传入,则默认识别第 1 页 multi_detect: type: string description: |- 控制是否开启多航班信息识别功能,默认值:false - true:开启多航班信息识别功能,开启后返回结果中对应字段格式将改为数组类型 - false: 不开启,仅识别单一航班信息 required: - ds_id /2568-22: x-pointCode: 22 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 出租车票识别 description: 针对全国各大城市出租车票的发票号码、发票代码、车号、日期、时间、金额进行结构化识别。原接口订购地址:https://cloud.baidu.com/product/ocr_finance responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: log_id: type: number description: 请求标识码,随机数,唯一。 words_result_num: type: number description: 识别结果数,表示words_result的元素个数 words_result: type: object properties: Date: type: string description: 日期 Fare: type: string description: 金额 InvoiceCode: type: string description: 发票代号 InvoiceNum: type: string description: 发票号码 TaxiNum: type: string description: 车牌号 Time: type: string description: 上下车时间 FuelOilSurcharge: type: string description: 燃油附加费 CallServiceSurcharge: type: string description: 叫车服务费 description: 业务返回体 operationId: 2568_22_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string minLength: 0 maxLength: 10000000 description: |- 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 优先级:image > url > pdf_file,当image字段存在时,url、pdf_file字段失效 url: type: string description: |- 图片完整url,url长度不超过1024字节,url对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 优先级:image > url > pdf_file,当image字段存在时,url字段失效 请注意关闭URL防盗链 pdf_file: type: string description: |- PDF文件,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px 优先级:image > url > pdf_file,当image、url字段存在时,pdf_file字段失效 pdf_file_num: type: string description: 需要识别的PDF文件的对应页码,当 pdf_file 参数有效时,识别传入页码的对应页面内容,若不传入,则默认识别第 1 页 required: - ds_id /2568-21: x-pointCode: 21 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 60 post: summary: 火车票识别 description: 支持对红、蓝火车票的13个关键字段进行结构化识别,包括车票号码、始发站、目的站、车次、日期、票价、席别、姓名、座位号、身份证号、售站、序列号、时间。原接口订购地址:https://cloud.baidu.com/product/ocr_finance responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: errno: type: string logid: type: string description: | 请求标识码,随机数,唯一。 date: type: string description: | 出发日期 destination_station: type: string description: | 到达站 name: type: string description: | 乘客姓名 seat_category: type: string description: | 席别 starting_station: type: string description: | 始发站 ticket_num: type: string description: | 车次号 ticket_rates: type: string description: | 车票金额 train_num: type: string description: | 车次号 description: 业务返回体 operationId: 2568_21_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string minLength: 0 maxLength: 10000000 description: |- 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 优先级:image > url > pdf_file,当image字段存在时,url、pdf_file字段失效 url: type: string description: |- 图片完整url,url长度不超过1024字节,url对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 优先级:image > url > pdf_file,当image字段存在时,url字段失效 请注意关闭URL防盗链 pdf_file: type: string minLength: 0 maxLength: 10000000 description: |- PDF文件,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px 优先级:image > url > pdf_file,当image、url字段存在时,pdf_file字段失效 pdf_file_num: type: string description: 需要识别的PDF文件的对应页码,当 pdf_file 参数有效时,识别传入页码的对应页面内容,若不传入,则默认识别第 1 页 required: - ds_id /2568-20: x-pointCode: 20 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 通用机打发票识别 description: 对国家/地方税务局发行的横/竖版通用机打发票进行结构化识别,可识别23个关键字段,包括发票类型、发票号码、发票代码、开票日期、商品名称、合计金额等。原接口订购地址:https://cloud.baidu.com/product/ocr_finance responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: log_id: type: number description: 唯一的log id,用于问题定位 words_result_num: type: number description: 识别结果数,表示words_result的元素个数 words_result: type: object properties: CommodityName: type: object properties: location: type: object properties: left: type: number top: type: number width: type: number height: type: number words: type: string description: 商品名称 InvoiceCode: type: object properties: location: type: object properties: left: type: number top: type: number width: type: number height: type: number words: type: string description: 发票代码 InvoiceDate: type: object properties: location: type: object properties: left: type: number top: type: number width: type: number height: type: number words: type: string description: 发票日期 InvoiceNum: type: object properties: location: type: object properties: left: type: number top: type: number width: type: number height: type: number words: type: string description: 发票号码 InvoiceType: type: object properties: location: type: object properties: left: type: number top: type: number width: type: number height: type: number words: type: string description: 发票类型 TotalTax: type: object properties: location: type: object properties: left: type: number top: type: number width: type: number height: type: number words: type: string description: 合计金额 description: 定位和识别结果数组 description: 业务返回体 operationId: 2568_20_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string minLength: 0 maxLength: 10000000 description: |- 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 优先级:image > url > pdf_file,当image字段存在时,url、pdf_file字段失效 url: type: string description: |- 图片完整url,url长度不超过1024字节,url对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 优先级:image > url > pdf_file,当image字段存在时,url字段失效 请注意关闭URL防盗链 pdf_file: type: string minLength: 0 maxLength: 10000000 description: |- PDF文件,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px 优先级:image > url > pdf_file,当image、url字段存在时,pdf_file字段失效 pdf_file_num: type: string description: 需要识别的PDF文件的对应页码,当 pdf_file 参数有效时,识别传入页码的对应页面内容,若不传入,则默认识别第 1 页 required: - ds_id /2568-19: x-pointCode: 19 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 定额发票识别 description: 对各类定额发票的代码、号码、金额进行识别。原接口订购地址:https://cloud.baidu.com/product/ocr_finance responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: log_id: type: number description: 唯一的log id,用于问题定位 words_result_num: type: number description: 识别结果数,表示words_result的元素个数 words_result: type: object properties: invoice_code: type: string description: 发票代码 invoice_number: type: string description: 发票号码 invoice_rate: type: string description: 金额 description: 识别结果数组 description: 业务返回体 operationId: 2568_19_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string minLength: 0 maxLength: 10000000 description: |- 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 优先级:image > url > pdf_file,当image字段存在时,url、pdf_file字段失效 url: type: string description: |- 图片完整url,url长度不超过1024字节,url对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 优先级:image > url > pdf_file,当image字段存在时,url字段失效 请注意关闭URL防盗链 pdf_file: type: string minLength: 0 maxLength: 10000000 description: |- PDF文件,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px 优先级:image > url > pdf_file,当image、url字段存在时,pdf_file字段失效 pdf_file_num: type: string description: 需要识别的PDF文件的对应页码,当 pdf_file 参数有效时,识别传入页码的对应页面内容,若不传入,则默认识别第 1 页 required: - ds_id /2568-18: x-pointCode: 18 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 增值税发票识别 description: 结构化识别增值税普票、专票、电子发票、卷票的所有关键字段,包括发票基本信息、销售方及购买方信息、商品信息、价税信息等,其中四要素识别准确率超过99%。原接口订购地址:https://cloud.baidu.com/product/ocr_finance responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: log_id: type: string description: 唯一的log id,用于问题定位 words_result_num: type: number description: 识别结果数,表示words_result的元素个数 words_result: type: object properties: InvoiceNum: type: string description: 发票号码 SellerName: type: string description: 销售方名称 CommodityTaxRate: type: array items: type: object properties: "0": type: object properties: word: type: string row: type: string description: 税率 SellerBank: type: string description: 销售方开户行及账号 Checker: type: string description: 复核 TotalAmount: type: string description: 合计金额 CommodityAmount: type: array items: type: object properties: "0": type: object properties: word: type: string row: type: string description: 金额 InvoiceDate: type: string CommodityTax: type: array items: type: object properties: "0": type: object properties: word: type: string row: type: string description: 税额 PurchaserName: type: string description: 购方名称 CommodityNum: type: array items: type: object properties: "0": type: object properties: word: type: string row: type: string description: 数量 PurchaserBank: type: string description: 购方开户行及账号 Remarks: type: string description: 备注 Password: type: string description: 密码区 SellerAddress: type: string description: 销售方地址及电话 PurchaserAddress: type: string description: 购方地址及电话 InvoiceCode: type: string description: 发票代码 CommodityUnit: type: array items: type: object properties: "0": type: object properties: word: type: string row: type: string description: 单位 Payee: type: string description: 收款人 PurchaserRegisterNum: type: string description: 购方纳税人识别号 CommodityPrice: type: array items: type: object properties: "0": type: object properties: word: type: string row: type: string description: 单价 NoteDrawer: type: string description: 开票人 AmountInWords: type: string AmountInFiguers: type: string TotalTax: type: string InvoiceType: type: string SellerRegisterNum: type: string description: 价税合计(大写) CommodityName: type: array items: type: object properties: "0": type: object properties: word: type: string row: type: string description: 货物名称 CommodityType: type: array items: type: object properties: "0": type: object properties: word: type: string row: type: string description: 规格型号 description: 识别结果数组 description: 业务返回体 operationId: 2568_18_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string minLength: 0 maxLength: 10000000 description: |- 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过8M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 优先级:image > url > pdf_file > ofd_file ,当image字段存在时,url、pdf_file、ofd_file 字段失效 url: type: string description: |- 图片完整url,url长度不超过1024字节,url对应的图片base64编码后大小不超过8M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 优先级:image > url > pdf_file > ofd_file,当image字段存在时,url字段失效 请注意关闭URL防盗链 pdf_file: type: string minLength: 0 maxLength: 10000000 description: |- PDF文件,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过8M,最短边至少15px,最长边最大4096px 优先级:image > url > pdf_file > ofd_file,当image、url字段存在时,pdf_file字段失效 pdf_file_num: type: string description: "\t需要识别的PDF文件的对应页码,当 pdf_file 参数有效时,识别传入页码的对应页面内容,若不传入,则默认识别第 1 页" ofd_file: type: string minLength: 0 maxLength: 10000000 description: |- OFD文件,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过8M,最短边至少15px,最长边最大4096px 优先级:image > url > pdf_file > ofd_file,当image、url、pdf_file字段存在时,ofd_file字段失效 ofd_filie_num: type: string description: 需要识别的OFD文件的对应页码,当 ofd_file 参数有效时,识别传入页码的对应页面内容,若不传入,则默认识别第 1 页 type: type: string description: |- 进行识别的增值税发票类型,默认为 normal,可缺省 - normal:可识别增值税普票、专票、电子发票 - roll:可识别增值税卷票 seal_tag: type: string description: |- 是否开启印章判断功能,并返回印章内容的识别结果 - true:开启 - false:不开启 required: - ds_id /2568-17: x-pointCode: 17 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 出生医学证明识别 description: 结构化识别出生医学证明的6个关键字段,包括新生儿姓名、性别、出生时间、父亲姓名、母亲姓名、出生证编号;可用于新生儿身份登记、入学登记、生育险报销等场景。原接口订购地址:https://cloud.baidu.com/product/ocr_cards responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: log_id: type: number description: 唯一的log id,用于问题定位 words_result: type: object properties: BabyBirthday: type: object properties: words: type: string description: 出生时间 BabyName: type: object properties: words: type: string description: 姓名 BabySex: type: object properties: words: type: string description: 性别 Code: type: object properties: words: type: string description: 出生证编号 FatherName: type: object properties: words: type: string description: 父亲姓名 MotherName: type: object properties: words: type: string description: 母亲姓名 description: 识别结果数组 words_result_num: type: number description: 识别结果数,表示words_result的元素个数 description: 业务返回体 operationId: 2568_17_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string minLength: 0 maxLength: 10000000 description: "\t图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式" url: type: string description: |- 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,当image字段存在时url字段失效 请注意关闭URL防盗链 required: - ds_id /2568-16: x-pointCode: 16 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 户口本识别 description: 结构化识别户口本内常住人口登记卡的全部 22 个字段,包括户号、姓名、与户主关系、性别、出生地、民族、出生日期、身份证号、曾用名、籍贯、宗教信仰、身高、血型、文化程度、婚姻状况、兵役状况等。原接口订购地址:https://cloud.baidu.com/product/ocr_cards responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: log_id: type: number description: 唯一的log id,用于问题定位 words_result: type: object properties: BirthAddress: type: object properties: words: type: string description: 出生地 Birthday: type: object properties: words: type: string description: 生日 CardNo: type: object properties: words: type: string description: 身份证号 Name: type: object properties: words: type: string description: 姓名 Nation: type: object properties: words: type: string description: 民族 Relationship: type: object properties: words: type: string description: | 与户主关系 Sex: type: object properties: words: type: string description: 性别 description: 识别结果数组 words_result_num: type: number description: 识别结果数,表示words_result的元素个数 description: 业务返回体 operationId: 2568_16_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string minLength: 0 maxLength: 10000000 description: 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 url: type: string description: |- 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,当image字段存在时url字段失效 请注意关闭URL防盗链 household_register_side: type: string description: |- -subpage:默认值,常住人口登记卡(成员页) -homepage:户主页 required: - ds_id /2568-14: x-pointCode: 14 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 港澳台通行证识别 description: 支持对大陆居民往来港澳通行证的证件号码、姓名、姓名拼音、出生日期、性别、有效期限、签发地点7个关键字段进行结构化识别。原接口订购地址:https://cloud.baidu.com/product/ocr_cards responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: log_id: type: number description: 唯一的log id,用于问题定位 words_result: type: object properties: words: type: string Birthday: type: object properties: words: type: string description: 出生日期 CardNum: type: object properties: words: type: string description: 卡号 NameChn: type: object properties: words: type: string description: 姓名 NameEng: type: object properties: words: type: string description: 姓名拼音 Sex: type: object properties: words: type: string description: 性别 ValidDate: type: object properties: words: type: string description: 有效期限 words_result_num: type: number description: 业务返回体 operationId: 2568_14_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string minLength: 0 maxLength: 10000000 description: |- 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 优先级:image > url > pdf_file,当image字段存在时,url、pdf_file字段失效 url: type: string description: |- 图片完整url,url长度不超过1024字节,url对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 优先级:image > url > pdf_file,当image字段存在时,url字段失效 请注意关闭URL防盗链 pdf_file: type: string minLength: 0 maxLength: 10000000 description: |- PDF文件,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px 优先级:image > url > pdf_file,当image、url字段存在时,pdf_file字段失效 pdf_file_num: type: string description: 需要识别的PDF文件的对应页码,当 pdf_file 参数有效时,识别传入页码的对应页面内容,若不传入,则默认识别第 1 页 exitentrypermit_type: type: string description: |- 出入境许可证件的具体类型 hk_mc_passport_front:港澳通行证正面 hk_mc_passport_back:港澳通行证反面 tw_passport_front:台湾通行证正面 tw_passport_back:台湾通行证反面 tw_return_passport_front:台胞证正面 tw_return_passport_back:台胞证反面 hk_mc_return_passport_front:返乡证正面 hk_mc_return_passport_back:返乡证反面 probability: type: string description: 是否返回字段置信度,默认为 false ,即不返回 location: type: string description: "\t是否返回字段位置坐标,默认为 false,即不返回" required: - ds_id /2568-13: x-pointCode: 13 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 护照识别 description: 支持对中国大陆护照个人资料页所有11个字段进行结构化识别,包括国家码、护照号、姓名、姓名拼音、性别、出生地点、出生日期、签发地点、签发日期、有效期、签发机关。原接口订购地址:https://cloud.baidu.com/product/ocr_cards responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: log_id: type: number description: 唯一的log id,用于问题定位 words_result: type: object properties: 国家码: type: object properties: location: type: object properties: left: type: number top: type: number width: type: number height: type: number description: 水平坐标 words: type: string description: 识别内容 姓名: type: object properties: location: type: object properties: left: type: number top: type: number width: type: number height: type: number description: 水平坐标 words: type: string description: 识别内容 性别: type: object properties: location: type: object properties: left: type: number top: type: number width: type: number height: type: number description: 水平坐标 words: type: string description: 识别内容 生日: type: object properties: location: type: object properties: left: type: number top: type: number width: type: number height: type: number description: 水平坐标 words: type: string description: 识别内容 护照签发地点: type: object properties: location: type: object properties: left: type: number top: type: number width: type: number height: type: number description: 水平坐标 words: type: string description: 识别内容 有效期至: type: object properties: location: type: object properties: left: type: number top: type: number width: type: number height: type: number description: 水平坐标 words: type: string description: 识别内容 护照号码: type: object properties: location: type: object properties: left: type: number top: type: number width: type: number height: type: number words: type: string description: 识别内容 签发日期: type: object properties: location: type: object properties: left: type: number top: type: number width: type: number height: type: number description: 水平坐标 words: type: string description: 识别内容 姓名拼音: type: object properties: location: type: object properties: left: type: number top: type: number width: type: number height: type: number description: 水平坐标 words: type: string description: 识别内容 出生地点: type: object properties: location: type: object properties: left: type: number top: type: number width: type: number height: type: number description: 水平坐标 words: type: string description: 识别内容 description: 定位和识别结果数组 words_result_num: type: number description: 业务返回体 operationId: 2568_13_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string minLength: 0 maxLength: 10000000 description: 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4m,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 url: type: string description: |- 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,当image字段存在时url字段失效 请注意关闭URL防盗链 required: - ds_id /2568-11: x-pointCode: 11 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 营业执照识别 description: 可结构化识别各类版式的营业执照,返回证件编号、社会信用代码、单位名称、地址、法人、类型、成立日期、有效日期、经营范围等关键字段信息。原接口订购地址:https://cloud.baidu.com/product/ocr_cards responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: log_id: type: number description: 请求标识码,随机数,唯一。 words_result: type: object properties: 单位名称: type: object properties: location: type: object properties: left: type: number description: 表示定位位置的长方形左上顶点的水平坐标 top: type: number description: 表示定位位置的长方形左上顶点的垂直坐标 width: type: number description: 表示定位位置的长方形的宽度 height: type: number description: 表示定位位置的长方形的高度 words: type: string description: 识别结果字符串 类型: type: object properties: location: type: object properties: left: type: number top: type: number width: type: number height: type: number words: type: string 法人: type: object properties: location: type: object properties: left: type: number top: type: number width: type: number height: type: number words: type: string 地址: type: object properties: location: type: object properties: left: type: number top: type: number width: type: number height: type: number words: type: string 有效期: type: object properties: location: type: object properties: left: type: number top: type: number width: type: number height: type: number words: type: string 证件编号: type: object properties: location: type: object properties: left: type: number top: type: number width: type: number height: type: number words: type: string 社会信用代码: type: object properties: location: type: object properties: left: type: number top: type: number width: type: number height: type: number words: type: string description: 定位和识别结果数组 words_result_num: type: number description: 业务返回体 operationId: 2568_11_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string minLength: 0 maxLength: 10000000 description: 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 url: type: string description: |- 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,当image字段存在时url字段失效 请注意关闭URL防盗链 accuracy: type: string description: 此参数新版本无需传,可选值:normal,high risk_warn: type: string description: |- 是否开启风险类型功能,默认不开启,即:false。 - false:不开启 - true:开启 required: - ds_id /2568-10: x-pointCode: 10 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 银行卡识别 description: 对主流银行卡的卡号、有效期、发卡行、卡片类型4个关键字段进行结构化识别,识别准确率超过99%。原接口订购地址:https://cloud.baidu.com/product/ocr_cards responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: log_id: type: number description: 请求标识码,随机数,唯一。 result: type: object properties: bank_card_number: type: string description: 银行卡卡号 valid_date: type: string bank_card_type: type: number description: "银行卡类型,0:不能识别; 1: 借记卡; 2: 信用卡" bank_name: type: string description: 银行名,不能识别时为空 description: 返回结果 description: 业务返回体 operationId: 2568_10_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string minLength: 0 maxLength: 10000000 description: |- 图像数据,base64编码后进行urlencode,需去掉编码头(data:image/jpeg;base64, ) 要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 url: type: string description: |- 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,当image字段存在时url字段失效 请注意关闭URL防盗链 required: - ds_id /2568-9: x-pointCode: 9 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 身份证识别 description: 结构化识别二代居民身份证正反面所有8个字段,包括姓名、性别、民族、出生日期、住址、身份证号、签发机关、有效期限,识别准确率超过99%;同时支持身份证正面头像检测,并返回头像切片的base64编码及位置信息。原接口订购地址:https://cloud.baidu.com/product/ocr_cards responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: log_id: type: number description: 唯一的log id,用于问题定位 direction: type: number description: |- 图像方向,当 detect_direction = true 时,返回该参数。 - -1:未定义, - 0:正向, - 1: 逆时针90度, - 2:逆时针180度, - 3:逆时针270度 image_status: type: string description: |- normal-识别正常 reversed_side-身份证正反面颠倒 non_idcard-上传的图片中不包含身份证 blurred-身份证模糊 other_type_card-其他类型证照 over_exposure-身份证关键字段反光或过曝 over_dark-身份证欠曝(亮度过低) unknown-未知状态 idcard_type: type: string description: "输入参数 detect_risk = true 时,则返回该字段识别身份证类型: normal-正常身份证;copy-复印件;temporary-临时身份证;screen-翻拍;unknown-其他未知情况" edit_tool: type: string description: 如果参数 detect_risk = true 时,则返回此字段。如果检测身份证被编辑过,该字段指定编辑软件名称,如:Adobe Photoshop CC 2014 (Macintosh),如果没有被编辑过则返回值无此参数 words_result: type: object properties: 住址: type: object properties: location: type: object properties: left: type: number top: type: number width: type: number height: type: number description: 位置数组(坐标0点为左上角) words: type: string description: 识别结果字符串 公民身份号码: type: object properties: location: type: object properties: left: type: number top: type: number width: type: number height: type: number words: type: string 出生: type: object properties: location: type: object properties: left: type: number top: type: number width: type: number height: type: number words: type: string 姓名: type: object properties: location: type: object properties: left: type: number top: type: number width: type: number height: type: number words: type: string 性别: type: object properties: location: type: object properties: left: type: number top: type: number width: type: number height: type: number words: type: string 民族: type: object properties: location: type: object properties: left: type: number top: type: number width: type: number height: type: number words: type: string description: 定位和识别结果数组 words_result_num: type: number description: 识别结果数,表示words_result的元素个数 description: 业务返回体 operationId: 2568_9_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string description: 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 url: type: string description: |- 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,当image字段存在时url字段失效 请注意关闭URL防盗链 id_card_side: type: string description: |- -front:身份证含照片的一面 -back:身份证带国徽的一面 自动检测身份证正反面,如果传参指定方向与图片相反,支持正常识别,返回参数image_status字段为"reversed_side" detect_risk: type: string description: |- 是否开启身份证风险类型(身份证复印件、临时身份证、身份证翻拍、修改过的身份证)功能,默认不开启,即:false。 -true:开启,请查看返回参数risk_type; -false:不开启 detect_quality: type: string description: |- 是否开启身份证质量类型(边框/四角不完整、头像或关键字段被遮挡/马赛克)检测功能,默认不开启,即:false。 - true:开启,请查看返回参数card_quality; - false:不开启 detect_photo: type: string description: 是否检测头像内容,默认不检测。可选值:true-检测头像并返回头像的 base64 编码及位置信息 required: - ds_id - id_card_side /2568-8: x-pointCode: 8 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 表格文字识别(同步接口) description: 对图片中的表格文字内容进行提取和识别,支持识别完整框线表格、含合并单元格表格或无框线表格,并可选择以JSON或Excel形式进行返回。原接口订购地址:https://cloud.baidu.com/product/ocr_general responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: {} description: 业务返回体 operationId: 2568_8_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string minLength: 0 maxLength: 10000000 description: |- 图像数据,base64编码后进行urlencode,需去掉编码头(data:image/jpeg;base64, ) 要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 url: type: string description: |- 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,当image字段存在时url字段失效 请注意关闭URL防盗链 table_border: type: string description: 识别表格对象是否有框线。缺省或 table_border = normal,可识别框线齐全的常规表格,table_border = none,可识别无框线表格。默认为normal required: - ds_id /2568-7: x-pointCode: 7 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 手写文字识别 description: 支持对图片中的手写中文、手写数字进行检测和识别,针对不规则的手写字体进行专项优化,识别准确率可达90%以上。原接口订购地址:https://cloud.baidu.com/product/ocr_general responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: log_id: type: number description: | 唯一的log id,用于问题定位 words_result: type: array items: type: object properties: "0": type: object properties: location: type: object properties: left: type: number description: 表示定位位置的长方形左上顶点的水平坐标 top: type: number description: 表示定位位置的长方形左上顶点的垂直坐标 width: type: number description: 表示定位位置的长方形的宽度 height: type: number description: 表示定位位置的长方形的高度 description: 位置数组(坐标0点为左上角) words: type: number description: 识别结果字符串 description: 定位和识别结果数组 words_result_num: type: number description: 识别结果数,表示words_result的元素个数 description: 业务返回体 operationId: 2568_7_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string minLength: 0 maxLength: 10000000 description: 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4m,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 url: type: string description: |- 图片完整url,url长度不超过1024字节,url对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 优先级:image > url > pdf_file,当image字段存在时,url字段失效 请注意关闭URL防盗链 pdf_file: type: string minLength: 0 maxLength: 10000000 description: |- PDF文件,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px 优先级:image > url > pdf_file,当image、url字段存在时,pdf_file字段失效 pdf_file_num: type: string description: 需要识别的PDF文件的对应页码,当 pdf_file 参数有效时,识别传入页码的对应页面内容,若不传入,则默认识别第 1 页 recognize_granularity: type: string description: 是否定位单字符位置,big:不定位单字符位置,默认值;small:定位单字符位置 probability: type: string description: 是否返回识别结果中每一行的置信度,默认为false,不返回置信度 detect_direction: type: string description: |- 是否检测图像朝向,默认不检测,即:false。朝向是指输入图像是正常方向、逆时针旋转90/180/270度。可选值包括: true:检测朝向; false:不检测朝向 required: - ds_id /2568-6: x-pointCode: 6 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 60 post: summary: 数字识别 description: 对图片中的数字进行提取和识别,自动过滤非数字内容,仅返回数字内容及其位置信息,识别准确率超过99%。原接口订购地址:https://cloud.baidu.com/product/ocr_general responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: log_id: type: number words_result: type: array items: type: object properties: location: type: object properties: left: type: number top: type: number width: type: number height: type: number description: 位置数组(坐标0点为左上角) words: type: string description: 识别结果字符串 description: 定位和识别结果数组 words_result_num: type: number description: 业务返回体 operationId: 2568_6_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string description: |- 图像数据,base64编码后进行urlencode,需去掉编码头(data:image/jpeg;base64, ) 要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 url: type: string description: |- 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,当image字段存在时url字段失效 请注意关闭URL防盗链 recognize_granularity: type: string description: 是否定位单字符位置,big:不定位单字符位置,默认值;small:定位单字符位置 detect_direction: type: string description: |- 是否检测图像朝向,默认不检测,即:false。朝向是指输入图像是正常方向、逆时针旋转90/180/270度。 可选值包括 - true:检测朝向; - false:不检测朝向 required: - ds_id /2568-5: x-pointCode: 5 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 网络图片文字识别 description: 针对网络图片进行专项优化,支持识别艺术字体或背景复杂的文字内容。原接口订购地址:https://cloud.baidu.com/product/ocr_general 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 words_result: type: array items: type: object properties: words: type: string words_result_num: type: number log_id: type: number description: 业务返回体 operationId: 2568_5_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string minLength: 0 maxLength: 10000000 description: 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,当image字段存在时url字段失效 url: type: string description: 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,当image字段存在时url字段失效,不支持https的图片链接 pdf_file: type: string minLength: 0 maxLength: 10000000 description: |- PDF文件,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px 优先级:image > url > pdf_file,当image、url字段存在时,pdf_file字段失效 pdf_file_num: type: string description: 需要识别的PDF文件的对应页码,当 pdf_file 参数有效时,识别传入页码的对应页面内容,若不传入,则默认识别第 1 页 detect_direction: type: string description: |- 是否检测图像朝向,默认不检测,即:false。朝向是指输入图像是正常方向、逆时针旋转90/180/270度。可选值包括: - true:检测朝向; - false:不检测朝向。 detect_language: type: string description: 是否检测语言,默认不检测。当前支持(中文、英语、日语、韩语) required: - ds_id /2568-4: x-pointCode: 4 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 通用文字识别(高精含位置信息版) description: 用户向服务请求识别某张图中的所有文字,并返回文字在图中的位置信息。原接口订购地址:https://cloud.baidu.com/product/ocr_general 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 words_result: type: array items: type: object properties: words: type: string location: type: object properties: height: type: number width: type: number left: type: number top: type: number words_result_num: type: number log_id: type: number description: 业务返回体 operationId: 2568_4_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string minLength: 0 maxLength: 10000000 description: |- 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过10M,最短边至少15px,最长边最大8192px,支持jpg/jpeg/png/bmp格式 优先级:image > url > pdf_file,当image字段存在时,url、pdf_file字段失效 url: type: string description: |- 图片完整url,url长度不超过1024字节,url对应的图片base64编码后大小不超过10M,最短边至少15px,最长边最大8192px,支持jpg/jpeg/png/bmp格式 优先级:image > url > pdf_file,当image字段存在时,url字段失效 请注意关闭URL防盗链 pdf_file: type: string minLength: 0 maxLength: 10000000 description: |- PDF文件,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过10M,最短边至少15px,最长边最大8192px 优先级:image > url > pdf_file,当image、url字段存在时,pdf_file字段失效 pdf_file_num: type: string description: 需要识别的PDF文件的对应页码,当 pdf_file 参数有效时,识别传入页码的对应页面内容,若不传入,则默认识别第 1 页 ofd_file: type: string description: OFD文件,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过10M,最短边至少15px,最长边最大8192px 优先级:image > url > pdf_file > ofd_file,当image、url、pdf_file字段存在时,ofd_file字段失效 ofd_file_num: type: string description: 需要识别的OFD文件的对应页码,当 ofd_file 参数有效时,识别传入页码的对应页面内容,若不传入,则默认识别第 1 页 language_type: type: string description: |- 识别语言类型,默认为CHN_ENG 可选值包括: - auto_detect:自动检测语言,并识别 - CHN_ENG:中英文混合 - ENG:英文 - JAP:日语 - KOR:韩语 - FRE:法语 - SPA:西班牙语 - POR:葡萄牙语 - GER:德语 - ITA:意大利语 - RUS:俄语 - DAN:丹麦语 - DUT:荷兰语 - MAL:马来语 - SWE:瑞典语 - IND:印尼语 - POL:波兰语 - ROM:罗马尼亚语 - TUR:土耳其语 - GRE:希腊语 - HUN:匈牙利语 - THA:泰语 - VIE:越南语 - ARA:阿拉伯语 - HIN:印地语 eng_granularity: type: string description: 表示识别语言类型为「中英文(CHN_ENG)」的情况下,英文的单字符结果是按照单词(word)维度输出还是字母(letter)维度输出,当 recognize_granularity=small 时生效 recognize_granularity: type: string description: 是否定位单字符位置,big:不定位单字符位置,默认值;small:定位单字符位置 detect_direction: type: string description: |- 是否检测图像朝向,默认不检测,即:false。朝向是指输入图像是正常方向、逆时针旋转90/180/270度。可选值包括: - true:检测朝向; - false:不检测朝向。 vertexes_location: type: string description: 是否返回文字外接多边形顶点位置,不支持单字位置。默认为false paragraph: type: string description: 是否输出段落信息 probability: type: string description: 是否返回识别结果中每一行的置信度 required: - ds_id /2568-3: x-pointCode: 3 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 通用文字识别(标准版) description: 多场景、多语种、高精度的整图文字检测和识别服务,多项ICDAR指标居世界第一;可识别20种语言,最高可享每天50000次免费调用。原接口订购地址:https://cloud.baidu.com/product/ocr_general 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 words_result: type: array items: type: object properties: words: type: string words_result_num: type: number log_id: type: number description: 业务返回体 operationId: 2568_3_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string minLength: 0 maxLength: 10000000 description: |- 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 优先级:image > url > pdf_file,当image字段存在时,url、pdf_file字段失效 url: type: string description: |- 图片完整url,url长度不超过1024字节,url对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 优先级:image > url > pdf_file,当image字段存在时,url字段失效 请注意关闭URL防盗链 pdf_file: type: string minLength: 0 maxLength: 10000000 description: |- PDF文件,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px 优先级:image > url > pdf_file,当image、url字段存在时,pdf_file字段失效 pdf_file_num: type: string description: 需要识别的PDF文件的对应页码,当 pdf_file 参数有效时,识别传入页码的对应页面内容,若不传入,则默认识别第 1 页 ofd_file: type: string description: OFD文件,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过8M,最短边至少15px,最长边最大4096px 优先级:image > url > pdf_file > ofd_file,当image、url、pdf_file字段存在时,ofd_file字段失效 ofd_file_num: type: string description: 需要识别的OFD文件的对应页码,当 ofd_file 参数有效时,识别传入页码的对应页面内容,若不传入,则默认识别第 1 页 language_type: type: string description: |- 识别语言类型,默认为CHN_ENG 可选值包括: - CHN_ENG:中英文混合 - ENG:英文 - JAP:日语 - KOR:韩语 - FRE:法语 - SPA:西班牙语 - POR:葡萄牙语 - GER:德语 - ITA:意大利语 - RUS:俄语 detect_direction: type: string description: |- 是否检测图像朝向,默认不检测,即:false。朝向是指输入图像是正常方向、逆时针旋转90/180/270度。可选值包括: - true:检测朝向; - false:不检测朝向。 paragraph: type: string description: 是否输出段落信息 true/false probability: type: string description: 是否返回识别结果中每一行的置信度 required: - ds_id /2568-2: x-pointCode: 2 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 通用文字识别(标准含位置信息版) description: 用户向服务请求识别某张图中的所有文字,并返回文字在图中的位置信息。原接口订购地址:https://cloud.baidu.com/product/ocr_general 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 words_result: type: array items: type: object properties: words: type: string location: type: object properties: height: type: number width: type: number left: type: number top: type: number words_result_num: type: number log_id: type: number description: 业务返回体 operationId: 2568_2_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string minLength: 0 maxLength: 10000000 description: |- 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 优先级:image > url > pdf_file,当image字段存在时,url、pdf_file字段失效 url: type: string description: 图片完整url,url长度不超过1024字节,url对应的图片base64编码后大小不超过4m,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,当image字段存在时url字段失效,不支持https的图片链接 pdf_file: type: string minLength: 0 maxLength: 10000000 description: |- PDF文件,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px 优先级:image > url > pdf_file,当image、url字段存在时,pdf_file字段失效 pdf_file_num: type: string description: 需要识别的PDF文件的对应页码,当 pdf_file 参数有效时,识别传入页码的对应页面内容,若不传入,则默认识别第 1 页 ofd_file: type: string description: OFD文件,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过8M,最短边至少15px,最长边最大4096px 优先级:image > url > pdf_file > ofd_file,当image、url、pdf_file字段存在时,ofd_file字段失效 ofd_file_num: type: string description: "需要识别的OFD文件的对应页码,当 ofd_file 参数有效时,识别传入页码的对应页面内容,若不传入,则默认识别第 1 页\t" recognize_granularity: type: string description: 是否定位单字符位置,big:不定位单字符位置,默认值;small:定位单字符位置 detect_language: type: string description: 是否检测语言,默认不检测。当前支持(中文、英语、日语、韩语) detect_direction: type: string description: |- 是否检测图像朝向,默认不检测,即:false。朝向是指输入图像是正常方向、逆时针旋转90/180/270度。可选值包括: - true:检测朝向; - false:不检测朝向。 vertexes_location: type: string description: 是否返回文字外接多边形顶点位置,不支持单字位置。默认为false probability: type: string description: 是否返回识别结果中每一行的置信度 paragraph: type: string description: 是否输出段落信息 required: - ds_id /2568-1: x-pointCode: 1 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 通用文字识别(高精度版) description: 用户向服务请求识别某张图中的所有文字,相对于通用文字识别该产品精度更高,但是识别耗时会稍长。原接口订购地址:https://cloud.baidu.com/product/ocr_general 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 words_result: type: array items: type: object properties: words: type: string words_result_num: type: number log_id: type: number description: 业务返回体 operationId: 2568_1_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 image: type: string minLength: 0 maxLength: 10000000 description: |- 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过10M,最短边至少15px,最长边最大8192px,支持jpg/jpeg/png/bmp格式 优先级:image > url > pdf_file,当image字段存在时,url、pdf_file字段失效 url: type: string description: |- 图片完整url,url长度不超过1024字节,url对应的图片base64编码后大小不超过10M,最短边至少15px,最长边最大8192px,支持jpg/jpeg/png/bmp格式 优先级:image > url > pdf_file,当image字段存在时,url字段失效 请注意关闭URL防盗链 pdf_file: type: string minLength: 0 maxLength: 10000000 description: |- PDF文件,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过10M,最短边至少15px,最长边最大8192px 优先级:image > url > pdf_file,当image、url字段存在时,pdf_file字段失效 pdf_file_num: type: string description: 需要识别的PDF文件的对应页码,当 pdf_file 参数有效时,识别传入页码的对应页面内容,若不传入,则默认识别第 1 页 ofd_file: type: string description: OFD文件,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过10M,最短边至少15px,最长边最大8192px 优先级:image > url > pdf_file > ofd_file,当image、url、pdf_file字段存在时,ofd_file字段失效 ofd_file_num: type: string description: 需要识别的OFD文件的对应页码,当 ofd_file 参数有效时,识别传入页码的对应页面内容,若不传入,则默认识别第 1 页 language_type: type: string description: |- 识别语言类型,默认为CHN_ENG 可选值包括: - auto_detect:自动检测语言,并识别 - CHN_ENG:中英文混合 - ENG:英文 - JAP:日语 - KOR:韩语 - FRE:法语 - SPA:西班牙语 - POR:葡萄牙语 - GER:德语 - ITA:意大利语 - RUS:俄语 - DAN:丹麦语 - DUT:荷兰语 - MAL:马来语 - SWE:瑞典语 - IND:印尼语 - POL:波兰语 - ROM:罗马尼亚语 - TUR:土耳其语 - GRE:希腊语 - HUN:匈牙利语 - THA:泰语 - VIE:越南语 - ARA:阿拉伯语 - HIN:印地语 detect_direction: type: string description: |- 是否检测图像朝向,默认不检测,即:false。朝向是指输入图像是正常方向、逆时针旋转90/180/270度。可选值包括: - true:检测朝向; - false:不检测朝向 paragraph: type: string description: 是否输出段落信息 probability: type: string description: 是否返回识别结果中每一行的置信度 required: - ds_id 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/2568?tab=book x-apiCode: "2568" x-is-own: false x-is-op: false