{
    "openapi": "3.0.0",
    "info": {
        "title": "宠物图像识别 - API文档",
        "version": "1.0.0",
        "description": "通过拍照或扫描识别图像中的宠物类型和相关数据，支持猫科、犬类、爬行动物、小宠物、水族类宠物的识别，返回接口包含性格特点、寿命、价格、图片等等。请注意：base64编码（建议URLEncoder下）后的图片大小不超过6M。在保证图片清晰度的情况下，图片越小识别速度越快，结果也越稳定。base64编码测试工具：<a href=\"\/demo\/base64\" target=\"_blank\">图片\/base64互转<\/a>"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/scanpet\/index": {
            "post": {
                "summary": "宠物图像识别",
                "tags": [
                    "宠物图像识别"
                ],
                "description": "根据图像识别宠物并返回宠物详细习性和喂养信息",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "img": {
                                        "type": "string",
                                        "example": "base64",
                                        "description": "图片base64编码（与imgurl参数二选一）"
                                    },
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "imgurl": {
                                        "type": "string",
                                        "example": "https:\/\/www.tianapi.com\/static\/img\/ocr\/cat.jpg",
                                        "description": "图片URL地址（支持jpg\/png\/bmp格式）"
                                    }
                                },
                                "required": [
                                    "img",
                                    "key"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "url": {
                                            "type": "string",
                                            "description": "详细来源"
                                        },
                                        "desc": {
                                            "type": "string",
                                            "example": "西伯利亚",
                                            "description": "描述"
                                        },
                                        "life": {
                                            "type": "string",
                                            "example": "9-15年",
                                            "description": "寿命"
                                        },
                                        "name": {
                                            "type": "string",
                                            "example": "哈士奇",
                                            "description": "宠物名字"
                                        },
                                        "price": {
                                            "type": "string",
                                            "example": "2000-4000元",
                                            "description": "价格"
                                        },
                                        "trust": {
                                            "type": "int",
                                            "example": 41,
                                            "description": "可信度，越接近100表示越可信"
                                        },
                                        "nation": {
                                            "type": "string",
                                            "example": "俄罗斯",
                                            "description": "祖籍"
                                        },
                                        "engName": {
                                            "type": "string",
                                            "example": "SiberianHuskiy",
                                            "description": "宠物英文名"
                                        },
                                        "feature": {
                                            "type": "string",
                                            "example": "西伯利亚雪橇犬是一种原始的古老犬种......",
                                            "description": "体态特征"
                                        },
                                        "pettype": {
                                            "type": "int",
                                            "example": 1,
                                            "description": "宠物类型，0猫科、1犬类、2爬行类、3小宠物类、4水族类"
                                        },
                                        "coverURL": {
                                            "type": "string",
                                            "description": "图片"
                                        },
                                        "characters": {
                                            "type": "string",
                                            "example": "聪明机灵、极度热情、神经质",
                                            "description": "性格特点"
                                        },
                                        "feedPoints": {
                                            "type": "string",
                                            "example": "哈士奇有着敏感的肠胃......",
                                            "description": "喂养注意"
                                        },
                                        "careKnowledge": {
                                            "type": "string",
                                            "example": "哈士奇虽然看着一副冷漠无情的样子......",
                                            "description": "照顾须知"
                                        },
                                        "easyOfDisease": {
                                            "type": "string",
                                            "example": "肠胃疾病",
                                            "description": "易患病"
                                        },
                                        "characterFeature": {
                                            "type": "string",
                                            "example": "哈士奇的外表英俊潇洒......",
                                            "description": "特点"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "url": "http:\/\/www.boqii.com\/entry\/detail\/609.html",
                                                "desc": "　　阿拉斯加雪橇犬（AlaskanMalamute），又称阿拉斯加马拉穆，是最古老的雪橇犬之一，原产于美国，AKC分类属工作犬组。因它的四肢发达，体格健壮，培育它的目的是为了耐力而不是速度，因而它们的主要用途是拉雪橇。作为宠物，阿拉斯加雪橇犬一旦成熟后有着非常安静、高雅的气质，而且它们忠于主人。",
                                                "life": "12年~15年",
                                                "name": "阿拉斯加雪橇犬",
                                                "price": "3000起",
                                                "trust": 41,
                                                "nation": "美国",
                                                "engName": "AlaskanMalamute",
                                                "feature": "　　阿拉斯加体型较大，毛发蓬松，外型俊朗优美，有狼一样冷峻的外表，但是内心却非常友善，常被人们跟哈士奇混幺，他的体型比哈士奇大点，毛发也比哈士奇长。",
                                                "pettype": 1,
                                                "coverURL": "http:\/\/img.boqiicdn.com\/Data\/BK\/P\/img50961416195246.jpg",
                                                "characters": "非常聪明友好、喜欢吠叫",
                                                "feedPoints": "",
                                                "careKnowledge": "　　随着社会的发展，养宠也成了一种时尚。因阿拉斯加具有很强的语言能力，以及英俊的外表，又能够领会人的语言、表情和各类手势，因此饲养的人越来越多。由于阿拉斯加的肠胃天生就不好，因此在生活上及饮食上主人应需要多加留意。",
                                                "easyOfDisease": "肠胃疾病",
                                                "characterFeature": "　　随着社会的不断发展，阿拉斯加雪橇犬受到很多年轻人的喜爱，阿拉斯加早年是当做工作犬来使用的，现已进入很多家庭，之后会渐渐的习惯家庭饲养，服从家里其他人的指挥命令。"
                                            },
                                            {
                                                "url": "",
                                                "desc": "　　西伯利亚",
                                                "life": "9-15年",
                                                "name": "哈士奇",
                                                "price": "2000-4000元",
                                                "trust": 1,
                                                "nation": "俄罗斯",
                                                "engName": "SiberianHuskiy",
                                                "feature": "　　西伯利亚雪橇犬是一种原始的古老犬种，因它的独特嘶哑的叫声被称之为当今的哈士奇。很早前哈士奇是最原始的交通工具专门拉雪橇的，并用这种狗猎取和饲养驯鹿，或者繁殖这种狗，然后带出他们居住的冻土地，换取温饱。典型狼性犬。",
                                                "pettype": 1,
                                                "coverURL": "",
                                                "characters": "聪明机灵、极度热情、神经质",
                                                "feedPoints": "哈士奇有着敏感的肠胃，因此在饮食上需要主人多加重视",
                                                "careKnowledge": "　　哈士奇虽然看着一副冷漠无情的样子，事实上，哈士奇对人很友好、温柔、热情的。喜欢与人交往是哈士奇的典型性格。通常不表现出护卫犬强烈的领地占有欲，不对陌生人过多的怀疑，也不会攻击其他犬类。因此有很多人喜欢哈士奇。他对主人非常忠诚，一条忠诚的小狗有一个健康的身体是非常重要的。",
                                                "easyOfDisease": "肠胃疾病",
                                                "characterFeature": "　　哈士奇的外表英俊潇洒，精致的五官和丰富的肢体语言充满了奇特的表现，无需复杂的交谈，就能轻易了解他的喜怒哀乐。哈士奇时常会有点神经质。"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}