# Generated by ShowAPI OpenAPI generator # source: market/2572 # generated-at: 2026-07-25T23:10:01.192Z openapi: 3.0.3 info: title: 百度云-图像技术 description: 支持图像识别的多个接口:通用物体和场景识别、图像单主体检测、动物识别、植物识别、logo识别-检索、果蔬识别、自定义菜品识别-检索、菜品识别、红酒识别、货币识别、地标识别、图像多主体检测等12个模型服务的调用。 termsOfService: https://www.showapi.com/helpcenter/view#/4019/2 version: 1.0.0 servers: - url: https://route.showapi.com paths: /2572-32: x-pointCode: 32 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 车辆属性识别 description: |- 针对常见的小汽车车型,识别车辆外观受损部件及损伤类型,支持32种车辆部件、5大类外观损伤。同时可输出损伤的数值化结果(长宽、面积、部件占比),支持单图多种损伤的识别。 可识别的32种汽车外观零部件:前保险杠、机盖、左前叶子板、左A柱、左前门、左后叶子板、左底大边、后保险杠、行李箱盖、右后叶子板、右底大边、右后门、右前门、右前叶子板、右A柱、车顶、钢圈、中网、左前大灯、左前雾灯、左前雾灯框、右前大灯、右前雾灯、右前雾灯框、前保下隔栅、左后视镜、右后视镜、左后外尾灯、左后内尾灯、右后外尾灯、右后内尾灯、左后门 可识别的5类外观损伤:刮擦、凹陷、开裂、褶皱、穿孔(一般指有破洞的情况) responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: result: type: object properties: damage_info: type: array items: type: object properties: numeric_info: type: array items: type: object properties: height: type: number description: 损伤区域的长,单位厘米 area: type: number description: 损伤区域的面积,为实际面积,不是单纯的长*宽 ratio: type: number description: 损伤区域面积相对于部件面积的占比,= 损伤区域面积 / 部件区域面积,均为实际面积,不是单纯的长*宽 width: type: number description: 损伤区域的宽,单位厘米 description: 损伤的数值化输出结果,如果有多处损伤,则有多个object;损伤的部件需拍摄完整,才能输出数值化结果,否则只返回部件名称和损伤类别,不输出数值化信息 probability: type: number description: 概率打分 parts: type: string description: 汽车零部件名称,共计支持32种零部件 type: type: string description: 损伤类别,共计支持5类外观损伤;无损伤则返回“正常” 。注:如果全图无损伤,则整个返回结果为空;某个部件的type为“正常”仅表示该部件无损伤。 description: 部件损伤信息 description: 识别结果 ret_code: type: number log_id: type: number description: 业务返回体 operationId: 2572_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编码字符串,不超过4M。最短边至少50px,最长边最多4096px。支持图片格式:jpg,bmp,png。 注意:图片的base64编码是不包含图片头的,如(data:image/jpg;base64,) url: type: string description: "\t图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少50px,最长边最大4096px,支持jpg/png/bmp格式,当image字段存在时url字段失效。" type: type: string description: 是否选定某些属性输出对应的信息,可从24种输出属性中任选若干,用英文逗号分隔(例如top_holder,skylight,window_rain_eyebrow)。默认输出全部属性 required: - ds_id /2572-31: x-pointCode: 31 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 车辆外观损伤识别 description: |- 针对常见的小汽车车型,识别车辆外观受损部件及损伤类型,支持32种车辆部件、5大类外观损伤。同时可输出损伤的数值化结果(长宽、面积、部件占比),支持单图多种损伤的识别。 可识别的32种汽车外观零部件:前保险杠、机盖、左前叶子板、左A柱、左前门、左后叶子板、左底大边、后保险杠、行李箱盖、右后叶子板、右底大边、右后门、右前门、右前叶子板、右A柱、车顶、钢圈、中网、左前大灯、左前雾灯、左前雾灯框、右前大灯、右前雾灯、右前雾灯框、前保下隔栅、左后视镜、右后视镜、左后外尾灯、左后内尾灯、右后外尾灯、右后内尾灯、左后门 可识别的5类外观损伤:刮擦、凹陷、开裂、褶皱、穿孔(一般指有破洞的情况) responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: result: type: object properties: damage_info: type: array items: type: object properties: numeric_info: type: array items: type: object properties: height: type: number description: 损伤区域的长,单位厘米 area: type: number description: 损伤区域的面积,为实际面积,不是单纯的长*宽 ratio: type: number description: 损伤区域面积相对于部件面积的占比,= 损伤区域面积 / 部件区域面积,均为实际面积,不是单纯的长*宽 width: type: number description: 损伤区域的宽,单位厘米 description: 损伤的数值化输出结果,如果有多处损伤,则有多个object;损伤的部件需拍摄完整,才能输出数值化结果,否则只返回部件名称和损伤类别,不输出数值化信息 probability: type: number description: 概率打分 parts: type: string description: 汽车零部件名称,共计支持32种零部件 type: type: string description: 损伤类别,共计支持5类外观损伤;无损伤则返回“正常” 。注:如果全图无损伤,则整个返回结果为空;某个部件的type为“正常”仅表示该部件无损伤。 description: 部件损伤信息 description: 识别结果 ret_code: type: number log_id: type: number description: 业务返回体 operationId: 2572_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编码字符串,不超过4M。最短边至少50px,最长边最多4096px。支持图片格式:jpg,bmp,png。 注意:图片的base64编码是不包含图片头的,如(data:image/jpg;base64,) url: type: string description: 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少50px,最长边最大4096px,支持jpg/png/bmp格式,当image字段存在时url字段失效。 required: - ds_id /2572-30: x-pointCode: 30 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 车辆检测 description: 传入单帧图像,检测图片中所有机动车辆,返回每辆车的类型和坐标位置,可识别小汽车、卡车、巴士、摩托车、三轮车5大类车辆,并对每类车辆分别计数,可返回含有统计值和检测框的渲染结果图,支持指定不规则区域的车辆统计。 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 vehicle_info: type: array items: type: object properties: location: type: object properties: height: type: number description: 目标检测框高度 width: type: number description: 目标检测框宽度 left: type: number description: 目标检测框左坐标 top: type: number description: 目标检测框顶坐标 description: 检测到的目标坐标位置 probability: type: number description: 置信度分数,取值0-1之间,越接近1说明识别准确的概率越大 type: type: string description: 目标物体类型,car、truck、bus、motorbike、tricycle、carplate description: 检测到的车辆数目 log_id: type: number vehicle_num: type: object properties: car: type: number description: 小汽车数量 tricycle: type: number description: 三轮车数量 carplate: type: number description: 车牌的数量,小汽车、卡车、巴士才能检测到车牌 bus: type: number description: 巴士数量 motorbike: type: number description: 摩托车数量 truck: type: number description: 卡车数量 description: 检测到的车辆数目 description: 业务返回体 operationId: 2572_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编码字符串,不超过4m。最短边至少10px,最长边最多4096px。支持图片格式:jpg,bmp,png。 注意:图片的base64编码是不包含图片头的,如(data:image/jpg;base64,) url: type: string description: 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少50px,最长边最大4096px,支持jpg/png/bmp格式,当image字段存在时url字段失效。 area: type: string description: 只统计该区域内的车辆数,缺省时为全图统计。逗号分隔,如‘x1,y1,x2,y2,x3,y3...xn,yn',按顺序依次给出每个顶点的x、y坐标(默认尾点和首点相连),形成闭合多边形区域。服务会做范围(顶点左边需在图像范围内)及个数校验(数组长度必须为偶数,且大于3个顶点)。只支持单个多边形区域,建议设置矩形框,即4个顶点。坐标取值不能超过图像宽度和高度,比如1280的宽度,坐标值最大到1279。 required: - ds_id /2572-29: x-pointCode: 29 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 车型识别 description: 该请求用于检测一张车辆图片的具体车型。即对于输入的一张图片(可正常解码,且长宽比适宜),输出图片的车辆品牌及型号、颜色及年份、位置信息。 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,用于问题定位 location_result: type: object properties: width: type: number top: type: number height: type: number left: type: number description: 车在图片中的位置信息 result: type: array items: type: object properties: "0": type: object properties: baike_info: type: object properties: baike_url: type: string description: 对应识别结果百度百科页面链接 description: type: string description: 对应识别结果百科内容描述 description: 对应识别结果的百科词条名称 score: type: number description: 置信度,示例:0.5321 name: type: string description: 车型名称,示例:宝马x6 year: type: string description: 年份 "1": type: object properties: score: type: number name: type: string year: type: string "2": type: object properties: score: type: number name: type: string year: type: string "3": type: object properties: score: type: number name: type: string year: type: string "4": type: object properties: score: type: number name: type: string year: type: string description: 车型识别结果数组 color_result: type: string description: 颜色 description: 业务返回体 operationId: 2572_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编码,要求base64编码后大小不超过4m,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式 。注意:图片需要base64编码、去掉编码头后再进行urlencode。 url: type: string description: 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少50px,最长边最大4096px,支持jpg/png/bmp格式,当image字段存在时url字段失效。 top_num: type: number description: 返回结果top n,默认5。 baike_num: type: number description: 返回百科信息的结果数,默认不返回 required: - ds_id /2572-28: x-pointCode: 28 x-mode: mapping x-read-timeout: 30 x-connect-timeout: 30 post: summary: 自定义菜品-删除 description: 该接口实现已入库菜品图片的删除操作。 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,用于问题定位 description: 业务返回体 operationId: 2572_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: |- 和cont_sign、url三选一 Base64编码字符串,以图片文件形式请求时必填。图片大小不超过4M。最短边至少300px,最长边最大3000px。注意:图片需要base64编码、去掉编码头后再进行urlencode。 url: type: string description: |- 和cont_sign、image三选一 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少300px,最长边最大3000px,长宽比3:1以内,支持jpg/png/bmp格式,当image字段存在时url字段失效。 cont_sign: type: string description: 图片签名(和image、url三选一,优先级image>url>cont_sign) required: - ds_id /2572-27: x-pointCode: 27 x-mode: mapping x-read-timeout: 30 x-connect-timeout: 30 post: summary: 自定义菜品-检索 description: 在已自建菜品库并入库的情况下,该接口实现单菜品/多菜品的识别。 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: result_num: type: number description: | 检索结果数 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: 菜品在图片中的位置 dishes: type: array items: type: object properties: "0": type: object properties: score: type: number description: 图片相关性,0-1 brief: type: string description: 入库菜品时添加的brief信息 cont_sign: type: string description: 图片签名,可以用来删除图片或问题定位 description: 识别结果数组 description: 识别结果数组 log_id: type: number description: 唯一的log id,用于问题定位 description: 业务返回体 operationId: 2572_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: |- 和url二选一 Base64编码字符串,以图片文件形式请求时必填。图片大小不超过4M。最短边至少300px,最长边最大3000px。注意:图片需要base64编码、去掉编码头后再进行urlencode。 url: type: string description: |- 和image二选一 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少300px,最长边最大3000px,长宽比3:1以内,支持jpg/png/bmp格式,当image字段存在时url字段失效。 required: - ds_id /2572-26: x-pointCode: 26 x-mode: mapping x-read-timeout: 52 x-connect-timeout: 52 post: summary: 自定义菜品-入库 description: 入库前请先去百度官方申请建库。该接口实现单张菜品图片入库,入库时需要同步提交图片及可关联至本地菜品图库的摘要信息(具体变量为brief,brief可传入图片在本地标记id、图片url、图片名称等) responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: cont_sign: type: string description: 输入图片签名 log_id: type: number description: 唯一的log id,用于问题定位 description: 业务返回体 operationId: 2572_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编码字符串,以图片文件形式请求时必填。图片大小不超过4M。最短边至少300px,最长边最大3000px。注意:图片需要base64编码、去掉编码头后再进行urlencode。 brief: type: string description: '菜品名称摘要信息,检索时带回,不超过256B。由于检索后需要与本地数据库关联,建议brief可传入图片在本地标记id、图片url、图片名称等,如"brief": "{\"菜名\":\"鱼香肉丝\"}"' required: - ds_id - image - brief /2572-25: x-pointCode: 25 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 商品图片-更新 description: |- 更新图库中图片的摘要和分类信息(具体变量为brief、class_id1/class_id2) 请求图片需经过base64编码:图片的base64编码指将一副图片数据编码成一串字符串,使用该字符串代替图像地址。您可以首先得到图片的二进制,然后用Base64格式编码即可。注意在请求时需去掉头部。 注意:图片的base64编码是不包含图片头的,如(data:image/jpg;base64,) 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,用于问题定位 description: 业务返回体 operationId: 2572_25_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编码,和url、cont_sign三选一,优先级:image > url > cont_sign,注意要去掉图片头部,如(data:image/jpg;base64,),要求base64编码后大小不超过4M,最短边至少300px,最长边最大4096px,支持jpg/png/bmp格式 url: type: string description: 图片URL,和image、cont_sign三选一,优先级:image > url > cont_sign,由于图床的差异性,抓图服务无法适配所有的图床,部分URL可能抓不到图,或者图片下载超时,遇到上述情况时请更换图片URL、或者将图片下载到本地转码后上传 cont_sign: type: string description: 图片签名,和image、url三选一,优先级:image > url > cont_sign;不支持批量传入签名,样例:"932301884,10680062193" brief: type: string description: | 更新的摘要信息,最长256B。样例:{"name":"周杰伦", "id":"666"} class_id1: type: number description: | 更新的商品分类1,支持1-65535范围内的整数。 class_id2: type: number description: | 更新的商品分类2,支持1-65535范围内的整数。 required: - ds_id /2572-24: x-pointCode: 24 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 商品图片-删除 description: |- 删除图库中的图片,支持批量删除,批量删除时请传cont_sign参数,勿传image,最多支持1000个cont_sign。 图片删除延时生效,每天数据库定时更新进行物理删除,刚删除时仍然可以在图库中检索到(但图库管理后台是同步清除),请过一段时间再验证,一般最多延时4小时左右。 请求图片需经过base64编码:图片的base64编码指将一副图片数据编码成一串字符串,使用该字符串代替图像地址。您可以首先得到图片的二进制,然后用Base64格式编码即可。注意在请求时需去掉头部。 注意:图片的base64编码是不包含图片头的,如(data:image/jpg;base64,) 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,用于问题定位 description: 业务返回体 operationId: 2572_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。(和url、cont_sign三选一,优先级:image > url > cont_sign),注意要去掉图片头部,如(data:image/jpg;base64,)。要求base64编码后大小不超过4M,最短边至少300px,最长边最大4096px,支持jpg/png/bmp格式 url: type: string description: | 图片URL,和image、cont_sign三选一,image优先级更高,由于图床的差异性,抓图服务无法适配所有的图床,部分URL可能抓不到图,或者图片下载超时,遇到上述情况时请更换图片URL、或者将图片下载到本地转码后上传 cont_sign: type: string description: | 图片签名(和image、url三选一,优先级最低),支持批量删除,批量删除时请勿传image、url,最多支持1000个cont_sign列表,样例:"932301884,1068006219;316336521,553141152;2491030726,1352091083" required: - ds_id /2572-23: x-pointCode: 23 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 商品图片-检索 description: |- 完成入库后,可使用该接口实现商品检索。支持传入指定分类维度(具体变量class_id1、class_id2)进行检索,返回结果支持翻页(具体变量pn、rn)。 注意: 1、检索接口不返回原图,仅返回入库时填写的brief信息,请调用入库接口时尽量填写可关联至本地图库的图片id或者图片url等信息。 2、检索接口默认返回TOP 300的结果,如果图库里不满300张图片,会返回所有图片,请入库足量图片以便充分测试效果。 3、原则上任何2张图片都有相似度,只不过分值有高低,应用时可结合接口返回的相关性分数score(取值范围0-1,越接近1代表相似度越高)进行筛选,如选取score大于某个值的结果进行应用。 请求图片需经过base64编码:图片的base64编码指将一副图片数据编码成一串字符串,使用该字符串代替图像地址。您可以首先得到图片的二进制,然后用Base64格式编码即可。注意在请求时需去掉头部。 注意:图片的base64编码是不包含图片头的,如(data:image/jpg;base64,) responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: result_num: type: number description: | 检索结果数 result: type: array items: type: object properties: "0": type: object properties: score: type: number description: | 图片相关性,取值范围0-1,越接近1代表越相似 brief: type: string description: | 入库时添加的brief信息 cont_sign: type: string description: | 图片签名,可以用来删除图片或定位问题 description: | 结果数组 has_more: type: string description: | 是否还有下一页,返回值:true、false;如果不分页,不用关注该字段 log_id: type: number description: | 唯一的log id,用于问题定位 description: 业务返回体 operationId: 2572_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: 10000000 description: | 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M。和url二选一,image优先级更高,注意要去掉图片头部,如(data:image/jpg;base64,),最短边至少300px,最长边最大4096px,支持jpg/png/bmp格式。 url: type: string description: | 图片URL,和image二选一,image优先级更高,由于图床的差异性,抓图服务无法适配所有的图床,部分URL可能抓不到图,或者图片下载超时,遇到上述情况时请更换图片URL、或者将图片下载到本地转码后上传 class_id1: type: number description: | 商品分类维度1,支持1-65535范围内的整数。 class_id2: type: number description: | 商品分类维度2,支持1-65535范围内的整数。 tag_logic: type: string description: | 检索时tag之间的逻辑, 0:逻辑and,1:逻辑or pn: type: string description: 分页功能,起始位置,例:0。未指定分页时,默认返回前300个结果;接口返回数量最大限制1000条,例如:起始位置为900,截取条数500条,接口也只返回第900 - 1000条的结果,共计100条 rn: type: string description: | 分页功能,截取条数,例:250 required: - ds_id /2572-22: x-pointCode: 22 x-mode: mapping x-read-timeout: 20 x-connect-timeout: 50 post: summary: 商品图片-入库 description: |- 入库前请先去百度官方申请建库。该接口实现单张图片入库,入库时需要同步提交图片及可关联至本地图库的摘要信息(具体变量为brief,具体可传入图片在本地标记id、图片url、图片名称等)。同时可提交分类维度信息(具体变量为class_id1、class_id2),方便对图库中的图片进行管理、分类检索。 注:重复添加完全相同的图片会返回错误。 请求图片需经过base64编码:图片的base64编码指将一副图片数据编码成一串字符串,使用该字符串代替图像地址。您可以首先得到图片的二进制,然后用Base64格式编码即可。注意在请求时需去掉头部。 注意:图片的base64编码是不包含图片头的,如(data:image/jpg;base64,) 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,用于问题定位 cont_sign: type: string description: | 上传图片的签名信息,请务必保存至本地,以便后续用作批量删除、查询某张图是否已经入过库等用途 description: 业务返回体 operationId: 2572_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。和url二选一,image优先级更高,注意要去掉图片头部,如(data:image/jpg;base64,),最短边至少300px,最长边最大4096px,支持jpg/png/bmp格式。重复添加会返回错误。 url: type: string description: | 图片URL,和image二选一,image优先级更高 ,由于图床的差异性,抓图服务无法适配所有的图床,部分URL可能抓不到图,或者图片下载超时,遇到上述情况时请更换图片URL、或者将图片下载到本地转码后上传 brief: type: string description: | 检索时原样带回,最长256B。样例{"name":"周杰伦", "id":"666"} 请注意,检索接口不返回原图,仅返回当前填写的brief信息,所以调用入库接口时,brief信息请尽量填写可关联至本地图库的图片id或者图片url、图片名称等信息 class_id1: type: number description: | 商品分类维度1,检索时可圈定该分类维度进行检索;只传入class_id1,则检索结果中包含class_id1内容的都会被检索到;同时传入class_id1与class_id2,则检索结果中同时包含class_id1和class_id2内容的才会被检索到 class_id2: type: number description: | 商品分类维度2,检索时可圈定该分类维度进行检索 ,class_id1和class_id2无层级关系,检索时支持逻辑运算 required: - ds_id /2572-21: x-pointCode: 21 x-mode: mapping x-read-timeout: 30 x-connect-timeout: 30 post: summary: 相似图-更新 description: |- 更新图库中图片的摘要和分类信息(具体变量为brief、tags) 请求图片需经过base64编码:图片的base64编码指将一副图片数据编码成一串字符串,使用该字符串代替图像地址。您可以首先得到图片的二进制,然后用Base64格式编码即可。注意在请求时需去掉头部。 注意:图片的base64编码是不包含图片头的,如(data:image/jpg;base64,) 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,用于问题定位 description: 业务返回体 operationId: 2572_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。和url、cont_sign三选一,优先级:image > url > cont_sign,注意要去掉图片头部,如(data:image/jpg;base64,),要求base64编码后大小不超过4M,最短边至少50px,最长边最大4096px,支持jpg/png/bmp格式。 url: type: string description: 图片URL,和image、cont_sign三选一,优先级:image > url > cont_sign,由于图床的差异性,抓图服务无法适配所有的图床,部分URL可能抓不到图,或者图片下载超时,遇到上述情况时请更换图片URL、或者将图片下载到本地转码后上传 cont_sign: type: string description: 图片签名,和image、url三选一,优先级:image > url > cont_sign;不支持批量传入签名,样例:"932301884,10680062193" brief: type: string description: 更新的摘要信息,最长256B。样例:{"name":"周杰伦", "id":"666"} tags: type: string description: | 更新的分类信息,tag间以逗号分隔,最多2个tag。样例:"100,11" required: - ds_id /2572-20: x-pointCode: 20 x-mode: mapping x-read-timeout: 30 x-connect-timeout: 30 post: summary: 相似图-删除 description: |- 删除图库中的图片,支持批量删除,批量删除时请传cont_sign参数,勿传image,最多支持1000个cont_sign 图片删除延时生效,每天数据库定时更新进行物理删除,刚删除时仍然可以在图库中检索到(但图库管理后台是同步清除),请过一段时间再验证,一般最多延时4小时左右。 请求图片需经过base64编码:图片的base64编码指将一副图片数据编码成一串字符串,使用该字符串代替图像地址。您可以首先得到图片的二进制,然后用Base64格式编码即可。注意在请求时需去掉头部。 注意:图片的base64编码是不包含图片头的,如(data:image/jpg;base64,) 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: 业务返回体 operationId: 2572_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。和url、cont_sign三选一,优先级:image > url > cont_sign,注意要去掉图片头部,如(data:image/jpg;base64,)。最短边至少50px,最长边最大4096px,支持jpg/png/bmp格式 url: type: string description: 图片URL,和image、cont_sign三选一,image优先级更高 cont_sign: type: string description: 图片签名(和image、url三选一),支持批量删除,批量删除时请勿传image、url,最多支持1000个cont_sign列表,样例:"932301884,1068006219;316336521,553141152;2491030726,1352091083" required: - ds_id /2572-19: x-pointCode: 19 x-mode: mapping x-read-timeout: 30 x-connect-timeout: 30 post: summary: 相似图-检索 description: |- 完成入库后,可使用该接口实现相似图检索。支持传入指定分类维度(具体变量tags)进行检索,返回结果支持翻页(具体变量pn、rn)。 注意: 1、检索接口不返回原图,仅返回入库时填写的brief信息,请调用入库接口时尽量填写可关联至本地图库的图片id或者图片url等信息。 2、检索接口默认返回TOP 300的结果,如果图库里不满300张图片,会返回所有图片,请入库足量图片以便充分测试效果。 3、原则上任何2张图片都有相似度,只不过分值有高低,应用时可结合接口返回的相关性分数score(取值范围0-1,越接近1代表相似度越高)进行筛选,如选取score大于某个值的结果进行应用。 请求图片需经过base64编码:图片的base64编码指将一副图片数据编码成一串字符串,使用该字符串代替图像地址。您可以首先得到图片的二进制,然后用Base64格式编码即可。注意在请求时需去掉头部。 注意:图片的base64编码是不包含图片头的,如(data:image/jpg;base64,) responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: result_num: type: number description: | 检索结果数 result: type: array items: type: object properties: "0": type: object properties: score: type: number description: | 图片相关性,取值范围0-1,越接近1代表越相似 brief: type: string description: add时添加的brief信息 cont_sign: type: string description: 图片签名,可以用来删除图片或定位问题 description: 结果数组 has_more: type: string description: 是否还有下一页,返回值:true、false;如果不分页,不用关注该字段 log_id: type: number description: 唯一的log id,用于问题定位 description: 业务返回体 operationId: 2572_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。和url二选一,image优先级更高,注意要去掉图片头部,如(data:image/jpg;base64,),最短边至少50px,最长边最大4096px,支持jpg/png/bmp格式. url: type: string description: 图片URL,和image二选一,image优先级更高 ,由于图床的差异性,抓图服务无法适配所有的图床,部分URL可能抓不到图,或者图片下载超时,遇到上述情况时请更换图片URL、或者将图片下载到本地转码后上传 tags: type: string description: 分类维度信息,tag间以逗号分隔,最多可传入2个tag,2个tag无层级关系,检索时支持逻辑运算。示例:"100,11" tag_logic: type: string description: 检索时tag之间的逻辑, 0:逻辑and,1:逻辑or pn: type: string description: 分页功能,起始位置,例:0。未指定分页时,默认返回前300个结果;接口返回数量最大限制1000条,例如:起始位置为900,截取条数500条,接口也只返回第900 - 1000条的结果,共计100条 rn: type: string description: 分页功能,截取条数,例:250 required: - ds_id /2572-18: x-pointCode: 18 x-mode: mapping x-read-timeout: 35 x-connect-timeout: 35 post: summary: 相似图-入库 description: |- 入库前请先去百度官方申请建库。该接口实现单张图片入库,入库时需要同步提交图片及可关联至本地图库的摘要信息(具体变量为brief,具体可传入图片在本地标记id、图片url、图片名称等);同时可提交分类维度信息(具体变量为tags,最多可传入2个tag),方便对图库中的图片进行管理、分类检索。 注:重复添加完全相同的图片会返回错误。 请求图片需经过base64编码:图片的base64编码指将一副图片数据编码成一串字符串,使用该字符串代替图像地址。您可以首先得到图片的二进制,然后用Base64格式编码即可。注意在请求时需去掉头部。 注意:图片的base64编码是不包含图片头的,如(data:image/jpg;base64,) 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,无实际意义,用于问题定位 cont_sign: type: string description: 输入图片的签名信息,请务必保存至本地,以便后续用作批量删除、查询某张图是否已经入过库等用途 description: 业务返回体 operationId: 2572_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后大小不超过4M。(和url二选一,image优先级更高),注意要去掉图片头部,如(data:image/jpg;base64,),最短边至少50px,最长边最大4096px,支持jpg/png/bmp格式。重复添加完全相同的图片会返回错误,提示不能重复入库。 url: type: string description: 图片URL,和image二选一,image优先级更高,由于图床的差异性,抓图服务无法适配所有的图床,部分URL可能抓不到图,或者图片下载超时,遇到上述情况时请更换图片URL、或者将图片下载到本地转码后上传 brief: type: string description: 检索时原样带回,最长256B。样例:{"name":"周杰伦", "id":"666"} 。请注意,检索接口不返回原图,仅返回入库时填写的brief信息,所以调用该入库接口时,brief信息请尽量填写可关联至本地图库的图片id或者图片url、图片名称等信息 tags: type: string description: tag间以逗号分隔,最多2个tag,2个tag无层级关系,检索时支持逻辑运算。样例:"100,11" ;检索时可圈定分类维度进行检索 required: - ds_id - brief /2572-17: x-pointCode: 17 x-mode: mapping x-read-timeout: 20 x-connect-timeout: 20 post: summary: 相同图片-更新 description: |- 更新图库中图片的摘要和分类信息(具体变量为brief、tags) 请求图片需经过base64编码:图片的base64编码指将一副图片数据编码成一串字符串,使用该字符串代替图像地址。您可以首先得到图片的二进制,然后用Base64格式编码即可。注意在请求时需去掉头部。 注意:图片的base64编码是不包含图片头的,如(data:image/jpg;base64,) 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,用于问题定位 description: 业务返回体 operationId: 2572_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: 图片数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,和url、cont_sign三选一,优先级:image > url > cont_sign,注意要去掉图片头部,如(data:image/jpg;base64,),最短边至少50px,最长边最大4096px,支持jpg/png/bmp格式;重复添加会返回错误。 url: type: string description: 图片URL,和image、cont_sign三选一,优先级:image > url > cont_sign ,由于图床的差异性,抓图服务无法适配所有的图床,部分URL可能抓不到图,或者图片下载超时,遇到上述情况时请更换图片URL、或者将图片下载到本地转码后上传 cont_sign: type: string description: 图片签名,和image、url三选一,优先级:image > url > cont_sign;不支持批量传入签名,样例:"932301884,10680062193" brief: type: string description: | 更新的摘要信息,最长256B。样例:{"name":"周杰伦", "id":"666"} tags: type: string description: 更新的分类信息,tag间以逗号分隔,最多2个tag。样例:"100,11" required: - ds_id /2572-16: x-pointCode: 16 x-mode: mapping x-read-timeout: 30 x-connect-timeout: 30 post: summary: 相同图片-删除 description: |- 删除图库中的图片,支持批量删除,批量删除时请传cont_sign参数,勿传image、url,最多支持1000个cont_sign。 图片删除延时生效,每天数据库定时更新进行物理删除,刚删除时仍然可以在图库中检索到(但图库管理后台是同步清除),请过一段时间再验证,一般最多延时4小时左右。 请求图片需经过base64编码:图片的base64编码指将一副图片数据编码成一串字符串,使用该字符串代替图像地址。您可以首先得到图片的二进制,然后用Base64格式编码即可。注意在请求时需去掉头部。 注意:图片的base64编码是不包含图片头的,如(data:image/jpg;base64,) 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,用于问题定位 description: 业务返回体 operationId: 2572_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,(和url、cont_sign三选一,优先级:image > url > cont_sign),注意要去掉图片头部,如(data:image/jpg;base64,)。最短边至少50px,最长边最大4096px,支持jpg/png/bmp格式 url: type: string description: 图片URL,和image、cont_sign三选一,image优先级更高,由于图床的差异性,抓图服务无法适配所有的图床,部分URL可能抓不到图,或者图片下载超时,遇到上述情况时请更换图片URL、或者将图片下载到本地转码后上传 cont_sign: type: string description: 图片签名(和image、url三选一),支持批量删除,批量删除时请勿传image、url,最多支持1000个cont_sign列表,样例:"932301884,1068006219;316336521,553141152;2491030726,1352091083" required: - ds_id /2572-15: x-pointCode: 15 x-mode: mapping x-read-timeout: 35 x-connect-timeout: 35 post: summary: 相同图片-检索 description: |- 完成入库后,可使用该接口实现相同图检索。支持传入指定分类维度(具体变量tags)进行检索,返回结果支持翻页(具体变量pn、rn)。 注意: 1、检索接口不返回原图,仅返回入库时填写的brief信息,请调用入库接口时尽量填写可关联至本地图库的图片id或者图片url等信息。 请求图片需经过base64编码:图片的base64编码指将一副图片数据编码成一串字符串,使用该字符串代替图像地址。您可以首先得到图片的二进制,然后用Base64格式编码即可。注意在请求时需去掉头部。 注意:图片的base64编码是不包含图片头的,如(data:image/jpg;base64,) responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: result_num: type: number description: 检索结果数 result: type: array items: type: object properties: "0": type: object properties: score: type: number description: 图片相关性,取值范围0-1 brief: type: string description: 调用add接口时添加的brief信息,为保证该结果有效性,请入库时填写可关联至本地图片库的有效id信息 cont_sign: type: string description: | 图片签名,可以用来删除图片或定位问题 has_more: type: string description: | 是否还有下一页,返回值:true、false;如果不分页,不用关注该字段 log_id: type: number description: 唯一的log id,无实际含义,用于问题定位 description: 业务返回体 operationId: 2572_15_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。(和url二选一,image优先级更高),注意要去掉图片头部,如(data:image/jpg;base64,),最短边至少50px,最长边最大4096px,支持jpg/png/bmp格式 url: type: string description: 图片URL,和image二选一,image优先级更高,由于图床的差异性,抓图服务无法适配所有的图床,部分URL可能抓不到图,或者图片下载超时,遇到上述情况时请更换图片URL、或者将图片 tags: type: string description: 分类维度信息,tag间以逗号分隔,最多可传入2个tag,tag间无层级关系,示例:"100,11" tag_logic: type: string description: 检索时tag之间的逻辑, 0:逻辑and,1:逻辑or pn: type: string description: 分页功能,起始位置,例:0。未指定分页时,默认返回前300个结果;接口返回数量最大限制1000条,例如:起始位置为900,截取条数500条,接口也只返回第900 - 1000条的结果,共计100条 rn: type: string description: 分页功能,截取条数,例:250 required: - ds_id /2572-14: x-pointCode: 14 x-mode: mapping x-read-timeout: 30 x-connect-timeout: 30 post: summary: 相同图片-入库 description: |- 入库前请先去百度官方申请建库。该接口实现单张图片入库,入库时需要同步提交图片及可关联至本地图库的摘要信息(具体变量为brief,具体可传入图片在本地标记id、图片url、图片名称等);同时可提交分类维度信息(具体变量为tags,最多可传入2个tag),方便对图库中的图片进行管理、分类检索。 注:重复添加完全相同的图片会返回错误。 请求图片需经过base64编码:图片的base64编码指将一副图片数据编码成一串字符串,使用该字符串代替图像地址。您可以首先得到图片的二进制,然后用Base64格式编码即可。注意在请求时需去掉头部。 注意:图片的base64编码是不包含图片头的,如(data:image/jpg;base64,) 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,无实际意义,用于问题定位 cont_sign: type: string description: 入库图片的签名信息,请务必保存至本地,以便后续用作批量删除、查询某张图是否已经入过库等用途 description: 业务返回体 operationId: 2572_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。(和url二选一,image优先级更高),注意要去掉图片头部,如(data:image/jpg;base64,),最短边至少50px,最长边最大4096px,支持jpg/png/bmp格式。重复添加完全相同的图片会返回错误,提示不能重复入库。 url: type: string description: 图片URL,和image二选一,image优先级更高,由于图床的差异性,抓图服务无法适配所有的图床,部分URL可能抓不到图,或者图片下载超时,遇到上述情况时请更换图片URL、或者将图片下载到本地转码后上传 brief: type: string description: | 检索时原样带回,最长256B。样例:{"name":"周杰伦", "id":"666"} 。请注意,检索接口不返回原图,仅返回入库时填写的brief信息,所以调用入库接口时,brief信息请尽量填写可关联至本地图库的图片id或者图片url、图片名称等信息 tags: type: string description: tag间以逗号分隔,最多2个tag,2个tag无层级关系,检索时支持逻辑运算。样例:"100,11" ;检索时可圈定分类维度进行检索 required: - ds_id /2572-13: x-pointCode: 13 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 图像审核 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 data: type: array items: type: object properties: subType: type: number description: |- 审核子类型,此字段需参照type主类型字段决定其含义: 当type=0时subType取值含义 : 0:百度官方违禁图 当type=1时subType取值含义: 0:一般色情、1:卡通色情、2:SM、3:低俗、4:儿童裸露、5:艺术品色情、6:性玩具、7:男性性感、8:自然男性裸露、9:女性性感、10:卡通女性性感、11:特殊类、12:亲密行为、13:卡通亲密行为、14:孕肚裸露、15:臀部特写、16:脚部特写、17:裆部特写 当type=2时subType取值含义: 0:警察部队、1:血腥、2:尸体、3:爆炸火灾、4:杀人、5:暴乱、6:暴恐人物、7:军事武器、8:暴恐旗帜、9:血腥动物或动物尸体、10:车祸、11:枪械、12:弹药、13:刀具、14:武装人员、15、特殊服饰 当type=3时subType取值含义: 0:恶心图、1:性器官特写、2:脏器、3:疾病表症、4:密集恐惧症、5:腐烂食物、6:排泄物、7:恶心动物、8:人体血腥和尸体、9:动物血腥及尸体 当type=4时subType取值含义:0:水印、1:二维码、2:条形码、3:识别二维码中内容、4:识别条形码中内容、5:不过滤字幕、6:小程序码 当type=5时subType取值含义:0:政治敏感、1:公众人物、2:自定义敏感人物 当type=6时subType取值含义: 0:图像清晰度、1:图像美观度 当type=7时subType取值含义: 0:用户自定义图像黑名单 当type=8时subType取值含义: 0:用户自定义图像白名单 当type=10时subType取值含义: 0:图像中必须是真人脸 1:人脸必须为正脸 2:左右旋转角度 3:俯仰角度 4:歪头角度 5:人脸不能有遮挡 6:不能遮挡眼睛 7:不能遮挡鼻子 8:不能遮挡嘴 9:不能遮挡下巴 10:不能遮挡脸颊 11:人脸不能佩戴墨镜 12:人脸占比 13:人脸必须清晰 当type=11时subType取值含义: 0:百度官方默认违禁词库 当type=12时subType取值含义: 0:低质灌水、1:暴恐违禁、2:文本色情、3:政治敏感、4恶意推广、5:低俗辱骂、6:恶意推广-联系方式、7:恶意推广-软文推广、8:广告法审核 当type=13时subType取值含义: 0:自定义文本黑名单 当type=14时subType取值含义: 0:自定义文本白名单 当type=16时subType取值含义: 0:中国国旗及类似图形、1:中国地图及类似图形、2:党旗、军旗、党徽及类似图形、3:警徽及类似图形、4:各类臂章、5:反动组织旗帜、徽章、标志 当type=21时subType取值含义: 1:真人吸烟、2:卡通吸烟、3:毒品、4:真人饮酒、5:卡通饮酒、6:赌博 stars: type: array items: type: object properties: name: type: string description: 敏感人物名称 probability: type: number description: 人脸相似度 description: 敏感人物列表数组,只有敏感人物审核不通过才有 conclusion: type: string description: 审核结果,可取值描述:合规、不合规、疑似、审核失败 type: type: number description: 原生结果的类型1:色情识别、2:暴恐识别、3:恶心图识别、4:广告检测、5:政治敏感识别、6:图像质量检测、7:用户图像黑名单、8:用户图像白名单、9:图文审核 msg: type: string description: 不合规项描述信息 conclusionType: type: number description: 审核结果类型,可取值1、2、3、4,分别代表1:合规,2:不合规,3:疑似,4:审核失败 description: 不合规/疑似/命中白名单项详细信息。响应成功并且conclusion为疑似或不合规或命中白名单时才返回,响应失败或conclusion为合规且未命中白名单时不返回。 conclusion: type: string description: 审核结果,可取值描述:合规、不合规、疑似、审核失败 conclusionType: type: number description: 审核结果类型,可取值1、2、3、4,分别代表1:合规,2:不合规,3:疑似,4:审核失败 log_id: type: number description: 业务返回体 operationId: 2572_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编码字符串, 以图像文件形式请求时必填, 图像要求base64后 大于等于5kb,小于等于4M, 最短边大于等于128像素, 小于等于4096像素, 支持的图片格式:PNG、JPG、JPEG、BMP、GIF(仅对首帧进行审核)、Webp、TIFF imgUrl: type: string description: |- 图像URL地址, 以URL形式请求, 图像Url需要做UrlEncode, 图像要求base64后大于等于5kb, 小于等于4M, 最短边大于等于128像素, 小于等于4096像素 支持的图片格式:PNG、JPG、JPEG、BMP、GIF(仅对首帧进行审核)、Webp、TIFF imgType: type: string description: 图片类型0:静态图片(PNG、JPG、JPEG、BMP、GIF(仅对首帧进行审核)、Webp、TIFF),1:GIF动态图片,暂不支持Webp动态图片 required: - ds_id /2572-11: x-pointCode: 11 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 图像多主体检测 description: 检测图片中的主体,支持单主体检测、多主体检测。可识别出图片中主体的位置和标签,方便裁剪出对应主体的区域,用于后续图像处理、海量图片分类打标等场景。 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,用于问题定位 result: type: object properties: width: type: number description: 表示定位位置的长方形左上顶点的水平坐标 top: type: number description: 表示定位位置的长方形左上顶点的垂直坐标 left: type: number description: 表示定位位置的长方形的宽度 height: type: number description: 表示定位位置的长方形的高度 description: | 裁剪结果 description: 业务返回体 operationId: 2572_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: |- 和url二选一 图像数据,base64编码,要求base64编码后大小不超过4m,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式 。注意:图片需要base64编码、去掉编码头后再进行urlencode。 url: type: string description: |- 和image二选一 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少64px,最长边最大4096px,长宽比3:1以内,支持jpg/png/bmp格式,当image字段存在时url字段失效。 required: - ds_id /2572-10: x-pointCode: 10 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 地标识别 description: 支持识别12万中外著名地标、热门景点;还可使用EasyDL定制训练平台,定制地标分类标签。广泛应用于拍照识图、幼教科普、图片分类等场景。 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: landmark: type: string description: 地标名称,无法识别则返回空字符串 description: 识别结果 description: 业务返回体 operationId: 2572_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: |- 和url二选一 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式。注意:图片需要base64编码、去掉编码头(data:image/jpg;base64,)后,再进行urlencode。 url: type: string description: |- 和image二选一 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式,当image字段存在时url字段失效。 required: - ds_id /2572-9: x-pointCode: 9 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 货币识别 description: 识别图像中的货币类型,返回货币名称、代码、面值、年份信息,可识别百余种国内外常见货币;还可使用EasyDL定制训练平台,定制识别货币种类。 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: currencyName: type: string description: 货币名称,无法识别返回空,示例:新加坡元 hasdetail: type: number description: 判断是否返回详细信息(除货币名称之外的其他字段),含有返回1,不含有返回0 currencyCode: type: string description: 货币代码,hasdetail = 0时,表示无法识别,该字段不返回,示例:SGD year: type: string description: 货币年份,hasdetail = 0时,表示无法识别,该字段不返回,示例:2004年 currencyDenomination: type: string description: 货币面值,hasdetail = 0时,表示无法识别,该字段不返回,示例:50元 description: 识别结果 description: 业务返回体 operationId: 2572_9_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: |- 和url二选一 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式。注意:图片需要base64编码、去掉编码头(data:image/jpg;base64,)后,再进行urlencode。 url: type: string description: |- 和image二选一 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式,当image字段存在时url字段失效。 required: - ds_id /2572-8: x-pointCode: 8 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 红酒识别 description: 识别图像中的红酒标签,返回红酒名称、国家、产区、酒庄、类型、糖分、葡萄品种、酒品描述等信息,可识别数十万中外红酒;支持自定义红酒图库,在自建库中搜索特定红酒信息。 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: classifyByColor: type: string description: 酒类型,hasdetail = 0时,表示无法识别,该字段不返回,示例:红葡萄酒 subRegionCn: type: string description: 子产区中文名,hasdetail = 0时,表示无法识别,该字段不返回,示例:梅多克 wineNameCn: type: string description: 红酒中文名,无法识别返回空,示例:波斯塔瓦经典赤霞珠品丽珠半甜红葡萄酒 subRegionEn: type: string description: 子产区英文名,hasdetail = 0时,表示无法识别,该字段不返回,示例:Medoc regionEn: type: string description: 产区英文名,hasdetail = 0时,表示无法识别,该字段不返回,示例:Bordeaux color: type: string description: 色泽,hasdetail = 0时,表示无法识别,该字段不返回,示例:宝石红色 wineNameEn: type: string description: 红酒英文名,hasdetail = 0时,表示无法识别,该字段不返回,示例:Bostavan Classic Cabernet hasdetail: type: number description: 判断是否返回详细信息(除红酒中文名之外的其他字段),含有返回1,不含有返回0 wineryCn: type: string description: 酒庄中文名,hasdetail = 0时,表示无法识别,该字段不返回,示例:波斯塔瓦酒庄 classifyBySugar: type: string description: 糖分类型,hasdetail = 0时,表示无法识别,该字段不返回,示例:半甜型 tasteTemperature: type: string description: 品尝温度,hasdetail = 0时,表示无法识别,该字段不返回,示例:6-11℃ regionCn: type: string description: 产区中文名,hasdetail = 0时,表示无法识别,该字段不返回,示例:波尔多 wineryEn: type: string description: 酒庄英文名,hasdetail = 0时,表示无法识别,该字段不返回,示例:Vinaria Bostavan grapeCn: type: string description: 葡萄品种,可能有多种葡萄,hasdetail = 0时,表示无法识别,该字段不返回,示例:品丽珠;赤霞珠 grapeEn: type: string description: 葡萄品种英文名,可能有多种葡萄,hasdetail = 0时,表示无法识别,该字段不返回,示例:Cabernet Franc;Cabernet Sauvignon countryCn: type: string description: 国家中文名,hasdetail = 0时,表示无法识别,该字段不返回,示例:摩尔多瓦 countryEn: type: string description: 国家英文名,hasdetail = 0时,表示无法识别,该字段不返回,示例:Moldova description: type: string description: 酒品描述,hasdetail = 0时,表示无法识别,该字段不返回,示例:葡萄酒呈深宝石红色,具有香料、香草和新鲜水果的果香,酒体分明,口感畅顺,果香横溢,单宁软化程度高,让你回味无穷 description: 识别结果 description: 业务返回体 operationId: 2572_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: |- 和url二选一 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式。注意:图片需要base64编码、去掉编码头(data:image/jpg;base64,)后,再进行urlencode。 url: type: string description: |- 和image二选一 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式,当image字段存在时url字段失效。 required: - ds_id /2572-7: x-pointCode: 7 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 菜品识别 description: 识别超过9千种菜品,支持客户创建属于自己的菜品图库,可准确识别图片中的菜品名称、位置,并获取百科信息,适用于多种客户识别菜品的业务场景中。 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,用于问题定位 result_num: type: number description: 返回结果数目,及result数组中的元素个数 result: type: array items: type: object properties: "0": type: object properties: calorie: type: string description: 卡路里,每100g的卡路里含量 has_calorie: type: object properties: {} description: 是否有卡路里true or false(布尔值) name: type: string description: 菜名,示例:鱼香肉丝 probability: type: string description: 识别结果中每一行的置信度值,0-1 baike_info: type: object properties: baike_url: type: string description: 对应识别结果百度百科页面链接 description: type: string description: 对应识别结果百科内容描述 image_url: type: string description: 对应识别结果百科图片链接 description: 对应识别结果的百科词条名称 "1": type: object properties: calorie: type: string has_calorie: type: object properties: {} name: type: string probability: type: string description: 菜品识别结果数组 description: 业务返回体 operationId: 2572_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: |- 和url二选一 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式。注意:图片需要base64编码、去掉编码头(data:image/jpg;base64,)后,再进行urlencode。 url: type: string description: |- 和image二选一 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式,当image字段存在时url字段失效。 top_num: type: number description: 返回结果top n,默认5. filter_threshold: type: number description: 默认0.95,可以通过该参数调节识别效果,降低非菜识别率. baike_num: type: number description: 用于控制返回结果是否带有百科信息,若不输入此参数,则默认不返回百科结果;若输入此参数,会根据输入的整数返回相应个数的百科信息 required: - ds_id /2572-6: x-pointCode: 6 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 果蔬识别 description: 识别近千种水果和蔬菜的名称,适用于识别只含有一种果蔬的图片,可自定义返回识别结果数,适用于果蔬介绍相关的美食类APP中。 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,用于问题定位 result_num: type: number description: 识别结果数 result: type: array items: type: object properties: "0": type: object properties: name: type: string description: | 图像中的食材名称 score: type: number description: 得分,0-1 "1": type: object properties: name: type: string score: type: number description: 识别结果 description: 业务返回体 operationId: 2572_6_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: |- 和url二选一 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式。注意:图片需要base64编码、去掉编码头(data:image/jpg;base64,)后,再进行urlencode。 top_num: type: string description: 返回预测得分top结果数,如果为空或小于等于0默认为5;如果大于20默认20 url: type: string description: |- 和image二选一 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式,当image字段存在时url字段失效。 required: - ds_id /2572-5: x-pointCode: 5 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: logo识别 description: 识别超过2万类商品logo,支持用户创建属于自己的品牌logo图库,可准确识别图片中品牌logo的名称,适用于需要快速获取品牌信息的业务场景中。 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,用于问题定位 result_num: type: number description: 识别结果数,标识返回结果数目 result: type: array items: type: object properties: "0": type: object properties: type: type: number description: type=0为1千种高优商标识别结果;type=1为2万类logo库的结果;其它type为自定义logo库结果 name: type: string description: 识别的品牌名称 probability: type: number description: 分类结果置信度(0--1.0) location: type: object properties: width: type: number description: 像素宽 top: type: number description: 上起像素位置 height: type: number description: 像素高 left: type: number description: 坐起像素位置 description: 位置信息(左起像素位置、上起像素位置、像素宽、像素高) description: 返回结果数组,每一项为一个识别出的logo description: 业务返回体 operationId: 2572_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: |- 和url二选一 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式.注意:图片需要base64编码、去掉编码头后再进行urlencode。 custom_lib: type: string description: 是否只检索用户子库,true则只检索用户子库,false(默认)为检索底库+用户子库 url: type: string description: |- 和image二选一 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式,当image字段存在时url字段失效。 required: - ds_id /2572-4: x-pointCode: 4 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 植物识别 description: 可识别超过2万种常见植物和近8千种花卉,接口返回植物的名称,并支持获取识别结果对应的百科信息;还可使用EasyDL定制训练平台,定制识别植物种类。适用于拍照识图、幼教科普、图像内容分析等场景。 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,用于问题定位 result: type: array items: type: object properties: "0": type: object properties: score: type: number description: 置信度,示例:0.5321 name: type: string description: 植物名称,示例:吉娃莲 baike_info: type: object properties: baike_url: type: string description: 对应识别结果百度百科页面链接 description: type: string description: 对应识别结果百科内容描述 image_url: type: string description: 对应识别结果百科图片链接 description: | 对应识别结果的百科词条名称 "1": type: object properties: score: type: number name: type: string "2": type: object properties: score: type: number name: type: string "3": type: object properties: score: type: number name: type: string "4": type: object properties: score: type: number name: type: string description: 植物识别结果数组 description: 业务返回体 operationId: 2572_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: |- 和url二选一 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式。注意:图片需要base64编码、去掉编码头后再进行urlencode。 baike_num: type: number description: 用于控制返回结果是否带有百科信息,若不输入此参数,则默认不返回百科结果;若输入此参数,会根据输入的整数返回相应个数的百科信息 url: type: string description: |- 和image二选一 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式,当image字段存在时url字段失效。 required: - ds_id /2572-3: x-pointCode: 3 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 动物识别 description: 识别近八千种动物,接口返回动物名称,并可获取识别结果对应的百科信息;还可使用EasyDL定制训练平台,定制识别分类标签。适用于拍照识图、幼教科普、图像内容分析等场景。 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,用于问题定位 result: type: array items: type: object properties: "0": type: object properties: score: type: string description: 置信度,示例:0.5321 name: type: string description: 动物名称,示例:蒙古马 baike_info: type: object properties: baike_url: type: string description: 对应识别结果百度百科页面链接 description: type: string description: 对应识别结果百科内容描述 description: 对应识别结果的百科词条名称 "1": type: object properties: score: type: string name: type: string "2": type: object properties: score: type: string name: type: string "3": type: object properties: score: type: string name: type: string "4": type: object properties: score: type: string name: type: string "5": type: object properties: score: type: string name: type: string description: 识别结果数组 description: 业务返回体 operationId: 2572_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: |- 和url二选一 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式。注意:图片需要base64编码、去掉编码头后再进行urlencode。 url: type: string description: |- 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,和image二选一 最长边最大4096px,支持jpg/png/bmp格式,当image字段存在时url字段失效。 top_num: type: number description: 返回预测得分top结果数,默认为6 baike_num: type: number description: 返回百科信息的结果数,默认不返回 required: - ds_id /2572-2: x-pointCode: 2 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 图像单主体检测 description: 用户向服务请求检测图像中的主体位置。 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: result: type: object properties: height: type: number description: 表示定位位置的长方形的高度 width: type: number description: 表示定位位置的长方形的宽度 left: type: number description: 表示定位位置的长方形左上顶点的水平坐标 top: type: number description: 表示定位位置的长方形左上顶点的垂直坐标 description: 裁剪结果 ret_code: type: number log_id: type: number description: 业务返回体 operationId: 2572_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编码字符串,以图片文件形式请求时必填。(支持图片格式:jpg,bmp,png,jpeg),图片大小不超过4m。最短边至少15px,最长边最大4096px。注意:图片需要base64编码、去掉编码头后再进行urlencode。 with_face: type: number description: 如果检测主体是人,主体区域是否带上人脸部分,0-不带人脸区域,其他-带人脸区域,裁剪类需求推荐带人脸,检索/识别类需求推荐不带人脸。默认取1,带人脸。 required: - ds_id - image /2572-1: x-pointCode: 1 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 通用物体和场景识别高级版 description: 可识别超过10万类常见物体和场景,接口返回大类及细分类的名称,并支持获取识别结果对应的百科信息;还可使用EasyDL定制训练平台,定制识别分类标签。广泛适用于图像或视频内容分析、拍照识图等业务场景。 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,用于问题定位 result_num: type: number description: 返回结果数目,及result数组中的元素个数 result: type: array items: type: object properties: "0": type: object properties: score: type: number description: 置信度,0-1 root: type: string description: 识别结果的上层标签,有部分钱币、动漫、烟酒等tag无上层标签 baike_info: type: object properties: baike_url: type: string description: 对应识别结果百度百科页面链接 image_url: type: string description: 对应识别结果百科图片链接 description: type: string description: 对应识别结果百科内容描述 description: 对应识别结果的百科词条名称 keyword: type: string "1": type: object properties: score: type: number root: type: string keyword: type: string "2": type: object properties: score: type: number root: type: string keyword: type: string "3": type: object properties: score: type: number root: type: string keyword: type: string "4": type: object properties: score: type: number root: type: string keyword: type: string description: 标签结果数组 description: 业务返回体 operationId: 2572_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: |- 和url二选一 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式。注意:图片需要base64编码、去掉编码头(data:image/jpg;base64,)后,再进行urlencode。 url: type: string description: |- 和image二选一 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式,当image字段存在时url字段失效。 baike_num: 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/2572?tab=book x-apiCode: "2572" x-is-own: false x-is-op: false