# Generated by ShowAPI OpenAPI generator # source: market/2673 # generated-at: 2026-07-26T06:52:31.189Z openapi: 3.0.3 info: title: 人像特效处理 description: 是一个全面的美容和编辑平台,旨在为开发者提供精准高效的人脸识别和图像处理技术。通过我们强大的API和SDK,用户可以轻松实现对面部特征、人像整体外观以及年龄和性别属性的细致调整。这不仅限于日常的图片美化,我们的技术还能够支持更专业的应用场景,如在线证件照制作、社交平台头像定制等。 termsOfService: https://www.showapi.com/helpcenter/view#/4019/2 version: 1.0.0 servers: - url: https://route.showapi.com paths: /2673-20: x-pointCode: 20 x-mode: mapping x-read-timeout: 10 x-connect-timeout: 5 post: summary: 证件照换装 description: 证件照换装API,原【证件照换装_下载】接入点,现已取消预览功能,可用原【证件照换装_预览】接入点的请求参数调用该接入点 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 order错误 * 30 操作失败,请勿重复提交 * 40 文件下载失败 * 50 文件内容过大 * 60 图片解析失败 * 70 识别失败 * 80 服务超时 * 90 未知错误(error_code) url: type: string description: 换装证据照无水印图片URL remark: type: string description: 错误信息 description: 业务返回体 operationId: 2673_20_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: img_base64: type: string description: 原始证件照文件的Base64编码字符串(不需要base64标签头),建议大小不超过1.5M,像素不低于背景要求像素,照片中的人物需暴露出双耳,和img_url参数二选一入参,支持jpg、png格式。 img_url: type: string description: 原始证件照文件的URL,建议大小不超过1.5M,像素不低于背景要求像素,照片中的人物需暴露出双耳,和img_base64参数二选一入参,支持jpg、png格式。 color: type: string description: 背景颜色(不传将启用模板默认背景色,参考【背景模板查询】),支持white,turquoise,blue,red,darkblue五种颜色,分别对应RG:FFFFFF、56BCEE、588DD5、E93223、2D3A59 clothes_num: type: string description: 要换装的衣服编码,共有三大系列,几十套衣服。详情参考帮助手册 code: type: string description: 背景模板编码,参考【背景模板查询】 required: - clothes_num - code /2673-17: x-pointCode: 17 x-mode: mapping x-read-timeout: 10 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: ret_code: type: number list: type: array items: type: object properties: min_kb: type: string description: 文件最小限制 search_text: type: string description: 搜索关键词 pix_w: type: string description: 像素宽 name: type: string description: 背景名称 print_h: type: string description: 照片高(mm) print_w: type: string description: 照片宽(mm) pix_h: type: string description: 像素高 max_kb: type: string description: 文件最大限制 dpi: type: string description: 分辨率要求 code: type: string description: 背景图编码 size: type: string description: 尺寸名称 description: 业务返回体 operationId: 2673_17_POST parameters: - name: text in: query description: 证件照名称关键字,可以通过照地区查询,例如云南。可以通过名称关键字查询,例如一寸,还可以通过像素要求查询,例如400*600,和size参数二选一查询 required: false schema: type: string - name: size in: query description: |- 证件照的尺寸大小收缩,支持的查询值如下,和text参数二选一查询 "一寸", "二寸", "小二寸", "大一寸", "小一寸", "大二寸", "三寸", "五寸", "四寸" required: false schema: type: string /2673-16: x-pointCode: 16 x-mode: mapping x-read-timeout: 10 x-connect-timeout: 5 post: summary: 证件照合成 description: 使用扣过图并符合大小的人像照片(png格式),通过背景模板code合成证件照 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: {} description: 业务返回体 operationId: 2673_16_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: code: type: number description: 背景模板编号 color: type: string description: 背景模板颜色,可以不上传该参数,不上传则使用,该背景默认颜色,可选颜色有,'white','turquoise','blue','red','darkblue' img_base64: type: string description: 图片base64,建议不带图片文件头,使用背景透明的png格式图片,img_url和img_base64两种图片二选一进行入参 img_url: type: string description: 图片url,使用背景透明的png格式图片,img_url和img_base64两种图片二选一进行入参 img_opacity: type: number description: 图片透明度,取值范围在1-99之间,数值越高,图片色彩越鲜明 background_opacity: type: number description: 背景透明度,取值范围在1-99之间,数值越高,图片色彩越鲜明 required: - code /2673-15: x-pointCode: 15 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: ret_code: type: number results: type: array items: type: object properties: template_id: type: string description: 图片对应的模板编号(模板ID) template_img_url: type: string description: 图片模板的URL地址 description: 业务返回体 operationId: 2673_15_POST parameters: - name: group_id in: query description: 模板分类ID,请参考人脸融合下的"分类查询"接口 required: true schema: type: string - name: page in: query description: 页码 required: false schema: type: string /2673-14: x-pointCode: 14 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: ret_code: type: number description: 错误码 results: type: array items: type: object properties: group_name: type: string group_id: type: string description: 业务返回体 operationId: 2673_14_POST parameters: - name: group_name in: query description: 模板分类名称, 支持模糊查询 required: false schema: type: string /2673-13: x-pointCode: 13 x-mode: mapping x-read-timeout: 5 x-connect-timeout: 5 post: summary: 人像动漫 description: 人像动漫api接口,图片格式 JPG、JPEG、PNG,图片像素尺寸大于32×32像素,小2000×2000像素,图片文件大小,不超过3M。 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 成功 10 文件下载失败 20 图片解析失败 40 参数错误 50 文件内容过大 60 文件格式错误 70 操作失败,请勿重复提交 80 服务超时 90 未知错误() result_img_url: type: string description: 处理后的图片URL地址 description: 业务返回体 operationId: 2673_13_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: img_url: type: string description: 需要处理的原图URL地址,img_url和img_base64参数必须二选一 img_base64: type: string description: 需要处理的原图base64字符串,img_url和img_base64参数必须二选一 style: type: number description: |- 风格类型: 1 日漫风 2 艺术风格 3 手绘风格 4 铅笔素描 5 3D风格 /2673-12: x-pointCode: 12 x-mode: mapping x-read-timeout: 20 x-connect-timeout: 5 post: summary: 性别变化 description: 性别变化API接口能够智能地将图片中人脸的性别进行转换,提供男变女、女变男选项,为用户带来创新的视觉体验和娱乐效果。 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 成功 10 文件下载失败 20 图片解析失败 40 参数错误 50 文件内容过大 60 文件格式错误 70 操作失败,请勿重复提交 80 服务超时 90 未知错误() result_img_url: type: string description: 处理后的图片URL地址 remark: type: string description: 错误消息 description: 业务返回体 operationId: 2673_12_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: img_url: type: string description: 需要处理的原图URL地址,img_url和img_base64参数必须二选一 img_base64: type: string description: 需要处理的原图base64字符串,img_url和img_base64参数必须二选一 sex: type: string description: 性别变换类型,男性为0,女性为1 required: - sex /2673-11: x-pointCode: 11 x-mode: mapping x-read-timeout: 25 x-connect-timeout: 5 post: summary: 年龄变化 description: 年龄变化api接入点可对图片中人脸的年龄进行改变,年龄可选范围为1~85之间。 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 成功 10 文件下载失败 20 图片解析失败 40 参数错误 50 文件内容过大 60 文件格式错误 70 操作失败,请勿重复提交 80 服务超时 90 未知错误() result_img_url: type: string description: 处理后的图片URL地址 remark: type: string description: 错误信息 description: 业务返回体 operationId: 2673_11_POST parameters: - name: showapi_use_mock_result in: header required: false schema: type: string requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: img_url: type: string description: 需要处理的原图URL地址,img_url和img_base64参数必须二选一 img_base64: type: string description: 需要处理的原图base64字符串,img_url和img_base64参数必须二选一 age: type: string description: |- 年龄值,需要变化成哪个年龄段的, 请设定为1~85之间 required: - age /2673-2: x-pointCode: 2 x-mode: mapping x-read-timeout: 60 x-connect-timeout: 60 post: summary: 图像人脸融合 description: 上传图片与现有人脸库中的人脸进行融合,返回新的融合后的图片 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 result_img_url: type: string description: 人脸融合后,合成的图片URL地址 description: 业务返回体 operationId: 2673_2_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: img_url: type: string description: 需要处理的图片URL地址,img_url和img_base64参数必须二选一 img_base64: type: string minLength: 0 maxLength: 10000000 description: 需要处理的图片base64字符串,img_url和img_base64参数必须二选一 template_id: type: string description: 模板图片的ID,请通过"分类查询"和"模板查询"获取模板ID required: - template_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/2673?tab=book x-apiCode: "2673" x-is-own: false x-is-op: false