Seedance 2.0

This guide shows how to generate videos using Seedance 2.0 and Seedance 2.0 Fast models via the Leonardo.AI REST API.

Sample Request

curl --request POST \
     --url https://cloud.leonardo.ai/api/rest/v2/generations \
     --header 'accept: application/json' \
     --header 'authorization: Bearer <YOUR_API_KEY>' \
     --header 'content-type: application/json' \
     --data '
{
    "model": "seedance-2.0",
    "public": false,
    "parameters": {
      "prompt": "A koala plays with a cat in a sunny garden",
      "guidances": {
        "start_frame": [
          {
            "image": {
              "id": "<YOUR_START_IMAGE_ID>",
              "type": "UPLOADED"
            }
          }
        ],
        "end_frame": [
          {
            "image": {
              "id": "<YOUR_END_IMAGE_ID>",
              "type": "GENERATED"
            }
          }
        ]
      },
      "duration": 8,
      "mode": "RESOLUTION_720",
      "prompt_enhance": "OFF",
      "width": 1280,
      "height": 720
    }
}
'

Recipe

API Request Endpoint, Headers, Parameters

Endpoint

https://cloud.leonardo.ai/api/rest/v2/generations

Headers

--header "accept: application/json" \
--header "authorization: Bearer <YOUR_API_KEY>" \
--header "content-type: application/json"

Body Parameters

Both Seedance 2.0 and Seedance 2.0 Fast models share the same parameters.

ParameterTypeDefinition
durationintegerLength of the generated video in seconds. Set to 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, or 15. Defaults to 8.
guidances.end_framearrayMaximum 1 item. Each item includes image.id and image.type (GENERATED or UPLOADED). Only available when start_frame is provided.
guidances.image_referencearrayMaximum 4 items. Reference images to guide style and composition. Incompatible with start_frame and end_frame.
guidances.start_framearrayMaximum 1 item. Each item includes image.id and image.type (GENERATED or UPLOADED).
guidances.video_reference_basearrayMaximum 3 items. Reference videos to guide motion. Incompatible with start_frame and end_frame.
heightintegerSets the height of the output video in pixels. Set to 0 to automatically use the source image's aspect ratio (image-to-video only).
modelstringSpecifies the model used for generation. Set to seedance-2.0 or seedance-2.0-fast.
modestringResolution tier. Set to RESOLUTION_480 for Standard (480p) or RESOLUTION_720 for HD (720p). Defaults to RESOLUTION_720.
motion_has_audiobooleanWhen set to true, generates native audio including dialogue, narration, sound effects, and ambient sounds. Defaults to false.
promptstringText description of the video content to generate. Maximum of 1500 characters.
prompt_enhancestringEnables or disables prompt enhancement. Automatically disabled when start_frame is set.
publicbooleanControls whether the generated video is public (true) or private (false).
quantityintegerNumber of videos to generate. Maximum 1. Defaults to 1.
seedintegerRandom seed for reproducibility. Range: 0โ€“4294967295. Set to -1 for random. Defaults to -1.
widthintegerSets the width of the output video in pixels. Set to 0 to automatically use the source image's aspect ratio (image-to-video only).

Constraints

Both models share the same constraints.

  • end_frame requires start_frame to also be set.
  • guidances.image_reference is incompatible with start_frame and end_frame.
  • guidances.video_reference_base is incompatible with start_frame and end_frame.
  • Setting start_frame automatically disables prompt_enhance.

Dimensions

The API accepts width and height parameters in the following aspect ratio combinations. Both models use the same dimensions, determined by the mode parameter.

For image-to-video, set width: 0 and height: 0 to automatically use the source image's aspect ratio.

ResolutionAspect Ratio(Width x Height)
480p21:9992x432
16:9864x496
4:3752x560
1:1640x640
3:4560x752
9:16496x864
9:21432x992
720p (default)21:91470x630
16:91280x720
4:31112x834
1:1960x960
3:4834x1112
9:16720x1280
9:21630x1470