Seedance 2.0

This guide shows how to generate videos using the Seedance 2.0 model 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 and a cat playing together in a sunlit meadow",
    "quantity": 1,
    "width": 1280,
    "height": 720,
    "mode": "RESOLUTION_720",
    "duration": 8,
    "motion_has_audio": true
  }
}
'

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

ParameterTypeDefinition
durationintegerOptional. Duration of the video in seconds. Accepts 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15. Defaults to 8.
guidancesobjectOptional. Object defining guidance inputs (e.g. reference images, start/end frames) that influence the result.
guidances.audio_referencearrayOptional. Maximum 1 item.
guidances.end_framearrayOptional. Creative reinterpretation of vibe or structure from a reference image. Maximum 1 item. Each item includes image.id and image.type (INIT, GENERATION, UPLOADED, GENERATED, VARIATION).
guidances.image_referencearrayOptional. References images to guide your video generation. Maximum 4 items. Each item includes image.id and image.type (INIT, GENERATION, UPLOADED, GENERATED, VARIATION), strength (LOW, MID, HIGH).
guidances.start_framearrayOptional. Creative reinterpretation of vibe or structure from a reference image. Maximum 1 item. Each item includes image.id and image.type (INIT, GENERATION, UPLOADED, GENERATED, VARIATION).
guidances.video_reference_basearrayOptional. Maximum 3 items.
heightintegerOptional. Height of the output in pixels. Defaults to 720.
modestringOptional. Resolution mode for the generation. Accepts RESOLUTION_480, RESOLUTION_720, RESOLUTION_1080. Defaults to RESOLUTION_720.
modelstringRequired. Specifies the model used for generation. Set to seedance-2.0.
motion_has_audiobooleanOptional. Whether the video generation will include audio. Defaults to True.
promptstringRequired. The prompt to use for the generation. Maximum 5000 characters.
publicbooleanOptional. Controls whether the generation is public (true) or private (false).
quantityintegerRequired. The number of outputs to generate. Defaults to 1. Range 1-1.
seednumberOptional. The seed value for generation. Defaults to -1.
widthintegerOptional. Width of the output in pixels. Defaults to 1280.

Dimensions

The API accepts integer width and height values in pixels. Defaults to 1280 x 720.

The mode parameter accepts: RESOLUTION_480, RESOLUTION_720, RESOLUTION_1080.