{
  "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": {
    "/2486-4": {
      "x-pointCode": 4,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "视频内容理解",
        "description": "可以对输入的视频按镜头进行切分，返回切分点。阿里原接口订购地址：https://vision.aliyun.com/videorecog?spm=a211p3.14020179.J_7524944390.45.66cd4850YNwblW",
        "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"
                            },
                            "Data": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "TagInfo": {
                                    "type": "object",
                                    "properties": {
                                      "TimeRange": {
                                        "type": "string",
                                        "description": "表示视频中的元素出现的时间相对位置。\n\n例如整段视频时长为20秒，[[0,0.1],[0.3,1.0]]则表示该元素在整段视频中出现了2次，第一次出现的时间段为0~2秒，第二次出现的时间段为6~20秒。"
                                      },
                                      "TimeProportion": {
                                        "type": "string",
                                        "description": "表示视频中的元素出现的时长占比，输出80则表示该元素在整段视频出现的时间占总时长的80%。取值范围 [0,100.0]"
                                      },
                                      "Number": {
                                        "type": "string",
                                        "description": "如果为HumanInfo字段时，当识别为非明星时表示出现的人物数量，被识别为明星时显示为1。 如果为非HumanInfo字段时，可忽略此字段。"
                                      },
                                      "Category": {
                                        "type": "string",
                                        "description": "标签名称。详细请看帮助文档"
                                      }
                                    },
                                    "description": "标签。目前仅输出scene（场景）和human（人）。"
                                  },
                                  "VideoInfo": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "Width": {
                                          "type": "string",
                                          "description": "视频的宽度。单位：像素。"
                                        },
                                        "Height": {
                                          "type": "string",
                                          "description": "视频的高。单位：像素。"
                                        },
                                        "Duration": {
                                          "type": "string",
                                          "description": "视频的时长。单位：秒。"
                                        },
                                        "Fps": {
                                          "type": "string",
                                          "description": "视频的帧率。单位：帧。"
                                        }
                                      }
                                    }
                                  }
                                }
                              },
                              "description": "返回的结果数据内容。"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "2486_4_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "VideoURL": {
                    "type": "string",
                    "description": "输入视频URL地址。URL中不支持中文字符。"
                  },
                  "ds_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "VideoURL",
                  "ds_id"
                ]
              }
            }
          }
        }
      }
    },
    "/2486-3": {
      "x-pointCode": 3,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "查询异步任务结果",
        "description": "针对异步接口，调用API接口后，返回的并不是真正的请求结果，您需要保存返回结果中的RequestId，然后调用本接口来获取真正的请求结果。",
        "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": {
                                "Status": {
                                  "type": "string",
                                  "description": "异步任务状态。包括：\n\nQUEUING：任务排队中\nPROCESSING：异步处理中\nPROCESS_SUCCESS：处理成功\nPROCESS_FAILED：处理失败\nTIMEOUT_FAILED：任务超时未处理完成\nLIMIT_RETRY_FAILED：超过最大重试次数"
                                },
                                "JobId": {
                                  "type": "string",
                                  "description": "异步任务Id。"
                                }
                              }
                            },
                            "ret_code": {
                              "type": "number"
                            },
                            "remark": {
                              "type": "string"
                            },
                            "RequestId": {
                              "type": "string"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "2486_3_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "JobId": {
                    "type": "string",
                    "description": "输入异步接口返回的RequestId，输入后可以查询异步接口的真实请求结果。"
                  },
                  "ds_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "JobId",
                  "ds_id"
                ]
              }
            }
          }
        }
      }
    },
    "/2486-2": {
      "x-pointCode": 2,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "镜头解析",
        "description": "可以对输入的视频按镜头进行切分，返回切分点。阿里原接口订购地址：https://vision.aliyun.com/videorecog?spm=a211p3.14020179.J_7524944390.45.66cd4850YNwblW",
        "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"
                            },
                            "Data": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "ShotFrameIds": {
                                    "type": "string",
                                    "description": "解析结果，切分点帧号。"
                                  }
                                }
                              },
                              "description": "返回的结果数据内容。"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "2486_2_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "IsGif": {
                    "type": "string",
                    "description": "是否输出GIF格式的封面。true表示输出GIF格式封面，false表示输出普通图片封面。"
                  },
                  "VideoUrl": {
                    "type": "string",
                    "description": "输入视频URL地址。URL中不支持中文字符。"
                  },
                  "ds_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "IsGif",
                  "VideoUrl",
                  "ds_id"
                ]
              }
            }
          }
        }
      }
    },
    "/2486-1": {
      "x-pointCode": 1,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "视频封面",
        "description": "可以检测输入的视频，输出多个视频封面。阿里原接口订购地址：https://vision.aliyun.com/videorecog?spm=a211p3.14020179.J_7524944390.45.66cd4850YNwblW",
        "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"
                            },
                            "Data": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "Outputs": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "Confidence": {
                                          "type": "string",
                                          "description": "置信度，值越高表示可信度越高。"
                                        },
                                        "ImageURL": {
                                          "type": "string",
                                          "description": "输出封面图片的URL地址。"
                                        }
                                      }
                                    },
                                    "description": "返回信息列表，每个元素是一张封面图，可能返回多张封面图。成功时有返回信息。"
                                  }
                                }
                              },
                              "description": "返回的结果数据内容。"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "2486_1_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "IsGif": {
                    "type": "string",
                    "description": "是否输出GIF格式的封面。true表示输出GIF格式封面，false表示输出普通图片封面。"
                  },
                  "VideoUrl": {
                    "type": "string",
                    "description": "输入视频URL地址。URL中不支持中文字符。"
                  },
                  "ds_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "IsGif",
                  "VideoUrl",
                  "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/2486?tab=book"
  },
  "x-apiCode": "2486",
  "x-is-own": false,
  "x-is-op": true
}