1. 统一视频 VEO
梧柏API使用文档
WHBAI · 统一视频 VEO
  • WHBAI · Google Gemini 原生 (v1alpha)
  • WHBAI · Google Gemini 原生
  • WHBAI · Ideogram
  • WHBAI · Ideogram V3
  • WHBAI · Midjourney
  • WHBAI · Jimeng
  • WHBAI · Kling
  • WHBAI · Luma
  • WHBAI · Luma V1
  • WHBAI · Omni 视频
  • WHBAI · Pixverse
  • WHBAI · Runway
  • WHBAI · Sora2
  • WHBAI · 统一视频 VEO
  • WHBAI · Vidu
  • WHBAI · 豆包 Volc
  • WHBAI · Suno
  • WHBAI · Playground
  • WHBAI · 账号与令牌
  • WHBAI · 阿里 Pix
  • WHBAI · 阿里百炼
  • WHBAI · 私域人像
  • WHBAI · Fal.ai
  • WHBAI · Replicate
  • WHBAI · 腾讯云 VOD
  • WHBAI · MiniMax
  • WHBAI · 支持模型列表
  • WHBAI · Grok Imagine
  • WHBAI · Seedance 2.0
  • WHBAI · TypeSafe
  • WHBAI · OpenAI 兼容
  • 统一视频 VEO
    • 创建视频生成任务
      POST
    • 延长视频
      POST
    • 查询视频任务
      GET
    • 视频生成 veo-3.1-generate-preview
      POST
    • 视频生成 veo-3.1-fast-generate-preview
      POST
  • 数据模型
    • UnifiedVideoResponse
    • VeoSampleRequest
    • PostV1VideoExtendRequest
    • NewApiError
  1. 统一视频 VEO

视频生成 veo-3.1-generate-preview

POST
/v1/video/generations
VEO 统一视频链路 · Veo 3.1 视频生成(POST /v1/video/generations),提交后通过 GET /v1/video/query 轮询。

网站中的模型与调用示例#

视频生成#

请求参数#

