创建视频生成任务 API(doubao-2.0)

POST /api/v3/contents/generations/tasks

MethodPOST
Path/api/v3/contents/generations/tasks
Typehttp
Status-2
Module2102810
Folder66709190

说明

概览

MethodPOST
Path/api/v3/contents/generations/tasks
Typehttp
Status-2
Module2102810
Folder66709190

请求体

{
  "type": "application/json",
  "parameters": [],
  "jsonSchema": {
    "type": "object",
    "properties": {
      "model": {
        "type": "string"
      },
      "content": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string"
            },
            "text": {
              "type": "string"
            },
            "image_url": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string"
                }
              },
              "required": [
                "url"
              ],
              "x-apifox-orders": [
                "url"
              ]
            },
            "role": {
              "type": "string"
            },
            "video_url": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string"
                }
              },
              "required": [
                "url"
              ],
              "x-apifox-orders": [
                "url"
              ]
            },
            "audio_url": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string"
                }
              },
              "required": [
                "url"
              ],
              "x-apifox-orders": [
                "url"
              ]
            }
          },
          "required": [
            "type",
            "image_url",
            "role"
          ],
          "x-apifox-orders": [
            "type",
            "text",
            "image_url",
            "role",
            "video_url",
            "audio_url"
          ]
        }
      },
      "generate_audio": {
        "type": "boolean"
      },
      "ratio": {
        "type": "string"
      },
      "duration": {
        "type": "integer"
      },
      "watermark": {
        "type": "boolean"
      }
    },
    "required": [
      "model",
      "content"
    ],
    "x-apifox-orders": [
      "model",
      "content",
      "generate_audio",
      "ratio",
      "duration",
      "watermark"
    ]
  },
  "required": true,
  "mediaType": "",
  "examples": [
    {
      "mediaType": "application/json",
      "value": "{\r\n    \"model\": \"doubao-seedance-2-0-260128\",\r\n    \"content\": [\r\n         {\r\n            \"type\": \"text\",\r\n            \"text\": \"全程使用视频1的第一视角构图,全程使用音频1作为背景音乐。第一人称视角果茶宣传广告,seedance牌「苹苹安安」苹果果茶限定款;首帧为图片1,你的手摘下一颗带晨露的阿克苏红苹果,轻脆的苹果碰撞声;2-4 秒:快速切镜,你的手将苹果块投入雪克杯,加入冰块与茶底,用力摇晃,冰块碰撞声与摇晃声卡点轻快鼓点,背景音:「鲜切现摇」;4-6 秒:第一人称成品特写,分层果茶倒入透明杯,你的手轻挤奶盖在顶部铺展,在杯身贴上粉红包标,镜头拉近看奶盖与果茶的分层纹理;6-8 秒:第一人称手持举杯,你将图片2中的果茶举到镜头前(模拟递到观众面前的视角),杯身标签清晰可见,背景音「来一口鲜爽」,尾帧定格为图片2。背景声音统一为女生音色。\"\r\n        },\r\n        {\r\n            \"type\": \"image_url\",\r\n            \"image_url\": {\r\n                \"url\": \"https://ark-project.tos-cn-beijing.volces.com/doc_image/r2v_tea_pic1.jpg\"\r\n            },\r\n            \"role\": \"reference_image\"\r\n        },\r\n        {\r\n            \"type\": \"image_url\",\r\n            \"image_url\": {\r\n                \"url\": \"https://ark-project.tos-cn-beijing.volces.com/doc_image/r2v_tea_pic2.jpg\"\r\n            },\r\n            \"role\": \"reference_image\"\r\n        },\r\n        {\r\n          \"type\": \"video_url\",\r\n          \"video_url\": {\r\n              \"url\": \"https://pro.filesystem.site/cdn/20260403/0e80a635b859e7716671a40d836135.mp4\"\r\n          },\r\n          \"role\": \"reference_video\"\r\n        },\r\n        {\r\n          \"type\": \"audio_url\",\r\n          \"audio_url\": {\r\n              \"url\": \"https://ark-project.tos-cn-beijing.volces.com/doc_audio/r2v_tea_audio1.mp3\"\r\n          },\r\n          \"role\": \"reference_audio\"\r\n        }\r\n    ],\r\n    \"generate_audio\":true,\r\n    \"ratio\": \"21:9\",\r\n    \"duration\": 11,\r\n    \"watermark\": false\r\n}",
      "name": "示例 1"
    }
  ],
  "oasExtensions": ""
}

响应

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