{
  "openapi": "3.0.3",
  "info": {
    "title": "达摩院-图像识别",
    "description": "基于阿里云深度学习技术，可实现精准识别图像中的视觉内容，包括上千种物体标签、数十种常见场景等，可为用户提供图像打标、场景分类、颜色识别、风格识别以及元素识别等能力。图像识别技术可广泛应用于数字营销、新零售、广告设计等行业场景。",
    "termsOfService": "https://www.showapi.com/helpcenter/view#/4019/2",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://route.showapi.com"
    }
  ],
  "paths": {
    "/2584-11": {
      "x-pointCode": 11,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "菜品识别",
        "description": "证件照质量审核可以识别拍摄的证件照片是否存在质量问题，且有哪些质量问题。\n阿里原接口订购地址：https://vision.aliyun.com/imagerecog\n输入限制\n图像类型：JPEG、JPG、BMP、PNG。\n图像大小：小于10M。\n图像分辨率：大于100×100像素，小于5000×5000像素。\nURL地址中不能包含中文字符",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "Data": {
                              "type": "object",
                              "properties": {
                                "Threshold": {
                                  "type": "number",
                                  "description": "输出汽车类型的最大概率值。"
                                },
                                "Elements": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "Name": {
                                        "type": "string",
                                        "description": "汽车车型名称。"
                                      },
                                      "Score": {
                                        "type": "number",
                                        "description": "汽车车型名称的置信度。"
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "ret_code": {
                              "type": "number"
                            },
                            "remark": {
                              "type": "string"
                            },
                            "RequestId": {
                              "type": "string"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "2584_11_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "ImageURL": {
                    "type": "string",
                    "description": "图片URL地址。"
                  },
                  "ds_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "ImageURL",
                  "ds_id"
                ]
              }
            }
          }
        }
      }
    },
    "/2584-10": {
      "x-pointCode": 10,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "证件照质量审核",
        "description": "证件照质量审核可以识别拍摄的证件照片是否存在质量问题，且有哪些质量问题。阿里原接口订购地址：https://vision.aliyun.com/imagerecog\n\n输入限制\n图像类型：JPEG、JPG、BMP、PNG。\n图像大小：小于10M。\n图像分辨率：大于100×100像素，小于5000×5000像素。\nURL地址中不能包含中文字符",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "Data": {
                              "type": "object",
                              "properties": {
                                "Threshold": {
                                  "type": "number",
                                  "description": "输出汽车类型的最大概率值。"
                                },
                                "Elements": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "Name": {
                                        "type": "string",
                                        "description": "汽车车型名称。"
                                      },
                                      "Score": {
                                        "type": "number",
                                        "description": "汽车车型名称的置信度。"
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "ret_code": {
                              "type": "number"
                            },
                            "remark": {
                              "type": "string"
                            },
                            "RequestId": {
                              "type": "string"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "2584_10_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "ImageURL": {
                    "type": "string",
                    "description": "图片URL地址。"
                  },
                  "Type": {
                    "type": "string",
                    "description": "证照类型。\n\nIDCard：身份证。\nBusinessLicense：电子执照。"
                  },
                  "ds_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "ImageURL",
                  "Type",
                  "ds_id"
                ]
              }
            }
          }
        }
      }
    },
    "/2584-9": {
      "x-pointCode": 9,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "场景识别",
        "description": "阿里原接口订购地址：https://vision.aliyun.com/imagerecog。可以识别图像中的场景环境，支持数十种常见场景，包括：人物、会议室、公路、其他、办公室、动物、卧室、商场、地铁、夜景、天空、婚礼、室内、室外、小河、山峰、广场、建筑、户外、手机、旅行、日出、日落、显示器、树林、植物、水果、汽车、沙滩、沙漠、海滨、游乐场、湖、演出、火车、烧烤、物品、 狗、猫、美食、聚餐、自行车、船、花、草地、蔬菜、街景、街道、运动、运动场、露营、飞机、餐厅、鱼、鸟。\n\n输入限制\n请求格式：JPEG、JPG、PNG、BMP。\n图像大小：图像大小不超过3M。\n图像分辨率：图片要求5×5像素以上。\n图片URL地址中不能包含中文字符。",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "Data": {
                              "type": "object",
                              "properties": {
                                "Tags": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "Confidence": {
                                        "type": "number",
                                        "description": "标签名称的置信度。取值范围0~100。"
                                      },
                                      "Value": {
                                        "type": "string",
                                        "description": "标签名称。"
                                      }
                                    }
                                  },
                                  "description": "标签名称。最多输出5个标签名称，如果某个类别标签未输出，则对应的confidence为零。每个标签会输出confidence和value两个参数：\n\nvalue：标签名称。\nconfidence：标签名称置信度。"
                                }
                              }
                            },
                            "ret_code": {
                              "type": "number"
                            },
                            "remark": {
                              "type": "string"
                            },
                            "RequestId": {
                              "type": "string"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "2584_9_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "ImageURL": {
                    "type": "string"
                  },
                  "ds_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "ImageURL",
                  "ds_id"
                ]
              }
            }
          }
        }
      }
    },
    "/2584-6": {
      "x-pointCode": 6,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "垃圾分类识别",
        "description": "可以对图片中的物品垃圾进行分类，并给出具体的物品名称。阿里原接口订购地址：https://vision.aliyun.com/imagerecog\n\n输入限制\n图片类型：JPEG、JPG、PNG。\n图片大小：图片小于等于3M。\n图片分辨率：不限制图片分辨率，但图片分辨率太高可能会导致API识别超时，超时时间为5秒。\nURL地址中不能包含中文字符。",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "Data": {
                              "type": "object",
                              "properties": {
                                "Sensitive": {
                                  "type": "boolean",
                                  "description": "图片中是否存在敏感信息。\n\ntrue：存在敏感信息，不会返回具体垃圾分类信息。\nfalse：不存在敏感信息。"
                                },
                                "Elements": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "RubbishScore": {
                                        "type": "number",
                                        "description": "物品名称的置信度。"
                                      },
                                      "Category": {
                                        "type": "string",
                                        "description": "垃圾类别。包括可回收垃圾、干垃圾、湿垃圾、有害垃圾。"
                                      },
                                      "CategoryScore": {
                                        "type": "number",
                                        "description": "识别出的垃圾类别的置信度。"
                                      },
                                      "Rubbish": {
                                        "type": "string",
                                        "description": "具体的物品名称。"
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "ret_code": {
                              "type": "number"
                            },
                            "remark": {
                              "type": "string"
                            },
                            "RequestId": {
                              "type": "string"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "2584_6_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "ImageURL": {
                    "type": "string",
                    "description": "图片URL地址。"
                  },
                  "ds_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "ImageURL",
                  "ds_id"
                ]
              }
            }
          }
        }
      }
    },
    "/2584-5": {
      "x-pointCode": 5,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "风格识别",
        "description": "阿里原接口订购地址：https://vision.aliyun.com/imagerecog。\n可以对输入图像的风格类型进行分析，识别可能的风格与语意标签。可以识别的风格包括：chinese（中国风）、watercolor（水彩）、cartoon（卡通）、real（实景）、standard（标准）、simple（简洁）、lively（活泼）、colourful（多彩）、luxury（豪华）、technology（科技）、morbidezza（柔美）、strong（硬朗）、simpleelegant（素雅）、coolcold（高冷）、promotion（促销）、protrude（突出）。\n\n输入限制\n图片格式：PNG、JPG、JPEG、BMP、WEBP。\n图片大小：大小不超过9.5 MB。\n图片分辨率：小于3000×3000像素。\n图像都必须是RGB 3通道。\nURL地址中不能包含中文字符。",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "Data": {
                              "type": "object",
                              "properties": {
                                "Styles": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  },
                                  "description": "识别出的风格列表。"
                                }
                              }
                            },
                            "ret_code": {
                              "type": "number"
                            },
                            "remark": {
                              "type": "string"
                            },
                            "RequestId": {
                              "type": "string"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "2584_5_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "Url": {
                    "type": "string",
                    "description": "图片URL地址。"
                  },
                  "ds_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "Url",
                  "ds_id"
                ]
              }
            }
          }
        }
      }
    },
    "/2584-3": {
      "x-pointCode": 3,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "元素识别",
        "description": "用于识别输入图像中所包含的元素内容，用矩形框标注出其位置，并区分其对应的基本类型（人物、修饰、文案）。阿里原接口订购地址：https://vision.aliyun.com/imagerecog\n\n输入限制\n图片格式：JPG、JPEG、BMP、PNG。\n图片大小：大小不超过3M。\n图片分辨率：分辨率大小不超过1280×1280。\nURL地址中不能包含中文字符。",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "Data": {
                              "type": "object",
                              "properties": {
                                "Elements": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "Type": {
                                        "type": "string",
                                        "description": "元素类型。包括：\n\nUnType（未定义类型）、AllType（所有类型）、RootType（跟类型）、Synthesis（组合元素图）、Embedded（所有嵌套类型）、Format（元素格式）、MajorObject（主体）、Character（文案）、Identifier（标识）、Background（背景）、Decoration（修饰）、MajorHuman（人物模特）、MajorAuction（商品）、MajorThing（物体）、MajorOther（其他主体）、CharMain（主文案）、CharSub（副文案）、CharAction（行动点文案）、CharContent（内容文案）、CharNumber（数字文案）、CharOther（其他文案）、IdentLogo（logo标识）、IdentLight（高亮标识）、IdentCode（码标识）、IdentOther（其他标识）、BackBitmap（位图背景）、BackVector（矢量图背景）、BackOther（其他背景）、DecoTile（平铺修饰）、DecoRegion（区域修饰）、DecoPieces（碎片修饰）、DecoEdge（贴边修饰）、DecoLine（线性修饰）、DecoBox（框型修饰）、DecoChar（行动点文案修饰）、DecoOther（其他修饰）、SynthMajor（主体组团）、SynthChar（文案组团）、SynthIdent（标识组团）、SynthBack（背景组团）、SynthDeco（修饰组团）、SynthOther（其他组团）、EmbedSvg（svg嵌套格式）、EmbedJson（JSON嵌套格式）、EmbedHtml（html嵌套格式）。"
                                      },
                                      "Height": {
                                        "type": "number",
                                        "description": "元素高度。"
                                      },
                                      "Width": {
                                        "type": "number",
                                        "description": "元素宽度。"
                                      },
                                      "Y": {
                                        "type": "number",
                                        "description": "元素左上角y坐标。"
                                      },
                                      "Score": {
                                        "type": "number",
                                        "description": "预测分值[0.0, 1.0]。"
                                      },
                                      "X": {
                                        "type": "number",
                                        "description": "元素左上角x坐标。"
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "ret_code": {
                              "type": "number"
                            },
                            "remark": {
                              "type": "string"
                            },
                            "RequestId": {
                              "type": "string"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "2584_3_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "Url": {
                    "type": "string",
                    "description": "图片URL地址。"
                  },
                  "ds_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "Url",
                  "ds_id"
                ]
              }
            }
          }
        }
      }
    },
    "/2584-2": {
      "x-pointCode": 2,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "颜色识别",
        "description": "可以对输入图片的颜色信息进行分析，输出颜色值（RGB形式和HEX格式）与对应的占比信息。阿里原接口订购地址：https://vision.aliyun.com/imagerecog\n\n图片限制\n图片格式：PNG、JPG、JPEG、BMP。\n图片大小：大小不超过9.5 MB。\n图片分辨率：小于2500×2500像素。\n图像都必须是RGB 3通道。\nURL地址中不能包含中文字符。",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "Data": {
                              "type": "object",
                              "properties": {
                                "ColorTemplateList": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "Percentage": {
                                        "type": "string",
                                        "description": "当前颜色标签所占比例，取值范围[0.0, 1.0]。"
                                      },
                                      "Label": {
                                        "type": "string",
                                        "description": "颜色标签，共11种：black、white、gray、red、orange、yellow、green、cyan、blue、purple、magenta。"
                                      },
                                      "Color": {
                                        "type": "string",
                                        "description": "RGB颜色值（16进制），例如：291A18。"
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "ret_code": {
                              "type": "number"
                            },
                            "remark": {
                              "type": "string"
                            },
                            "RequestId": {
                              "type": "string"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "2584_2_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "Url": {
                    "type": "string",
                    "description": "图片URL地址。"
                  },
                  "ds_id": {
                    "type": "string"
                  },
                  "ColorCount": {
                    "type": "string",
                    "description": "期望的色板输出数量。取值范围1~10，默认值为3。"
                  }
                },
                "required": [
                  "Url",
                  "ds_id",
                  "ColorCount"
                ]
              }
            }
          }
        }
      }
    },
    "/2584-1": {
      "x-pointCode": 1,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "通用图像打标",
        "description": "于识别图像中的主体内容并打上类型标签，支持数千个内容标签，覆盖常见物体品类。阿里原接口订购地址：https://vision.aliyun.com/imagerecog\n\n输入限制\n图片格式：JPEG、JPG、PNG、BMP。\n图像大小：图像大小不超过3M。\n图像分辨率：分辨率要求5×5像素以上。\nURL地址中不能包含中文字符。",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "Data": {
                              "type": "object",
                              "properties": {
                                "Tags": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "Confidence": {
                                        "type": "number",
                                        "description": "标签名称对应的置信度，取值范围0~100。"
                                      },
                                      "Value": {
                                        "type": "string",
                                        "description": "标签名称。"
                                      }
                                    }
                                  },
                                  "description": "输出打标结果，最多输出5个打标结果，如果某个类别标签未输出，则对应的置信度confidence为零。每个标签会输出confidence和value两个参数：\n\nvalue：标签名称。\nconfidence：标签名称对应的置信度。"
                                }
                              }
                            },
                            "ret_code": {
                              "type": "number"
                            },
                            "remark": {
                              "type": "string"
                            },
                            "RequestId": {
                              "type": "string"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "2584_1_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "ImageURL": {
                    "type": "string",
                    "description": "图片URL地址。"
                  },
                  "ds_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "ImageURL",
                  "ds_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/2584?tab=book"
  },
  "x-apiCode": "2584",
  "x-is-own": false,
  "x-is-op": true
}