多主体(多参考)生成视频

POST /openapi/v2/video/fusion/generate

MethodPOST
Path/openapi/v2/video/fusion/generate
Typehttp
Status1
Module2102810
Folder86260306

概览

MethodPOST
Path/openapi/v2/video/fusion/generate
Typehttp
Status1
Module2102810
Folder86260306

参数

{
  "query": [],
  "path": [],
  "cookie": [],
  "header": [
    {
      "required": false,
      "description": "",
      "type": "string",
      "id": "ecYzrfo8nC",
      "enable": true,
      "name": "Content-Type",
      "sampleValue": "application/json"
    },
    {
      "required": false,
      "description": "",
      "type": "string",
      "id": "mljbwMks97",
      "enable": true,
      "name": "API-KEY",
      "sampleValue": "{{YOUR_API_KEY}}"
    }
  ]
}

请求体

{
  "type": "application/json",
  "parameters": [],
  "jsonSchema": {
    "type": "object",
    "properties": {
      "image_references": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "description": "\"subject\" or \"background\""
            },
            "img_id": {
              "type": "integer",
              "description": "img_id 来自上传图片接口"
            },
            "ref_name": {
              "type": "string",
              "description": "可针对图片指定名字, 用来更精准效果. 只允许~30byte (utf-8 )文字"
            }
          },
          "required": [
            "img_id"
          ],
          "x-apifox-orders": [
            "type",
            "img_id",
            "ref_name"
          ]
        },
        "description": "图像引用数组(1–3 项),包含“主体”或“背景”\nv4.5/v5 : 最多3张\nv5.5/v5.6/v6 : 最多7张"
      },
      "prompt": {
        "type": "string",
        "description": "使用 @ref_name 精确描述场景\n1.\n@ref_name 后必须有空格,如 @cat plays\n2.\nprompt 中引用的名称必须与 image_references 中的 ref_name 完全一致"
      },
      "model": {
        "type": "string",
        "description": "\"v4.5\",\"v5\",\"v5.5\",\"v5.6\",,\"v6\", \"c1\""
      },
      "duration": {
        "type": "integer",
        "description": "视频生成时长\nv4.5 : 5/8 (v3.5 1080p 无法使用 8)\nv5 : 5/8\nv5.5/5.6 : 5/8/10 (1080p 无法使用 10)"
      },
      "quality": {
        "type": "string",
        "description": "\"360p\",\"540p\",\"720p\",\"1080p\""
      },
      "aspect_ratio": {
        "type": "string",
        "description": "1.基础提供 \"16:9\",\"9.16\",\"4:3\",\"3:4\",\"1:1\" 画幅比\n2.v6, c1 额外支持 \"2:3\",\"3:2\",\"21:9\""
      },
      "seed": {
        "type": "integer"
      },
      "generate_audio_switch": {
        "type": "boolean",
        "description": "支持v5.6,v6, c1 / 控制开关Audio. true: Audio on , false: Audio off"
      }
    },
    "required": [
      "image_references",
      "prompt",
      "model",
      "duration",
      "quality",
      "aspect_ratio"
    ],
    "x-apifox-orders": [
      "image_references",
      "prompt",
      "model",
      "duration",
      "quality",
      "aspect_ratio",
      "generate_audio_switch",
      "seed"
    ]
  },
  "required": true,
  "mediaType": "",
  "examples": [
    {
      "name": "示例 1",
      "value": "{\r\n    \"image_references\": [\r\n        {\r\n            \"type\": \"subject\",\r\n            \"img_id\": 0,\r\n            \"ref_name\": \"dog\"\r\n        },\r\n        {\r\n            \"type\": \"background\",\r\n            \"img_id\": 0,\r\n            \"ref_name\": \"room\"\r\n        }\r\n    ],\r\n    \"prompt\": \"@dog plays at @room\",\r\n    \"model\": \"v5.6\",\r\n    \"duration\": 5,\r\n    \"quality\": \"720p\",\r\n    \"aspect_ratio\": \"16:9\",\r\n    \"seed\": 123456789\r\n}",
      "mediaType": "application/json"
    }
  ],
  "oasExtensions": ""
}

响应

[
  {
    "id": 165421363,
    "name": "成功",
    "code": 200,
    "contentType": "json",
    "jsonSchema": {
      "type": "object",
      "properties": {}
    },
    "itemSchema": {},
    "description": "",
    "mediaType": "",
    "headers": []
  }
]