Create a video task
Generate a new video from a prompt plus optional reference images, video, and audio.
Endpoint
Endpoint: POST https://api-ai.xiaoku.ai/doubao/v3/contents/generations/tasks
Request parameters
| Parameter | Description | Required |
|---|---|---|
model | Model ID | Yes |
content | Multimodal content array: prompt and reference assets | Yes |
generate_audio | true: video includes synced audio. false: silent video. | No |
ratio | Aspect ratio: 16:9, 4:3, 1:1, 3:4, 9:16, 21:9, adaptive | No |
duration | Length in seconds. Default 5. Range 4–15. | No |
watermark | true: with watermark. false: without watermark. | No |
resolution | 480p, 720p, or 1080p. Default 720p. | No |
Models
| Model | Resolutions |
|---|---|
doubao-seedance-2-0-260128 | 480p, 720p, 1080p |
doubao-seedance-2-0-fast-260128 | 480p, 720p |
doubao-seedance-2-0-mini-260615 | 480p, 720p |
content array
Text (prompt)
| Field | Description |
|---|---|
type | Always "text" |
text | Prompt describing the video |
Reference image
| Field | Description |
|---|---|
type | Always "image_url" |
image_url.url | Public URL, or an asset ID (asset:// + asset ID) |
role | "reference_image", "first_frame", or "last_frame" |
Image limits:
- Count: 1–9
- Formats: jpeg, png, webp, bmp, tiff, gif
- Aspect ratio: (0.4, 2.5)
- Width and height: 300–6000 px
Reference video
| Field | Description |
|---|---|
type | Always "video_url" |
video_url.url | Public URL or asset ID |
role | "reference_video" |
Video limits:
- Resolution: 480p, 720p
- Duration: 2–15 seconds each, up to 3 clips, total ≤ 15 seconds
- Aspect ratio: [0.4, 2.5]
- Width and height: 300–6000 px
Reference audio
| Field | Description |
|---|---|
type | Always "audio_url" |
audio_url.url | Public URL or asset ID |
role | "reference_audio" |
Audio limits:
- Formats: wav, mp3
- Duration: 2–15 seconds each, up to 3 clips, total ≤ 15 seconds
- Size: ≤ 15 MB each
Examples
Text to video
bash
curl --location --request POST 'https://api-ai.xiaoku.ai/doubao/v3/contents/generations/tasks' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data-raw '{
"model": "doubao-seedance-2-0-260128",
"content": [
{
"type": "text",
"text": "A cute kitten running across a sunny lawn"
}
],
"generate_audio": true,
"ratio": "16:9",
"duration": 5,
"watermark": false
}'Image to video — first frame
bash
curl --location --request POST 'https://api-ai.xiaoku.ai/doubao/v3/contents/generations/tasks' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data-raw '{
"model": "doubao-seedance-2-0-260128",
"content": [
{
"type": "text",
"text": "A girl holding a fox opens her eyes and looks gently at the camera. The fox stays close. The camera slowly pulls back, her hair moves in the wind, and wind can be heard."
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/first-frame.png"
},
"role": "first_frame"
}
],
"generate_audio": true,
"ratio": "adaptive",
"duration": 5,
"watermark": false
}'Image to video — first and last frames
bash
curl --location --request POST 'https://api-ai.xiaoku.ai/doubao/v3/contents/generations/tasks' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data-raw '{
"model": "doubao-seedance-2-0-260128",
"content": [
{
"type": "text",
"text": "The girl in the image says cheese to the camera while the shot orbits 360 degrees"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/first-frame.jpeg"
},
"role": "first_frame"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/last-frame.jpeg"
},
"role": "last_frame"
}
],
"generate_audio": true,
"ratio": "adaptive",
"duration": 5,
"watermark": false
}'Multimodal video
bash
curl --location --request POST 'https://api-ai.xiaoku.ai/doubao/v3/contents/generations/tasks' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data-raw '{
"model": "doubao-seedance-2-0-260128",
"content": [
{
"type": "text",
"text": "Use the first-person framing from video 1 for the whole clip, and use audio 1 as the background music throughout"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/image1.jpg"
},
"role": "reference_image"
},
{
"type": "video_url",
"video_url": {
"url": "https://example.com/video1.mp4"
},
"role": "reference_video"
},
{
"type": "audio_url",
"audio_url": {
"url": "https://example.com/audio1.mp3"
},
"role": "reference_audio"
}
],
"generate_audio": true,
"ratio": "16:9",
"duration": 11,
"watermark": false
}'Response
json
{
"id": "doubao.cgt-20250101000000-0000",
"model": "doubao-seedance-2-0-260128",
"status": "queued",
"created_at": 1743414619
}Notes
- Video generation is asynchronous. Query the task for the final result.
- Assets are deleted from time to time. Do not use the asset API as long-term storage.
- Asset IDs use the form
asset://+ asset ID - The fast and mini models do not support 1080p
