Skip to content

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 ​

ParameterDescriptionRequired
modelModel IDYes
contentMultimodal content array: prompt and reference assetsYes
generate_audiotrue: video includes synced audio. false: silent video.No
ratioAspect ratio: 16:9, 4:3, 1:1, 3:4, 9:16, 21:9, adaptiveNo
durationLength in seconds. Default 5. Range 4–15.No
watermarktrue: with watermark. false: without watermark.No
resolution480p, 720p, or 1080p. Default 720p.No

Models ​

ModelResolutions
doubao-seedance-2-0-260128480p, 720p, 1080p
doubao-seedance-2-0-fast-260128480p, 720p
doubao-seedance-2-0-mini-260615480p, 720p

content array ​

Text (prompt) ​

FieldDescription
typeAlways "text"
textPrompt describing the video

Reference image ​

FieldDescription
typeAlways "image_url"
image_url.urlPublic 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 ​

FieldDescription
typeAlways "video_url"
video_url.urlPublic 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 ​

FieldDescription
typeAlways "audio_url"
audio_url.urlPublic 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 ​

  1. Video generation is asynchronous. Query the task for the final result.
  2. Assets are deleted from time to time. Do not use the asset API as long-term storage.
  3. Asset IDs use the form asset:// + asset ID
  4. The fast and mini models do not support 1080p