LTX 2.3

This guide shows how to generate videos using LTX Video 2.3 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 '{
  "request": {
    "model": "ltxv-2.3-pro",
    "public": false,
    "parameters": {
      "prompt": "<Your_PROMPT>",
      "mode": "RESOLUTION_1080",
      "prompt_enhance": "AUTO",
      "quantity": 1,
      "duration": 8,
      "audio": true,
      "width": 1920,
      "height": 1080,
      "guidances": {
      "start_frame": [
        {
          "image": {
            "id": "<YOUR_START_IMAGE_ID>",
            "type": "GENERATED"
          }
        }
      ],
      "end_frame": [
        {
          "image": {
            "id": "<YOUR_END_IMAGE_ID>",
            "type": "UPLOADED"
      ]
    }
  }
}'

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

ParameterTypeDefinition
modelstringSpecifies the model used for generation. Set to ltxv-2.3-pro or ltxv-2.3-fast.
publicbooleanControls whether the generated video is public (true) or private (false).
promptstringText description of the video content to generate.
prompt_enhancestringControls whether prompt enhancement is applied. Set to ON, OFF, or AUTO.
quantitynumberNumber of videos to generate per request. Max 1.
durationnumberLength of the generated video in seconds. Pro: 6, 8, 10 (default: 8). Fast: 6, 8, 10, 12, 14, 16, 18, 20 (default: 8).
seednumberOptional. Seed value for reproducible generation.
widthnumberSets the width of the video in pixels. Default 1920.
heightnumberSets the height of the video in pixels. Default 1080. Set width: 1080, height: 1920 for 9:16 portrait.
modestringResolution tier. Set to RESOLUTION_1080 (default), RESOLUTION_1440, or RESOLUTION_2160.
motion_has_audiobooleanWhether to generate audio for the video. Default true.
guidances.start_framearrayOptional. Single image to use as the starting frame (image-to-video). Max 1 item.
guidances.end_framearrayOptional. Single image to use as the ending frame (transition video). Requires start_frame to also be set. Max 1 item.

Dimensions

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


Text-to-Video

ResolutionAspect RatioPixel Values (Width × Height)
1080p16:91920 × 1080
1080p9:161080 × 1920
1440p16:92560 × 1440
1440p9:161440 × 2560
2160p16:93840 × 2160
2160p9:162160 × 3840

Image-to-Video

Image-to-video may specify height and width for cropping, or set both to 0 to default to the source image's aspect ratio.

Note: When width and height are not specified, and guidances.start_frame is specified, the generation will base the dimensions on the guidances.start_frame image.