Seedance 2.5 Flash

This guide shows how to generate videos using the Seedance 2.5 Flash 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": "bytedance/seedance-2.5-flash",
  "public": false,
  "parameters": {
    "prompt": "A koala and a cat playing together in a sunlit meadow",
    "quantity": 1,
    "width": 1280,
    "height": 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 through 30 in whole-second increments. Defaults to 8.
guidancesobjectOptional. Object defining guidance inputs (e.g. reference images, audio, base video, start/end frames) that influence the result.
guidances.audio_referencearrayOptional. Audio clips used as generation references. Maximum 5 items. Each item must be 2–30 seconds. Requires an image reference or a video reference; a start or end frame does not count. Each item includes audio.id and audio.type (UPLOADED, GENERATED), and optionally audio.duration.
guidances.end_framearrayOptional. Creative reinterpretation of vibe or structure from a reference image. Maximum 1 item. Each item includes image.type (UPLOADED, GENERATED, VARIATION, URL, BASE64) and image.id, or image.url when type is URL, or image.data when type is BASE64. Optionally image.width, image.height.
guidances.image_referencearrayOptional. References images to guide your video generation. Maximum 10 items. Each item includes image.type (UPLOADED, GENERATED, VARIATION, URL, BASE64) and image.id, or image.url when type is URL, or image.data when type is BASE64. Optionally image.width, image.height, and order.
guidances.start_framearrayOptional. Creative reinterpretation of vibe or structure from a reference image. Maximum 1 item. Each item includes image.type (UPLOADED, GENERATED, VARIATION, URL, BASE64) and image.id, or image.url when type is URL, or image.data when type is BASE64. Optionally image.width, image.height.
guidances.video_reference_basearrayOptional. Base video to be edited. Maximum 5 items. Each item must be 2–30 seconds. Each item includes video.id and video.type (UPLOADED, GENERATED), and optionally video.width, video.height, video.duration, video.motion_has_audio.
heightintegerOptional. Height of the output in pixels. If you send height, also send width. Must form a supported pair (see Dimensions). Defaults to 720.
modelstringRequired. Specifies the model used for generation. Set to bytedance/seedance-2.5-flash.
motion_has_audiobooleanOptional. Whether the video generation will include audio. Defaults to true.
omni_editbooleanOptional. Controls how a guidances.video_reference_base item without a type is handled. true treats the video as a base to edit (edit-video); false or omitted treats it as a reference for a new video (reference-to-video).
promptstringRequired. The prompt to use for the generation. Maximum 9999 characters.
publicbooleanOptional. Controls whether the generation is public (true) or private (false).
quantityintegerRequired. The number of outputs to generate. Must be 1. Defaults to 1.
widthintegerOptional. Width of the output in pixels. If you send width, also send height. Must form a supported pair (see Dimensions). Defaults to 1280.

Dimensions

The API accepts width and height parameters in the following aspect ratio combinations. Defaults to 1280 x 720.

ResolutionAspect RatioPixel Values (Width x Height)
480p16:9 (Landscape)854x480
4:3 (Landscape)752x560
1:1 (Square)640x640
3:4 (Portrait)560x752
9:16 (Portrait)480x854
21:9 (Ultra-wide)992x432
720p16:9 (Landscape)1280x720
4:3 (Landscape)1112x834
1:1 (Square)960x960
3:4 (Portrait)834x1112
9:16 (Portrait)720x1280
21:9 (Ultra-wide)1470x630

Did this page help you?