{
    "openapi": "3.0.0",
    "info": {
        "title": "植物图像识别 - API文档",
        "version": "1.0.0",
        "description": "本接口可识别常见的仅千种植物，返回所属科目、养护知识、简介和图片等。img请使用post方式传递图片base64（urlencode），图片大小不超过6M。在保证图片清晰度的情况下，图片越小识别速度越快，结果也越稳定。base64编码测试工具：<a href=\"\/demo\/base64\" target=\"_blank\">图片\/base64互转<\/a>"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/scanplant\/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\/plant.jpg",
                                        "description": "图片URL地址（支持jpg\/png\/bmp格式）"
                                    }
                                },
                                "required": [
                                    "img",
                                    "key"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "url": {
                                            "type": "string",
                                            "description": "详细来源"
                                        },
                                        "area": {
                                            "type": "string",
                                            "example": "原产热带美洲",
                                            "description": "产地"
                                        },
                                        "desc": {
                                            "type": "string",
                                            "example": "牵牛花为一年生缠绕草本，茎上被倒向的短柔毛及杂有倒向或开展的长硬毛......",
                                            "description": "植物简介"
                                        },
                                        "life": {
                                            "type": "string",
                                            "example": "不容易死",
                                            "description": "寿命"
                                        },
                                        "name": {
                                            "type": "string",
                                            "example": "牵牛花",
                                            "description": "植物名字"
                                        },
                                        "alias": {
                                            "type": "string",
                                            "example": "牵牛、喇叭花、筋角拉子、大牵牛花、勤娘子",
                                            "description": "植物别名"
                                        },
                                        "class": {
                                            "type": "string",
                                            "example": "双子叶植物纲",
                                            "description": "植物纲"
                                        },
                                        "genus": {
                                            "type": "string",
                                            "example": "牵牛属",
                                            "description": "植物属"
                                        },
                                        "trust": {
                                            "type": "int",
                                            "example": 41,
                                            "description": "可信度，越接近100表示越可信"
                                        },
                                        "family": {
                                            "type": "string",
                                            "example": "旋花科",
                                            "description": "植物科"
                                        },
                                        "orders": {
                                            "type": "string",
                                            "example": "管状花目",
                                            "description": "植物目"
                                        },
                                        "phylum": {
                                            "type": "string",
                                            "example": "被子植物门",
                                            "description": "植物门"
                                        },
                                        "engName": {
                                            "type": "string",
                                            "example": "Pharbitis nil （L.） Choisy",
                                            "description": "植物英文名"
                                        },
                                        "feature": {
                                            "type": "string",
                                            "example": "人工栽培难度并不高......",
                                            "description": "种植特点"
                                        },
                                        "kingdom": {
                                            "type": "string",
                                            "description": "界别"
                                        },
                                        "species": {
                                            "type": "string",
                                            "example": "牵牛",
                                            "description": "植物种"
                                        },
                                        "coverURL": {
                                            "type": "string",
                                            "description": "图片"
                                        },
                                        "latinName": {
                                            "type": "string",
                                            "example": "Pharbitis nil （L.） Choisy",
                                            "description": "拉丁名"
                                        },
                                        "botanicalName": {
                                            "type": "string",
                                            "example": "牵牛花",
                                            "description": "植物学名"
                                        },
                                        "careKnowledge": {
                                            "type": "string",
                                            "example": "牵牛花的适应能力比较强......",
                                            "description": "养护方式"
                                        },
                                        "binomialNomenclature": {
                                            "type": "string",
                                            "example": "Ipomoea nil",
                                            "description": "二名法"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "url": "",
                                                "area": "原产热带美洲",
                                                "desc": "牵牛花为一年生缠绕草本，茎上被倒向的短柔毛及杂有倒向或开展的长硬毛。叶宽卵形或近圆形，深或浅的3裂，偶5裂，长4－15厘米，宽4.5－14厘米，基部圆，心形，中裂片长圆形或卵圆形，渐尖或骤尖，侧裂片较短，三角形，裂口锐或圆，叶面或疏或密被微硬的柔毛；叶柄长2－15厘米，毛被同茎。",
                                                "life": "不容易死",
                                                "name": "牵牛花",
                                                "alias": "牵牛、喇叭花、筋角拉子、大牵牛花、勤娘子",
                                                "class": "双子叶植物纲",
                                                "genus": "牵牛属",
                                                "trust": 76,
                                                "family": "旋花科",
                                                "orders": "管状花目",
                                                "phylum": "被子植物门",
                                                "engName": "Pharbitisnil（L.）Choisy",
                                                "feature": "人工栽培难度并不高，但是，牵牛花对及基质的要求比较高，所以，想要养出漂亮的牵牛花，基质及环境都是非常重要的......",
                                                "kingdom": "",
                                                "species": "牵牛",
                                                "coverURL": "",
                                                "latinName": "Pharbitisnil（L.）Choisy",
                                                "botanicalName": "牵牛花",
                                                "binomialNomenclature": "Ipomoeanil"
                                            },
                                            {
                                                "url": "",
                                                "area": "",
                                                "des ": "荷花荷花玉兰在原产地高达30米；树皮淡褐色或灰色，薄鳞片状开裂；小枝粗壮，具横隔的髓心；小枝、芽、叶下面，叶柄、均密被褐色或灰褐色短绒毛（幼树的叶下面无毛）。叶厚革质，椭圆形，长圆状椭圆形或倒卵状椭圆形，长10－20厘米，宽4－7（10）厘米，先端钝或短钝尖，基部楔形，叶面深绿色，有光泽；侧脉每边8－10条；叶柄长1.5－4厘米，无托叶痕，具深沟。",
                                                "life": "不容易死",
                                                "name": "荷花玉兰",
                                                "alias": "广玉兰、洋玉兰、泽玉兰、木莲花",
                                                "class": "双子叶植物纲",
                                                "genus": "木兰属",
                                                "trust": 3,
                                                "family": "木兰科",
                                                "orders": "毛茛目",
                                                "phylum": "被子植物门",
                                                "engName": "MagnoliagrandifloraL.",
                                                "feature": "荷花",
                                                "kingdom": "植物",
                                                "species": "荷花玉兰",
                                                "coverURL": "",
                                                "latinName": "MagnoliagrandifloraL.",
                                                "botanicalName": "荷花玉兰",
                                                "careKnowledge": "一、播种法：二、嫁接法：三、压条法：四、扦插法：",
                                                "binomialNomenclature": ""
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}