在 CometAPI 上通过 POST /v1/videos 创建一个异步的 ByteDance Seedance 视频任务。一个端点即可支持 Seedance 1.0 Pro、1.5 Pro 和 2.0,请求使用 multipart/form-data。
model 字段来选择模型。调用会立即返回一个任务 id,而渲染会在后台继续进行。
| Model id | 层级 | 说明 |
|---|---|---|
doubao-seedance-2-0 | 2.0 | 2.0 系列中质量最高的输出。 |
doubao-seedance-2-0-fast | 2.0 | 2.0 的更快变体,适合快速迭代和预览。 |
doubao-seedance-1-5-pro | 1.5 Pro | 支持 1080p。仅支持文生视频。 |
doubao-seedance-1-0-pro | 1.0 Pro | 支持 1080p,并支持最短从 2 秒开始的短视频。仅支持文生视频。 |
| Field | Type | Required | Default | Allowed values |
|---|---|---|---|---|
prompt | string | 是 | — | 任意文本 |
model | string | 是 | — | doubao-seedance-2-0, doubao-seedance-2-0-fast, doubao-seedance-1-5-pro, doubao-seedance-1-0-pro |
seconds | integer | 否 | 5 | 取决于模型(见下文) |
size | string | 否 | 16:9 | 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 |
resolution | string | 否 | 720p | 2.0 模型支持 480p、720p;1.5 Pro 和 1.0 Pro 支持 480p、720p、1080p |
input_reference | file | 否 | — | JPEG、PNG 或 WebP。仅 2.0 模型接受。 |
| Model | seconds range |
|---|---|
doubao-seedance-2-0, doubao-seedance-2-0-fast | 4 到 15 |
doubao-seedance-1-5-pro | 4 到 12 |
doubao-seedance-1-0-pro | 2 到 10 |
400,并带有 code: "InvalidParameter" 以及一条关于 duration 的消息。
input_reference 文件。若向 doubao-seedance-1-5-pro 或 doubao-seedance-1-0-pro 发送 input_reference,将返回 HTTP 400,并带有类似 the specified task_type r2v does not support model seedance-1-5-pro 的消息。此类模型仅用于文生视频。
multipart/form-data。要在 2.0 模型上运行图生视频,请在同一个请求中将图片作为 input_reference 部分附加:
curl https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer <COMETAPI_KEY>" \
-F 'prompt="A slow cinematic camera push across a coastal landscape at sunrise."' \
-F 'model="doubao-seedance-2-0"' \
-F 'seconds="5"' \
-F 'size="16:9"' \
-F 'resolution="720p"' \
-F 'input_reference=@/path/to/reference.jpg'
/path/to/reference.jpg 替换为你希望用作首帧锚点的图片的绝对或相对路径。支持的格式包括 JPEG、PNG 和 WebP。
轮询任务
input_reference 发送给不支持图生视频的模型时,该端点会返回 HTTP 400。当 bearer token 缺失或无效时,会返回 HTTP 401。错误响应体会使用两种结构中的一种;确切字段请参见 playground 中的 400 和 401 示例。Bearer token authentication. Use your CometAPI key.
Text prompt that describes the video. Required.
"A slow cinematic camera push across a coastal landscape at sunrise."
Seedance model id. Choose doubao-seedance-2-0 for the highest quality 2.0 output, doubao-seedance-2-0-fast for quick iteration on 2.0, doubao-seedance-1-5-pro for the 1.5 Pro tier, or doubao-seedance-1-0-pro for the 1.0 Pro tier. Only the two 2.0 models accept input_reference.
doubao-seedance-2-0, doubao-seedance-2-0-fast, doubao-seedance-1-5-pro, doubao-seedance-1-0-pro "doubao-seedance-2-0-fast"
Video duration in seconds. The accepted range depends on the model: doubao-seedance-2-0 and doubao-seedance-2-0-fast accept 4 to 15, doubao-seedance-1-5-pro accepts 4 to 12, and doubao-seedance-1-0-pro accepts 2 to 10. The default is 5 for every model.
2 <= x <= 155
Output aspect ratio. All Seedance models accept the same set of values.
21:9, 16:9, 4:3, 1:1, 3:4, 9:16 "16:9"
Output resolution. 480p and 720p are accepted by every model; 1080p is supported only by doubao-seedance-1-5-pro and doubao-seedance-1-0-pro.
480p, 720p, 1080p "720p"
Optional reference image. When included, the job runs in image-to-video mode and uses the image as the visual anchor. Only doubao-seedance-2-0 and doubao-seedance-2-0-fast accept this field; sending it with a 1.0 Pro or 1.5 Pro model returns HTTP 400.
Task created. Save the returned id and poll GET /v1/videos/{id}.
Task id. Use it as the path parameter for GET /v1/videos/{id}.
Object type, always video.
Echo of the requested model id.
Initial task status. A newly created task is returned as SUBMITTED.
SUBMITTED, IN_PROGRESS, SUCCESS, FAILED, ERROR Completion percentage. 0 at creation.
0 <= x <= 100Task creation time as a Unix timestamp in seconds.
Alias of id returned for compatibility. The value matches id.