Generate with SeeDance 1.0

Guide for generating videos with SeeDance using start and end frames, and image references

Follow this recipe to generate video using start and end frames:

Follow this recipe to generate video using image references:


Core Parameters

  • model
    • Set toseedance-1.0-lite to use SeeDance 1.0 Lite.
      • Text-to-Video
      • Image-to-Video-Reference Images (ability to add 1-4 images that are referenced when creating a video)
      • 720p support only
      • Image-to-Video-First Frame
      • Image-to-Video-First Frame and Last Frame
    • Set toseedance-1.0-pro to use SeeDance 1.0 Pro.
      • Text-to-Video
      • Image-to-Video-First Frame
      • Image-to-Video-First Frame and Last Frame
    • Set toseedance-1.0-pro-fast to use SeeDance 1.0 Pro Fast.
      • Text-to-Video
      • Image-to-Video-First Frame
  • prompt
    • Type: string
    • Max length: 1500 characters
    • Description: Text description of the video content to generate
  • duration
    • Type: integer
    • Valid values: 4, 6, 8, 10
    • Unit: seconds
    • Description: Length of the generated video

Dimensions

The API accepts width and height parameters in the following aspect ratio combinations:

Resolution

Aspect Ratio

Pixel Values (Width x Height)

480p

16:9 (Landscape)

864x480

4:3

736x544

1:1 (Square)

640x640

3:4

544x736

9:16 (Portrait)

480x864

21:9

960x416

720p

16:9 (Landscape)

1248x704

4:3

1120x832

1:1 (Square)

960x960

3:4

832x1120

9:16 (Portrait)

704x1248

21:9

1504x640

1080p
(Reference Image feature is not supported)

16:9 (Landscape)

1920x1088

4:3

1664x1248

1:1 (Square)

1440x1440

3:4

1248x1664

9:16 (Portrait)

1088x1920

21:9

2176x928

Guidances

The guidances object contains optional start/end frames, and image reference configurations.

📘

Note:

  • For best results, choose a start_frameandend_frame that matches the aspect ratio you want to generate.
  • start_frame/end_frame cannot be used with image_reference.
  • start_frame, end_frame, and image_reference can either be uploaded to Leonardo (type: "UPLOADED"), or generated on the platform (type: "GENERATED")
  • Up to 5 image references are supported.
  • start_frame
    • Type: array
    • Max items: 1
    • Condition: Only available when NO image_reference is provided
    • Items: Each item is an object containing:
      • image (object):
        • id (string, uuid format)
        • type (enum: "UPLOADED", "GENERATED")
  • end_frame
    • Type: array
    • Max items: 1
    • Conditions:
      • Only available when NO image_reference is provided
      • Only available when start_frame IS provided
    • Items: Each item is an object containing:
      • image (object):
        • id (string, uuid format)
        • type (enum: "UPLOADED", "GENERATED")
  • image_reference
    • Type: array
    • Max items: 4
    • Condition: Only available when NO start_frame or end_frame is provided
    • Items: Each item is an object containing:
      • image (object):
        • id (string, uuid format)
        • type (enum: "UPLOADED", "GENERATED")

Sample Request Using Start and End Frames

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-1.0-pro",
    "public": false,
    "parameters": {
      "prompt": "The koala plays with the cat",
      "guidances": {
        "start_frame": [
          {
            "image": {
              "id": "<YOUR_START_IMAGE_ID>",
              "type": "UPLOADED"
            }
          }
        ],
        "end_frame": [
          {
            "image": {
              "id": "<YOUR_END_IMAGE_ID>",
              "type": "UPLOADED"
            }
          }
        ]
      },
      "duration": 4,
      "mode": "RESOLUTION_1080",
      "prompt_enhance": "OFF",
      "width": 1920,
      "height": 1088
    }
}
'

Sample Request Using Image Reference (Seedance-1-0-lite support only)

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-1.0-lite",
    "public": false,
    "parameters": {
      "prompt": "The koala plays with the cat",
      "guidances": {
        "image_reference": [
          {
            "image": {
              "id": "<YOUR_IMAGE_ID_1>",
              "type": "GENERATED"
            }
          },
          {
            "image": {
              "id": "<YOUR_IMAGE_ID_2>",
              "type": "UPLOADED"
            }
          }
        ]
      },
      "duration": 4,
      "mode": "RESOLUTION_720",
      "prompt_enhance": "OFF",
      "width": 1248,
      "height": 704
    }
}
'

Cost

API Credit Cost = round_to_nearest_10(BASE_RATE × width × height × duration)

ModelBASE_RATE
Seedance Pro0.000052734375
Seedance Pro-Fast0.00002109375
Seedance Lite0.00003796875