# Generated by ShowAPI OpenAPI generator # source: market/2669 # generated-at: 2026-09-05T15:36:25.684Z 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: /2669-18: x-pointCode: 18 x-mode: mapping x-read-timeout: 5 x-connect-timeout: 5 post: summary: 查询历史任务 description: 便捷查询您曾提交过的历史任务记录,助您回顾过往操作。 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: allPages: type: number description: 总页码数 ret_code: type: number description: 返回值为0 contentlist: type: array items: type: object properties: result: type: string description: 任务结果图,只保留一天 call_back_url: type: string description: 您的回调地址 text: type: string description: 图中您要保留的部分 origin_url: type: string description: 原图片地址 task_order: type: string description: 任务号 status: type: string description: 任务状态,有start success fail三种 finish_time: type: string description: 任务完成时间 origin_order: type: string description: 任务原始订单号,任务失败时您可以将这个订单号提供给我们的客服人员以便排查失败原因 ct: type: string description: 任务创建时间 threshold: type: string description: 任务保留图片的阈值 description: 任务list,如果没有找到任务,该集合为空 currentPage: type: number description: 当前页码 allNum: type: number description: 总条数 maxResult: type: number description: 每页最大条数 description: 业务返回体 operationId: 2669_18_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: page: type: number description: 页码数 pageSize: type: number description: 每页最大返回任务数 /2669-17: x-pointCode: 17 x-mode: mapping x-read-timeout: 5 x-connect-timeout: 5 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: string description: 任务结果图片URL,该图我们只保留1天,请您及时下载保存该图片 call_back_url: type: string description: 您提交的回调地址 ret_code: type: number description: 是否找到任务,0表示找到,-1表示没有找到 text: type: string description: 图中要保留的内容 origin_url: type: string description: 原始图片地址,URL提交的任务才有该字段值 task_order: type: string description: 查询的任务号 status: type: string description: 任务状态,有start success fail三种状态 finish_time: type: string description: 任务结束时间 origin_order: type: string description: 任务原始订单号,任务失败时您可以将这个订单号提供给我们的客服人员以便排查失败原因 ct: type: string description: 任务创建时间 threshold: type: string description: 保留内容的阈值 description: 业务返回体 operationId: 2669_17_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: task_order: type: string description: 您要查询的任务号 required: - task_order /2669-16: x-pointCode: 16 x-mode: mapping x-read-timeout: 10 x-connect-timeout: 5 post: summary: 提交任务 description: 该接入点用于提交分割抠图任务,AI自动识别图中需保留的部分,多数任务通常可在1分钟内完成。 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: result: type: string description: 结果URL call_back_url: type: string description: 你提交的回调地址 ret_code: type: number description: 0表示任务提交成功要扣费,10表示参数错误,60表示您提交的base64解析失败,40表示您提交的图片URL无法下载,50表示您提交的图片过大,90表示未知错误 text: type: string description: 要保留的部分 remark: type: string description: 提交出错的信息 origin_url: type: string description: 您通过URL提交的图片地址 status: type: string description: 提交成功的任务状态,有start success fail 三种状态 task_order: type: string description: 任务号,提交成功才有 finish_time: type: string description: 任务完成时间 ct: type: string description: 任务创建时间 threshold: type: string description: 图片保留的阈值 description: 业务返回体 operationId: 2669_16_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: img_url: type: string description: 要分割抠图的图片URL,支持png,jpg,webp格式图片,图片大小不要超过2M,URL和base64二选一入参 img_base64: type: string description: 要分割抠图的图片base64字符串,支持png,jpg,webp格式图片,图片大小不要超过2M,URL和base64二选一入参 call_back_url: type: string description: 抠图分割任务执行结果的URL回调地址。回调方式为POST,格式application/json,其中包含字段result:抠图结果图片地址,有效期为1天,请您及时下载图片;status:任务状态有success和fail两个字符串枚举值;task_order:任务订单号 text: type: string description: 图片中要抠图保留的部分,使用英文填写,不填默认保留图中主体部分,比如要抠图保留图中的天空,该值就填sky threshold: type: string description: 抠图阈值,值为0-1之间的浮点数,数字越小被保留的图片内容越多,建议设置为0.18-0.4之间,默认值为0.2 /2669-15: x-pointCode: 15 x-mode: mapping x-read-timeout: 15 x-connect-timeout: 10 post: summary: 人体 description: 提交要抠图的图片(BASE64、URL或文件),可获取处理后的人像图片URL。支持jpeg、jpg、png格式,建议图片大小不超过1.5M。 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: ret_code: type: number description: 0表示调用成功 url: type: string description: 抠图成功后只有人物图片的图片URL(该路径将在一天后删除) remark: type: string description: 错误信息 description: 业务返回体 operationId: 2669_15_POST parameters: [] requestBody: content: multipart/form-data: schema: type: object properties: img_base64: type: string minLength: 0 maxLength: 10000000 description: 要抠图图片的BASE64字符串,字符串开头不要添加base64,等字符信息。部分客户端不会对参数进行URLencode时(例如PHP),您需要对该参数值进行URLencode,三个参数三选一入参 img_url: type: string description: 要抠图图片URL ,三个参数三选一入参 img_file: type: string format: binary description: 要抠图图片文件,三个参数三选一入参,采用这种方式入参时,调用时请求参数不可再有imgBase64和imgUrl两个参数。 /2669-14: x-pointCode: 14 x-mode: mapping x-read-timeout: 30 x-connect-timeout: 30 post: summary: 商品 description: 商品图片格式建议为JPEG、JPG或PNG(避免使用8位、16位、64位PNG)。图片大小建议在3 MB以内,分辨率建议小于1280×1280像素。URL地址中建议不包含中文字符。 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: ret_code: type: number description: |- ret_code = 0 无异常 10 参数错误 20 文件格式错误 30 操作失败,请勿重复提交 40 文件下载失败 50 文件内容过大 60 图片解析失败 70 识别失败 80 服务超时 90 未知错误(error_code) seg_img_url: type: string description: 处理后的图片 description: 业务返回体 operationId: 2669_14_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: img_base64: type: string minLength: 0 maxLength: 10000000 description: 需分隔图片的base64字符串编码,img_url和img_base64两个输入参数必须二选一 img_url: type: string description: 需分隔图片的URL地址,img_url和img_base64两个输入参数必须二选一 /2669-12: x-pointCode: 12 x-mode: mapping x-read-timeout: 30 x-connect-timeout: 30 post: summary: 服饰 description: 图片格式为PNG、JPEG或JPG,大小不超过3M,分辨率在50×50至3000×3000像素之间,适用于服饰类图片。 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: ret_code: type: number description: |2- 0 无异常 10 参数错误 20 文件格式错误 30 操作失败,请勿重复提交 40 文件下载失败 50 文件内容过大 60 图片解析失败 70 识别失败 80 服务超时 90 未知错误(error_code) results: type: array items: type: object properties: seg_img_url: type: string description: 分隔处理后的图片URL地址 description: 业务返回体 operationId: 2669_12_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: img_base64: type: string minLength: 0 maxLength: 10000000 description: 需分隔图片的base64字符串编码,img_url和img_base64两个输入参数必须二选一 img_url: type: string description: 需分隔图片的URL地址,img_url和img_base64两个输入参数必须二选一 /2669-11: x-pointCode: 11 x-mode: mapping x-read-timeout: 30 x-connect-timeout: 30 post: summary: 食品 description: 图像格式支持PNG、JPEG、JPG;大小建议在4MB以内;分辨率范围在40×40至1999×1999像素之间;URL地址中请避免出现中文字符。 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: ret_code: type: number description: |- ret_code = 0 无异常 10 参数错误 20 文件格式错误 30 操作失败,请勿重复提交 40 文件下载失败 50 文件内容过大 60 图片解析失败 70 识别失败 80 服务超时 90 未知错误(error_code) seg_img_url: type: string description: 处理后的图片 description: 业务返回体 operationId: 2669_11_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: img_base64: type: string minLength: 0 maxLength: 10000000 description: 需分隔图片的base64字符串编码,img_url和img_base64两个输入参数必须二选一 img_url: type: string description: 需分隔图片的URL地址,img_url和img_base64两个输入参数必须二选一 /2669-7: x-pointCode: 7 x-mode: mapping x-read-timeout: 30 x-connect-timeout: 30 post: summary: 天空 description: 图片格式支持JPG、JPEG、PNG。图片大小应不超过9.5MB。图片分辨率需大于50×50像素且小于3000×3000像素。图片URL地址中不应包含中文字符。 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: ret_code: type: number description: |- ret_code = 0 无异常 10 参数错误 20 文件格式错误 30 操作失败,请勿重复提交 40 文件下载失败 50 文件内容过大 60 图片解析失败 70 识别失败 80 服务超时 90 未知错误(error_code) seg_img_url: type: string description: 处理后的图片 description: 业务返回体 operationId: 2669_7_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: img_base64: type: string minLength: 0 maxLength: 10000000 description: 需分隔图片的base64字符串编码,img_url和img_base64输入参数二选一 img_url: type: string description: 需分隔图片的url地址,img_url和img_base64输入参数二选一 /2669-6: x-pointCode: 6 x-mode: mapping x-read-timeout: 30 x-connect-timeout: 30 post: summary: 通用 description: 支持的图像格式包括JPEG、JPG、PNG(不兼容8位、16位、64位PNG)及WEBP。图像大小建议控制在3MB以内,分辨率需在32×32像素至1280×1280像素之间。URL地址中应避免包含中文字符。 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: ret_code: type: number description: |- ret_code = 0 无异常 10 参数错误 20 文件格式错误 30 操作失败,请勿重复提交 40 文件下载失败 50 文件内容过大 60 图片解析失败 70 识别失败 80 服务超时 90 未知错误(error_code) seg_img_url: type: string description: 处理后的图片 description: 业务返回体 operationId: 2669_6_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: img_base64: type: string minLength: 0 maxLength: 10000000 description: 需分隔图片的base64字符串编码,img_url和img_base64两个输入参数必须二选一 img_url: type: string description: 需分隔图片的URL地址,img_url和img_base64两个输入参数必须二选一 /2669-5: x-pointCode: 5 x-mode: mapping x-read-timeout: 30 x-connect-timeout: 30 post: summary: 五官 description: 图片格式推荐为JPG、JPEG或PNG。分辨率建议在100×100至2048×2048之间,宽高比0.5~2.0。图片大小不超过4M。图片中仅包含单个人脸,建议正面、无眼镜、帽子等遮挡。人脸面积至少100×100,检测框至少为对应边长的1/10。URL地址避免包含中文字符。 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: ret_code: type: number description: |2- 0 无异常 10 参数错误 20 文件格式错误 30 操作失败,请勿重复提交 40 文件下载失败 50 文件内容过大 60 图片解析失败 70 识别失败 80 服务超时 90 未知错误(error_code) results: type: array items: type: object properties: name: type: string description: |- skin:脸部皮肤的分割结果。 l_brow:左眉毛的分割结果。 r_brow:右眉毛的分割结果。 l_eye:左眼睛的分割结果。 r_eye:右眼睛的分割结果。 nose:鼻子的分割结果。 l_ear:左耳的分割结果。 r_ear:右耳的分割结果。 mouth:上下嘴唇中间部分的分割结果。若人物为闭嘴状态,则不会输出。 u_lip:上嘴唇的分割结果。 l_lip:下嘴唇的分割结果。 seg_img_url: type: string description: 分隔处理后的图片URL地址 description: 结果 description: 业务返回体 operationId: 2669_5_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: img_base64: type: string minLength: 0 maxLength: 10000000 description: 需分隔图片的base64字符串编码,img_url和img_base64二选一输入 img_url: type: string description: 需分隔图片的URL地址,img_url和img_base64二选一输入 /2669-2: x-pointCode: 2 x-mode: mapping x-read-timeout: 30 x-connect-timeout: 30 post: summary: 头像 description: 建议图片格式为JPEG、JPG或PNG,图像大小不超过3M,分辨率在32×32至2000×2000像素之间,URL地址中不应包含中文字符。 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: seg_img_url: type: string description: 分隔处理后的图片URL地址 range: type: array items: type: object properties: x: type: number description: 该点距离图片左侧的像素 y: type: number description: 该点距离图片顶部的像素 description: 头部的位置,使用四个像素点表示 ret_code: type: number description: |- ret_code = 0 无异常 10 参数错误 20 文件格式错误 30 操作失败,请勿重复提交 40 文件下载失败 50 文件内容过大 60 图片解析失败 70 识别失败 80 服务超时 90 未知错误(error_code) description: 业务返回体 operationId: 2669_2_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: img_base64: type: string minLength: 0 maxLength: 10000000 description: 需分隔图片的base64字符串编码,img_url和img_base64二选一输入 img_url: type: string description: 需分隔图片的URL地址,img_url和img_base64二选一输入 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/2669?tab=book x-apiCode: "2669" x-is-own: false x-is-op: false