{
  "openapi": "3.0.3",
  "info": {
    "title": "人像抠图",
    "description": "一款自动识别并分离图片中人物与背景的在线服务。它能够迅速生成仅包含人物的高清图片，适用于社交媒体分享、广告制作和艺术创作等场景。API具备精准识别、快速处理、高清输出和易集成等特点，用户可通过简单的调用接口获取人物图片，无需专业图像处理技能。",
    "termsOfService": "https://www.showapi.com/helpcenter/view#/4019/2",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://route.showapi.com"
    }
  ],
  "paths": {
    "/2429-2": {
      "x-pointCode": 2,
      "x-mode": "mapping",
      "x-read-timeout": 15,
      "x-connect-timeout": 10,
      "post": {
        "summary": "人像抠图",
        "description": "提交要抠图的图片的BASE64、URL地址或图片文件，我们返回切割后的人像图片URL，支持jpeg,jpg,png格式图片，建议图片大小不要超过1.5M，图片分辨率控制在4000*4000以内",
        "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": "2429_2_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "imgBase64": {
                    "type": "string",
                    "minLength": 0,
                    "maxLength": 10000000,
                    "description": "要抠图图片的BASE64字符串，字符串开头不要添加base64,等字符信息。部分客户端不会对参数进行URLencode时（例如PHP），您需要对该参数值进行URLencode，三个参数三选一入参"
                  },
                  "imgUrl": {
                    "type": "string",
                    "description": "要抠图图片URL ，三个参数三选一入参"
                  },
                  "imgFile": {
                    "type": "string",
                    "format": "binary",
                    "description": "要抠图图片文件，三个参数三选一入参，采用这种方式入参时，调用时请求参数不可再有imgBase64和imgUrl两个参数。"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "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/2429?tab=book"
  },
  "x-apiCode": "2429",
  "x-is-own": false,
  "x-is-op": false
}