Crea un trabajo asíncrono de video ByteDance Seedance en CometAPI con POST /v1/videos. Un solo endpoint sirve para Seedance 1.0 Pro, 1.5 Pro y 2.0, con solicitudes multipart/form-data.
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-fast"' \
-F 'seconds="5"' \
-F 'size="16:9"' \
-F 'resolution="720p"'{
"id": "task_abc123",
"task_id": "task_abc123",
"object": "video",
"model": "doubao-seedance-2-0-fast",
"status": "SUBMITTED",
"progress": 0,
"created_at": 1776681149
}model. La llamada devuelve un id de tarea inmediatamente y el renderizado continúa en segundo plano.
| Model id | Nivel | Notas |
|---|---|---|
doubao-seedance-2-0 | 2.0 | Salida de mayor calidad dentro de la familia 2.0. |
doubao-seedance-2-0-fast | 2.0 | Variante más rápida de 2.0 para iteración rápida y vistas previas. |
doubao-seedance-1-5-pro | 1.5 Pro | Compatible con 1080p. Solo texto a video. |
doubao-seedance-1-0-pro | 1.0 Pro | Compatible con 1080p y clips más cortos desde 2 segundos. Solo texto a video. |
| Campo | Tipo | Obligatorio | Predeterminado | Valores permitidos |
|---|---|---|---|---|
prompt | string | sí | — | cualquier texto |
model | string | sí | — | doubao-seedance-2-0, doubao-seedance-2-0-fast, doubao-seedance-1-5-pro, doubao-seedance-1-0-pro |
seconds | integer | no | 5 | depende del modelo (ver abajo) |
size | string | no | 16:9 | 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 |
resolution | string | no | 720p | 480p, 720p para modelos 2.0; 480p, 720p, 1080p para 1.5 Pro y 1.0 Pro |
input_reference | file | no | — | JPEG, PNG o WebP. Aceptado solo por los modelos 2.0. |
| Model | Rango de seconds |
|---|---|
doubao-seedance-2-0, doubao-seedance-2-0-fast | 4 a 15 |
doubao-seedance-1-5-pro | 4 a 12 |
doubao-seedance-1-0-pro | 2 a 10 |
400 con code: "InvalidParameter" y un mensaje sobre duration.
input_reference. Enviar input_reference con doubao-seedance-1-5-pro o doubao-seedance-1-0-pro devuelve HTTP 400 con un mensaje con una forma como the specified task_type r2v does not support model seedance-1-5-pro. Usa esos modelos solo para text-to-video.
multipart/form-data. Para ejecutar image-to-video en un modelo 2.0, adjunta la imagen como la parte input_reference en la misma solicitud:
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 con la ruta absoluta o relativa de la imagen que quieres usar como ancla del primer fotograma. Los formatos compatibles son JPEG, PNG y WebP.
Enviar la tarea
prompt y model. Guarda el id devuelto para el siguiente paso.Consultar la tarea
400 cuando falta un campo obligatorio, un valor queda fuera del rango aceptado o se envía input_reference a un modelo que no es compatible con image-to-video. Devuelve HTTP 401 cuando falta el bearer token o no es válido. El cuerpo del error usa una de dos estructuras; consulta los ejemplos de 400 y 401 en el playground para ver los campos exactos.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.
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-fast"' \
-F 'seconds="5"' \
-F 'size="16:9"' \
-F 'resolution="720p"'{
"id": "task_abc123",
"task_id": "task_abc123",
"object": "video",
"model": "doubao-seedance-2-0-fast",
"status": "SUBMITTED",
"progress": 0,
"created_at": 1776681149
}