{
  "openapi": "3.0.3",
  "info": {
    "title": "达摩院-视觉搜索",
    "description": "基于阿里云深度学习技术，进行视觉内容搜索，在指定图像、视频或3D模型库中搜索出相同或相似的视觉信息，适用于内容比对、内容精确查找、相似素材搜索等场景。",
    "termsOfService": "https://www.showapi.com/helpcenter/view#/4019/2",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://route.showapi.com"
    }
  ],
  "paths": {
    "/2475-7": {
      "x-pointCode": 7,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "删除图片",
        "description": "可以删除指定数据库中的图片。原接口订购地址：https://vision.aliyun.com/experience/detail?tagName=imgsearch&children=SearchImage",
        "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"
                            },
                            "remark": {
                              "type": "string"
                            },
                            "RequestId": {
                              "type": "string",
                              "description": "请求ID。"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "2475_7_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "ds_id": {
                    "type": "string"
                  },
                  "DbName": {
                    "type": "string",
                    "description": "数据库名称。支持小写字母、数字、下划线组合，长度2~64。"
                  },
                  "EntityId": {
                    "type": "string",
                    "description": "待删除数据的实体ID。"
                  }
                },
                "required": [
                  "ds_id",
                  "DbName",
                  "EntityId"
                ]
              }
            }
          }
        }
      }
    },
    "/2475-6": {
      "x-pointCode": 6,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "删除数据库",
        "description": "用于删除指定数据库。原接口订购地址：https://vision.aliyun.com/experience/detail?tagName=imgsearch&children=SearchImage\n\n说明 数据库删除后不可恢复。请谨慎操作。",
        "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"
                            },
                            "remark": {
                              "type": "string"
                            },
                            "RequestId": {
                              "type": "string",
                              "description": "请求ID。"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "2475_6_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "Name": {
                    "type": "string",
                    "description": "数据库名称。支持小写字母、数字、下划线的组合，长度2~64。"
                  },
                  "ds_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "Name",
                  "ds_id"
                ]
              }
            }
          }
        }
      }
    },
    "/2475-5": {
      "x-pointCode": 5,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "搜索图片",
        "description": "以根据输入图片，在数据库中搜索相似的图片。原接口订购地址：https://vision.aliyun.com/experience/detail?tagName=imgsearch&children=SearchImage\n\n输入限制\n图片格式：JPG、JPEG、PNG。\n图片大小：图片大小不超过3M。\n图片分辨率：大于128×128像素，小于1024×1024像素。\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": {
                                "MatchList": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "DataId": {
                                        "type": "string",
                                        "description": "数据ID。"
                                      },
                                      "ImageUrl": {
                                        "type": "string",
                                        "description": "查找结果，相似图像的URL地址。"
                                      },
                                      "ExtraData": {
                                        "type": "string",
                                        "description": "自定义数据。"
                                      },
                                      "Score": {
                                        "type": "number",
                                        "description": "相似得分，取值0~10，分数越大，相似度越高。"
                                      },
                                      "EntityId": {
                                        "type": "string",
                                        "description": "实体ID。"
                                      }
                                    }
                                  },
                                  "description": "相似的图片列表。"
                                }
                              }
                            },
                            "ret_code": {
                              "type": "number"
                            },
                            "remark": {
                              "type": "string"
                            },
                            "RequestId": {
                              "type": "string"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "2475_5_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "ds_id": {
                    "type": "string"
                  },
                  "DbName": {
                    "type": "string",
                    "description": "数据库名称。"
                  },
                  "ImageUrl": {
                    "type": "string",
                    "description": "图片URL地址"
                  },
                  "Limit": {
                    "type": "string",
                    "description": "获取结果数量上限，取值范围1~1000。"
                  }
                },
                "required": [
                  "ds_id",
                  "DbName",
                  "ImageUrl",
                  "Limit"
                ]
              }
            }
          }
        }
      }
    },
    "/2475-4": {
      "x-pointCode": 4,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "查看图片数据列表",
        "description": "可以查看指定数据库中的图片数据列表。原接口订购地址：https://vision.aliyun.com/experience/detail?tagName=imgsearch&children=SearchImage",
        "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": {
                                "TotalCount": {
                                  "type": "number",
                                  "description": "总数量。"
                                },
                                "ImageList": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "UpdatedAt": {
                                        "type": "number",
                                        "description": "更新数据的时间。"
                                      },
                                      "DataId": {
                                        "type": "string",
                                        "description": "数据ID。"
                                      },
                                      "ExtraData": {
                                        "type": "string",
                                        "description": "自定义数据内容。"
                                      },
                                      "CreatedAt": {
                                        "type": "number",
                                        "description": "创建数据的时间。"
                                      },
                                      "EntityId": {
                                        "type": "string",
                                        "description": "实体ID或分组ID。"
                                      }
                                    }
                                  }
                                },
                                "Token": {
                                  "type": "string",
                                  "description": "Offset和Limit组合的分页方式只支持前2000条记录。\n\n当超过2000时，需要使用上一次请求返回的Token作为请求下一页的参数。"
                                }
                              }
                            },
                            "ret_code": {
                              "type": "number"
                            },
                            "remark": {
                              "type": "string"
                            },
                            "RequestId": {
                              "type": "string"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "2475_4_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "ds_id": {
                    "type": "string"
                  },
                  "DbName": {
                    "type": "string",
                    "description": "数据库名称。"
                  },
                  "Offset": {
                    "type": "string",
                    "description": "起始记录。"
                  },
                  "Limit": {
                    "type": "string",
                    "description": "每页最多显示的条数。"
                  },
                  "Token": {
                    "type": "string",
                    "description": "Offset和Limit组合的分页方式只支持前2000条记录。当超过2000条时，需要使用上一次请求返回的Token作为请求下一页的参数。"
                  },
                  "Order": {
                    "type": "string",
                    "description": "排列方式。包括升序（asc）和降序（desc）。"
                  },
                  "EntityIdPrefix": {
                    "type": "string",
                    "description": "样本ID前缀。"
                  }
                },
                "required": [
                  "ds_id",
                  "DbName"
                ]
              }
            }
          }
        }
      }
    },
    "/2475-3": {
      "x-pointCode": 3,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "添加图片数据",
        "description": "可以为指定数据库添加图片数据。原接口订购地址：https://vision.aliyun.com/experience/detail?tagName=imgsearch&children=SearchImage\n\n每个数据库最多可以添加5万张图片。\n\n输入限制\n图片格式：JPG、JPEG、PNG。\n图片大小：输入图片大小不超过2M。\n图片分辨率：大于128×128像素，小于1024×1024像素。\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": {
                                "DataId": {
                                  "type": "string",
                                  "description": "数据ID。"
                                }
                              }
                            },
                            "ret_code": {
                              "type": "number"
                            },
                            "remark": {
                              "type": "string"
                            },
                            "RequestId": {
                              "type": "string"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "2475_3_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "ds_id": {
                    "type": "string"
                  },
                  "DbName": {
                    "type": "string",
                    "description": "数据库名称。支持小写字母、数字、下划线组合，长度2~64。"
                  },
                  "EntityId": {
                    "type": "string",
                    "description": "实体ID，可以作为数据分组的ID。支持小写字母、数字、下划线的组合，长度1~64。"
                  },
                  "ExtraData": {
                    "type": "string",
                    "description": "自定义数据。支持字母、数据、标点符号、汉字。长度0~512。"
                  },
                  "ImageUrl": {
                    "type": "string",
                    "description": "图片URL地址"
                  }
                },
                "required": [
                  "ds_id",
                  "DbName",
                  "EntityId",
                  "ExtraData",
                  "ImageUrl"
                ]
              }
            }
          }
        }
      }
    },
    "/2475-2": {
      "x-pointCode": 2,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "查看数据库列表",
        "description": "可以查看数据库的列表。原接口订购地址：https://vision.aliyun.com/experience/detail?tagName=imgsearch&children=SearchImage",
        "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": {
                                "DbList": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "Name": {
                                        "type": "string"
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "ret_code": {
                              "type": "number"
                            },
                            "remark": {
                              "type": "string"
                            },
                            "RequestId": {
                              "type": "string"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "2475_2_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "ds_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "ds_id"
                ]
              }
            }
          }
        }
      }
    },
    "/2475-1": {
      "x-pointCode": 1,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "创建数据库",
        "description": "用于创建图片数据库。原接口订购地址：https://vision.aliyun.com/experience/detail?tagName=imgsearch&children=SearchImage",
        "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"
                            },
                            "remark": {
                              "type": "string"
                            },
                            "RequestId": {
                              "type": "string"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "2475_1_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "Name": {
                    "type": "string",
                    "description": "数据库名称。支持小写字母、数字、下划线的组合，长度2~64。"
                  },
                  "ds_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "Name",
                  "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/2475?tab=book"
  },
  "x-apiCode": "2475",
  "x-is-own": false,
  "x-is-op": true
}