{
    "openapi": "3.0.0",
    "info": {
        "title": "人像智能抠图 - API文档",
        "version": "1.0.0",
        "description": "自动去掉人像照片中的背景，保留人像主体部分并返回人像在图像中的位置信息。img参数为base64编码（建议urlencode），最大不超过3M。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/rxkt\/index": {
            "post": {
                "summary": "人像智能抠图",
                "tags": [
                    "人像智能抠图"
                ],
                "description": "传递人像资源自动分析主题去除背景",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "img": {
                                        "type": "string",
                                        "example": "base64",
                                        "description": "图片base64编码"
                                    },
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    }
                                },
                                "required": [
                                    "img",
                                    "key"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "num": {
                                            "type": "int",
                                            "example": 1,
                                            "description": "人像数量"
                                        },
                                        "+top": {
                                            "type": "float",
                                            "example": "14.250483",
                                            "description": "人像顶部距离"
                                        },
                                        "info": {
                                            "type": "object",
                                            "description": "人像在图像中位置"
                                        },
                                        "+left": {
                                            "type": "float",
                                            "example": "133.52532",
                                            "description": "人像左边距离"
                                        },
                                        "+score": {
                                            "type": "float",
                                            "example": "0.99223561",
                                            "description": "可信度"
                                        },
                                        "+width": {
                                            "type": "float",
                                            "example": "133.52532",
                                            "description": "人像区域宽度"
                                        },
                                        "+height": {
                                            "type": "float",
                                            "example": "292.575039",
                                            "description": "人像区域高度"
                                        },
                                        "imgdata": {
                                            "type": "string",
                                            "example": "BASE64",
                                            "description": "抠图后的PNG图片"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "num": 1,
                                        "info": [
                                            {
                                                "top": 14.250483,
                                                "left": 133.52532,
                                                "score": 0.99223561,
                                                "width": 213.73801,
                                                "height": 292.575039
                                            }
                                        ],
                                        "imgdata": "BASE64"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}