Skip to main content
POST
/
v1
/
video
/
generations
curl -X POST https://gogogotoken.com/v1/video/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedance-2-0-fast",
    "prompt": "一款智能手表在白色展示台上缓慢旋转,柔和棚拍光线,镜头平稳推进",
    "seconds": "5",
    "size": "480x854"
  }'
{
  "id": "task_1234567890",
  "task_id": "task_1234567890",
  "status": "queued",
  "model": "doubao-seedance-2-0-fast"
}
视频生成是异步任务。提交后接口会立即返回 task_id,需要通过任务查询接口轮询获取结果。
curl -X POST https://gogogotoken.com/v1/video/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedance-2-0-fast",
    "prompt": "一款智能手表在白色展示台上缓慢旋转,柔和棚拍光线,镜头平稳推进",
    "seconds": "5",
    "size": "480x854"
  }'
{
  "id": "task_1234567890",
  "task_id": "task_1234567890",
  "status": "queued",
  "model": "doubao-seedance-2-0-fast"
}

接口说明

通常需要 30-120 秒生成完成。建议每 5-8 秒轮询一次。

文生视频

curl -X POST https://gogogotoken.com/v1/video/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedance-2-0-fast",
    "prompt": "一款智能手表在白色展示台上缓慢旋转,柔和棚拍光线,镜头平稳推进",
    "seconds": "5",
    "size": "480x854"
  }'

图生视频

基础模式传入 images 作为首帧或参考图片。
curl -X POST https://gogogotoken.com/v1/video/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedance-2-0",
    "prompt": "基于产品首帧生成一段展示视频,镜头缓慢推进,突出产品材质和屏幕细节",
    "images": ["https://assets.example.com/product-watch.jpg"],
    "seconds": "5",
    "size": "720x1280"
  }'
高级模式可以通过 metadata.content[] 指定首帧图片和参考视频。
curl -X POST https://gogogotoken.com/v1/video/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedance-2-0",
    "prompt": "让产品在展示台上缓慢旋转,背景保持简洁,画面稳定且突出品牌质感",
    "images": ["https://assets.example.com/product-watch.jpg"],
    "seconds": "6",
    "size": "1080x1920",
    "metadata": {
      "content": [
        {
          "type": "image_url",
          "image_url": { "url": "https://assets.example.com/product-watch.jpg" },
          "role": "first_frame"
        },
        {
          "type": "video_url",
          "video_url": { "url": "https://assets.example.com/reference-motion.mp4" }
        }
      ]
    }
  }'

提交响应

{
  "id": "task_1234567890",
  "task_id": "task_1234567890",
  "status": "queued",
  "model": "doubao-seedance-2-0-fast"
}

参数说明

Authorization
string
required
API Key 鉴权信息,格式为 Bearer YOUR_API_KEY
Content-Type
string
required
固定为 application/json
model
string
default:"doubao-seedance-2-0-fast"
required
视频模型 ID,支持 doubao-seedance-2-0doubao-seedance-2-0-fast
prompt
string
default:"一款智能手表在白色展示台上缓慢旋转,柔和棚拍光线,镜头平稳推进"
required
视频描述文本。
seconds
string
default:"5"
视频时长,示例为 "5"
duration
number
兼容字段,部分兼容接口使用该字段表达时长。
size
string
default:"480x854"
分辨率或宽高,如 1080x1920720x1280480x854
images
string[]
参考图片 URL 列表,图生视频时使用。
first_frame_image
string
首帧图片 Base64。
last_frame_image
string
尾帧图片 Base64。
metadata
object
扩展参数,可包含 contentresolutionratioframesseed 等。

响应体

id
string
视频生成任务 ID。
task_id
string
视频生成任务 ID。部分响应会同时返回 idtask_id
status
string
任务状态,例如 queued
model
string
本次任务使用的模型 ID。