{
  "contentType": "application/json",
  "properties": {
    "content": {
      "description": "多模态输入数组,顺序决定角色分配",
      "items": {
        "properties": {
          "audio_url": {
            "properties": {
              "url": {
                "description": "音频URL或者引用素材ID:asset://asset-xxx\n",
                "type": "string",
                "x-i18n": {
                  "en-US": {
                    "description": "Audio URL or asset ID: asset://asset-xxx"
                  }
                }
              }
            },
            "required": [
              "url"
            ],
            "type": "object"
          },
          "draft_task": {
            "properties": {
              "id": {
                "description": "草稿任务ID\n",
                "type": "string",
                "x-i18n": {
                  "en-US": {
                    "description": "Draft task ID"
                  }
                }
              }
            },
            "type": "object"
          },
          "image_url": {
            "properties": {
              "url": {
                "description": "图片URL或者引用素材ID:asset://asset-xxx",
                "type": "string",
                "x-i18n": {
                  "en-US": {
                    "description": "Image URL or asset ID: asset://asset-xxx"
                  }
                }
              }
            },
            "required": [
              "url"
            ],
            "type": "object"
          },
          "role": {
            "description": "角色定义:\nfirst_frame: 作为视频的第一帧(图片)\nlast_frame: 作为视频的最后一帧(图片)\nreference_image: 提供角色/物体/场景的视觉参考(图片)\nreference_video: 作为延续或编辑的源视频(视频)\nreference_audio: 作为视频的背景音乐或音效(音频)\n枚举值:\nfirst_frame\nlast_frame\nreference_image\nreference_video\nreference_audio",
            "type": "string",
            "x-i18n": {
              "en-US": {
                "description": "role definition: first_frame: first frame of the video (image)\nlast_frame: last frame of the video (image)\nreference_image: visual reference for character/object/scene (image)\nreference_video: source video for continuation/edit\nreference_audio: BGM / SFX for the video (audio)\nenum:\nfirst_frame\nlast_frame\nreference_image\nreference_video\nreference_audio"
              }
            }
          },
          "text": {
            "description": "提示词文本(当 type=text 时必填)",
            "type": "string",
            "x-i18n": {
              "en-US": {
                "description": "Prompt text (required when type=text)"
              }
            }
          },
          "type": {
            "description": "枚举值:\ntext\nimage_url\nvideo_url\naudio_url\ndraft_task",
            "type": "string",
            "x-i18n": {
              "en-US": {
                "description": "Enum:\ntext\nimage_url\nvideo_url\naudio_url\ndraft_task"
              }
            }
          },
          "video_url": {
            "properties": {
              "url": {
                "description": "视频URL或者引用素材ID:asset://asset-xxx",
                "type": "string",
                "x-i18n": {
                  "en-US": {
                    "description": "Video URL or asset ID: asset://asset-xxx"
                  }
                }
              }
            },
            "required": [
              "url"
            ],
            "type": "object"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "type": "array",
      "x-i18n": {
        "en-US": {
          "description": "multimodal input array; order assigns roles"
        }
      }
    },
    "metadata": {
      "description": "视频生成参数",
      "properties": {
        "callback_url": {
          "description": "任务完成时的回调 URL",
          "type": "string",
          "x-i18n": {
            "en-US": {
              "description": "callback URL when the task completes"
            }
          }
        },
        "draft": {
          "description": "草稿模式(生成速度更快、质量略低,用于预览)\n默认值:\nfalse",
          "type": "boolean",
          "x-i18n": {
            "en-US": {
              "description": "Draft mode (faster, slightly lower quality, for preview)\nDefault:\nfalse"
            }
          }
        },
        "duration": {
          "description": "视频时长(秒),合法范围 [4, 15] 或 -1(模型自动决定)\n<= 15\n默认值:\n5",
          "type": "integer",
          "x-i18n": {
            "en-US": {
              "description": "Video duration (seconds), valid [4, 15] or -1 (model decides)\n<= 15\nDefault:\n5"
            }
          }
        },
        "execution_expires_after": {
          "description": "任务最长执行时间(秒),范围 [3600, 259200],即 1 小时到 3 天\n>= 3600\n<= 259200\n默认值:\n172800",
          "type": "integer",
          "x-i18n": {
            "en-US": {
              "description": "Max task runtime (seconds), [3600, 259200] = 1h–3d\n>= 3600\n<= 259200\nDefault:\n172800"
            }
          }
        },
        "generate_audio": {
          "description": "是否生成或合成音频(使用 reference_audio 时必须设为 true)\n默认值:\nfalse",
          "type": "boolean",
          "x-i18n": {
            "en-US": {
              "description": "Generate/mux audio (must be true with reference_audio)\nDefault:\nfalse"
            }
          }
        },
        "ratio": {
          "description": "枚举值:\n16:9\n9:16\n1:1\n4:3\nadaptive\n默认值:\n16:9",
          "type": "string",
          "x-i18n": {
            "en-US": {
              "description": "Enum:\n16:9\n9:16\n1:1\n4:3\nadaptive\nDefault:\n16:9"
            }
          }
        },
        "resolution": {
          "description": "枚举值:\n480p\n720p\n1080p\n默认值:\n720p",
          "type": "string",
          "x-i18n": {
            "en-US": {
              "description": "Enum:\n480p\n720p\n1080p\nDefault:\n720p"
            }
          }
        },
        "return_last_frame": {
          "description": "返回末帧图片 URL,便于后续续写\n默认值:\nfalse",
          "type": "boolean",
          "x-i18n": {
            "en-US": {
              "description": "Return last-frame image URL for continuation\nDefault:\nfalse"
            }
          }
        },
        "service_tier": {
          "description": "默认值:\ndefault",
          "type": "string",
          "x-i18n": {
            "en-US": {
              "description": "Default:\ndefault"
            }
          }
        },
        "watermark": {
          "description": "是否在视频右下角加水印\n默认值:\ntrue",
          "type": "boolean",
          "x-i18n": {
            "en-US": {
              "description": "Watermark at bottom-right of video\nDefault:\ntrue"
            }
          }
        }
      },
      "type": "object",
      "x-i18n": {
        "en-US": {
          "description": "Videoparameter"
        }
      }
    },
    "model": {
      "description": "模型名称:\ndoubao-seedance-2-0-260128: 标准版,追求最佳画质、复杂镜头调度\ndoubao-seedance-2-0-fast-260128: Fast版,追求低延迟、成本敏感的场景\n枚举值:\ndoubao-seedance-2-0-260128\ndoubao-seedance-2-0-fast-260128",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "model name: doubao-seedance-2-0-260128: standard: best quality / complex camera work\ndoubao-seedance-2-0-fast-260128: Fast: low latency / cost-sensitive\nenum:\ndoubao-seedance-2-0-260128\ndoubao-seedance-2-0-fast-260128"
        }
      }
    }
  },
  "required": [
    "model",
    "content"
  ]
}

请求示例 · 文生视频#

{
  "content": [
    {
      "text": "第一人称视角果茶广告:0-2秒 手摘苹果;2-4秒 切镜头投入雪克杯摇晃;4-6秒 倒入透明杯特写;6-8秒 举杯到镜头前",
      "type": "text"
    },
    {
      "image_url": {
        "url": "https://example.com/apple.jpg"
      },
      "role": "reference_image",
      "type": "image_url"
    },
    {
      "image_url": {
        "url": "https://example.com/cup.jpg"
      },
      "role": "reference_image",
      "type": "image_url"
    },
    {
      "role": "reference_video",
      "type": "video_url",
      "video_url": {
        "url": "https://example.com/pov_reference.mp4"
      }
    },
    {
      "audio_url": {
        "url": "https://example.com/bgm.mp3"
      },
      "role": "reference_audio",
      "type": "audio_url"
    }
  ],
  "metadata": {
    "duration": 8,
    "generate_audio": true,
    "ratio": "16:9",
    "resolution": "720p",
    "watermark": false
  },
  "model": "doubao-seedance-2-0-260128"
}

请求示例 · 首帧图生视频#

{
  "content": [
    {
      "text": "Animate naturally from the first frame",
      "type": "text"
    },
    {
      "image_url": {
        "url": "https://example.com/first.jpg"
      },
      "role": "first_frame",
      "type": "image_url"
    }
  ],
  "metadata": {
    "duration": 10,
    "ratio": "adaptive",
    "resolution": "720p"
  },
  "model": "doubao-seedance-2-0-260128"
}

请求示例 · 首尾帧生视频#

{
  "content": [
    {
      "text": "Smooth transition from first frame to last frame",
      "type": "text"
    },
    {
      "image_url": {
        "url": "https://example.com/first.jpg"
      },
      "role": "first_frame",
      "type": "image_url"
    },
    {
      "image_url": {
        "url": "https://example.com/last.jpg"
      },
      "role": "last_frame",
      "type": "image_url"
    }
  ],
  "metadata": {
    "duration": 5,
    "ratio": "16:9",
    "resolution": "720p"
  },
  "model": "doubao-seedance-2-0-260128"
}

请求示例 · 参考图生视频#

{
  "content": [
    {
      "text": "The subject walks forward naturally",
      "type": "text"
    },
    {
      "image_url": {
        "url": "https://example.com/character.jpg"
      },
      "role": "reference_image",
      "type": "image_url"
    }
  ],
  "metadata": {
    "duration": 10,
    "ratio": "16:9",
    "resolution": "720p"
  },
  "model": "doubao-seedance-2-0-260128"
}

请求示例 · 视频延续#

{
  "content": [
    {
      "text": "Continue the motion and style of the source video",
      "type": "text"
    },
    {
      "role": "reference_video",
      "type": "video_url",
      "video_url": {
        "url": "https://example.com/source.mp4"
      }
    }
  ],
  "metadata": {
    "duration": 8,
    "ratio": "adaptive",
    "resolution": "720p"
  },
  "model": "doubao-seedance-2-0-260128"
}

请求示例 · 视频编辑#

{
  "content": [
    {
      "text": "Replace product in video with product in image",
      "type": "text"
    },
    {
      "role": "reference_video",
      "type": "video_url",
      "video_url": {
        "url": "https://example.com/source.mp4"
      }
    },
    {
      "image_url": {
        "url": "https://example.com/product.jpg"
      },
      "role": "reference_image",
      "type": "image_url"
    }
  ],
  "metadata": {
    "duration": 8,
    "ratio": "16:9",
    "resolution": "720p",
    "return_last_frame": true
  },
  "model": "doubao-seedance-2-0-260128"
}

请求示例 · 多模态合成#

{
  "content": [
    {
      "text": "第一人称视角果茶广告",
      "type": "text"
    },
    {
      "image_url": {
        "url": "https://example.com/apple.jpg"
      },
      "role": "reference_image",
      "type": "image_url"
    },
    {
      "image_url": {
        "url": "https://example.com/cup.jpg"
      },
      "role": "reference_image",
      "type": "image_url"
    },
    {
      "role": "reference_video",
      "type": "video_url",
      "video_url": {
        "url": "https://example.com/pov_reference.mp4"
      }
    },
    {
      "audio_url": {
        "url": "https://example.com/bgm.mp3"
      },
      "role": "reference_audio",
      "type": "audio_url"
    }
  ],
  "metadata": {
    "duration": 8,
    "generate_audio": true,
    "ratio": "16:9",
    "resolution": "720p",
    "watermark": false
  },
  "model": "doubao-seedance-2-0-260128"
}

请求示例 · 引用素材#

{
  "content": [
    {
      "text": "第一人称视角果茶广告:0-2秒 手摘苹果;2-4秒 切镜头投入雪克杯摇晃;4-6秒 倒入透明杯特写;6-8秒 举杯到镜头前",
      "type": "text"
    },
    {
      "image_url": {
        "url": "asset://asset-xxx"
      },
      "role": "reference_image",
      "type": "image_url"
    },
    {
      "image_url": {
        "url": "asset://asset-xxx"
      },
      "role": "reference_image",
      "type": "image_url"
    },
    {
      "role": "reference_video",
      "type": "video_url",
      "video_url": {
        "url": "asset://asset-xxx"
      }
    },
    {
      "audio_url": {
        "url": "asset://asset-xxx"
      },
      "role": "reference_audio",
      "type": "audio_url"
    }
  ],
  "metadata": {
    "duration": 8,
    "generate_audio": true,
    "ratio": "16:9",
    "resolution": "720p",
    "watermark": false
  },
  "model": "doubao-seedance-2-0-260128"
}

响应示例 · 示例 1#

{
  "task_id": "cgt-20260412163502-x8k2m"
}

请求参数

Header 参数

Body 参数application/json必填

示例
{
    "model": "veo-3.1-generate-preview",
    "prompt": "A close up of two people staring at a cryptic drawing on a wall",
    "metadata": {
        "aspectRatio": "16:9",
        "durationSeconds": 6
    }
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
cURL
curl --location '/v1/video/generations' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
    "model": "veo-3.1-generate-preview",
    "prompt": "A close up of two people staring at a cryptic drawing on a wall",
    "metadata": {
        "aspectRatio": "16:9",
        "durationSeconds": 6
    }
}'

返回响应

🟢200成功
application/json
Bodyapplication/json

示例
{
    "code": 0,
    "message": "success",
    "data": {
        "task_id": "task_example_001"
    }
}
🟠400请求有误
修改于 2026-10-24 18:33:23
上一页
查询视频任务
下一页
视频生成 veo-3.1-fast-generate-preview
Built with