跳转到主要内容
POST
/
v1
/
videos
/
generations
curl --request POST \
  --url https://toapis.com/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "doubao-seedance-1-5-pro",
    "prompt": "海滩日落,金色阳光照在海面上,海浪轻轻拍打沙滩",
    "duration": 5,
    "aspect_ratio": "16:9",
    "metadata": {
      "resolution": "720p",
      "audio": true
    }
  }'
{
  "id": "task_vid_xyz789ghi012",
  "object": "generation.task",
  "model": "doubao-seedance-1-5-pro",
  "status": "queued",
  "progress": 0,
  "created_at": 1703884800,
  "metadata": {}
}
  • 字节跳动豆包视频生成模型 1.5 Pro 版本
  • 支持文本到视频生成
  • 支持首帧/尾帧图控制
  • 不支持参考图模式
  • 支持音频生成(1.5 Pro 独有功能)
  • 异步任务管理,通过任务 ID 查询结果

Authorizations

Authorization
string
必填
所有接口均需要使用 Bearer Token 进行认证获取 API Key:访问 API Key 管理页面 获取您的 API Key使用时在请求头中添加:
Authorization: Bearer YOUR_API_KEY

Body

model
string
默认值:"doubao-seedance-1-5-pro"
必填
视频生成模型名称可用模型:
  • doubao-seedance-1-5-pro - 1.5 Pro 版,支持音频生成和首帧/尾帧控制
prompt
string
必填
视频内容描述详细描述场景、动作、风格以获得更好的生成效果示例:"海滩日落,金色阳光照在海面上,海浪轻轻拍打沙滩"
duration
integer
默认值:5
视频时长(秒)支持范围:4 ~ 12默认:5
aspect_ratio
string
默认值:"16:9"
视频宽高比可选项:
  • 16:9 - 横屏
  • 9:16 - 竖屏
  • 1:1 - 方形
  • 4:3 - 传统比例
  • 3:4 - 竖向传统比例
  • 21:9 - 超宽屏
默认:16:9

分辨率与宽高比组合

分辨率支持的宽高比备注
480p16:9, 4:3, 1:1, 3:4, 9:16, 21:9全部支持
720p16:9, 4:3, 1:1, 3:4, 9:16, 21:9全部支持(默认)
1080p16:9, 4:3, 1:1, 3:4, 9:16, 21:9全部支持
image_urls
string[]
兼容图片 URL 数组,用于首尾帧图生视频兼容规则:
  • 1 张图片:作为 first_frame
  • 2 张图片:分别作为 first_framelast_frame
  • 超过 2 张:仅使用前两张,其余忽略
建议优先使用 image_with_roles 显式指定首帧和尾帧示例:["https://example.com/first.png", "https://example.com/last.png"]image_urlsimage_with_roles 不能同时使用
image_with_roles
array
带角色的图像数组,用于显式首尾帧控制示例:
[
  {"url": "https://example.com/first.png", "role": "first_frame"},
  {"url": "https://example.com/last.png", "role": "last_frame"}
]
  • image_urlsimage_with_roles 不能同时使用
  • 首帧和尾帧仅支持各一张
  • 1.5 Pro 不支持 reference_image(参考图)角色,如需参考图功能请使用 Seedance 2.0
metadata
object
扩展参数

与 1.0 版本的差异

特性1.0 fast/quality1.5 Pro
默认分辨率1080p720p
支持分辨率480p/720p/1080p480p/720p/1080p
时长范围2-12秒4-12秒
音频生成不支持支持
图片控制模式reference 单参考图first_frame / last_frame 首尾帧模式

Response

id
string
任务唯一标识符,用于查询任务状态
object
string
对象类型,固定为 generation.task
model
string
使用的模型名称
status
string
任务状态
  • queued - 排队等待处理
  • in_progress - 处理中
  • completed - 成功完成
  • failed - 失败
progress
integer
任务进度百分比(0-100)
created_at
integer
任务创建时间戳(Unix 时间戳)
metadata
object
任务元数据
curl --request POST \
  --url https://toapis.com/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "doubao-seedance-1-5-pro",
    "prompt": "海滩日落,金色阳光照在海面上,海浪轻轻拍打沙滩",
    "duration": 5,
    "aspect_ratio": "16:9",
    "metadata": {
      "resolution": "720p",
      "audio": true
    }
  }'
{
  "id": "task_vid_xyz789ghi012",
  "object": "generation.task",
  "model": "doubao-seedance-1-5-pro",
  "status": "queued",
  "progress": 0,
  "created_at": 1703884800,
  "metadata": {}
}