Leonardo.AI Video Generation API

Generate videos from text or images via Kling 2.x/3.x, LTX 2.x, Veo 3.x, Seedance, Hailuo, and Stable Video Diffusion motion models. Three endpoints cover image-to-video, text-to-video, and SVD motion. Jobs are asynchronous; poll the variation/motion endpoints or use a webhook for completion.

Leonardo.AI Video Generation API is one of 14 APIs that Leonardo.AI publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

This API exposes 1 machine-runnable capability that can be deployed as REST, MCP, or Agent Skill surfaces via Naftiko.

Tagged areas include AI, Video Generation, and Motion. The published artifact set on APIs.io includes API documentation, an OpenAPI specification, and 1 Naftiko capability spec.

OpenAPI Specification

leonardo-ai-video-generation-openapi.json Raw ↑
{
  "openapi": "3.0.0",
  "info": {
    "title": "Leonardo.AI Video Generation API",
    "description": "Generate videos from text or images using Kling, LTX, Veo, Seedance, Hailuo and Stable Video Diffusion motion models. Supports image-to-video, text-to-video, and SVD motion.",
    "version": "v1.0.0",
    "contact": {
      "name": "Leonardo.AI Support",
      "url": "https://docs.leonardo.ai/docs/need-more-support"
    },
    "license": {
      "name": "Leonardo.AI Terms of Service",
      "url": "https://leonardo.ai/terms-of-service/"
    }
  },
  "servers": [
    {
      "url": "https://cloud.leonardo.ai/api/rest/v1",
      "description": "Leonardo.AI Production API"
    }
  ],
  "tags": [
    {
      "name": "Motion"
    }
  ],
  "paths": {
    "/generations-motion-svd": {
      "post": {
        "tags": [
          "Motion"
        ],
        "summary": "Create SVD Motion Generation",
        "description": "This endpoint will generate a SVD motion generation.",
        "operationId": "createSVDMotionGeneration",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "imageId": {
                    "nullable": false,
                    "title": "String",
                    "type": "string",
                    "description": "The ID of the image, supports generated images, variation images, and init images."
                  },
                  "isPublic": {
                    "$ref": "#/components/schemas/public"
                  },
                  "isInitImage": {
                    "$ref": "#/components/schemas/isInitImage"
                  },
                  "isVariation": {
                    "$ref": "#/components/schemas/isVariation"
                  },
                  "motionStrength": {
                    "$ref": "#/components/schemas/motionStrength"
                  }
                },
                "type": "object",
                "required": [
                  "imageId"
                ]
              }
            }
          },
          "description": "Query parameters can also be provided in the request body as a JSON object",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "motionSvdGenerationJob": {
                      "nullable": true,
                      "properties": {
                        "generationId": {
                          "nullable": false,
                          "title": "String",
                          "type": "string"
                        },
                        "apiCreditCost": {
                          "$ref": "#/components/schemas/apiCreditCost"
                        },
                        "cost": {
                          "$ref": "#/components/schemas/cost"
                        }
                      },
                      "title": "MotionSvdGenerationOutput",
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "motionSvdGenerationJob": {
                    "generationId": "h7i8j9k0-l1m2-n3o4-pqrs-tu6789012345",
                    "apiCreditCost": null,
                    "cost": {
                      "amount": "0.0147",
                      "unit": "DOLLARS"
                    }
                  }
                }
              }
            },
            "description": "Responses for POST /generations-motion-svd"
          }
        }
      }
    },
    "/generations-image-to-video": {
      "post": {
        "tags": [
          "Motion"
        ],
        "summary": "Create a video generation from an image",
        "description": "This endpoint will generate a video using an uploaded or generated image.",
        "operationId": "createImageToVideoGeneration",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "prompt": {
                    "nullable": false,
                    "title": "String",
                    "type": "string",
                    "description": "The prompt used to generate video"
                  },
                  "imageId": {
                    "nullable": false,
                    "title": "String",
                    "type": "string",
                    "description": "The ID of the image, supports generated images and init images. Use only image or imageId with imageType."
                  },
                  "imageType": {
                    "type": "string",
                    "nullable": false,
                    "enum": [
                      "GENERATED",
                      "UPLOADED"
                    ],
                    "description": "Type indicating whether the init image is uploaded or generated. Use only image or imageId with imageType."
                  },
                  "endFrameImage": {
                    "nullable": true,
                    "title": "Object",
                    "type": "object",
                    "description": "The end frame image. Supported only on kling2_1 model when used in conjunction with an init image.",
                    "properties": {
                      "id": {
                        "nullable": false,
                        "title": "String",
                        "type": "string",
                        "description": "The ID of the end frame image."
                      },
                      "type": {
                        "nullable": false,
                        "title": "String",
                        "type": "string",
                        "enum": [
                          "GENERATED",
                          "UPLOADED"
                        ],
                        "description": "Type indicating whether the end frame image is uploaded or generated."
                      }
                    },
                    "required": [
                      "id",
                      "type"
                    ]
                  },
                  "resolution": {
                    "nullable": true,
                    "title": "String",
                    "enum": [
                      "RESOLUTION_480",
                      "RESOLUTION_720",
                      "RESOLUTION_1080"
                    ],
                    "description": "The resolution of the output video. Acceptable values vary based on model"
                  },
                  "model": {
                    "nullable": true,
                    "title": "String",
                    "enum": [
                      "MOTION2",
                      "VEO3",
                      "MOTION2FAST",
                      "VEO3FAST",
                      "KLING2_1",
                      "KLING2_5"
                    ],
                    "description": "The model to use for the video generation. Defaults to MOTION2 if not specified.",
                    "default": "MOTION2"
                  },
                  "frameInterpolation": {
                    "nullable": true,
                    "title": "Boolean",
                    "type": "boolean",
                    "description": "Smoothly blend frames for fluid video transitions using Interpolation."
                  },
                  "isPublic": {
                    "$ref": "#/components/schemas/public"
                  },
                  "seed": {
                    "type": "integer",
                    "nullable": true,
                    "title": "seed",
                    "description": "Apply a fixed seed to maintain consistency across generation sets. The maximum seed value is 2147483637 for Motion 2.0."
                  },
                  "negativePrompt": {
                    "nullable": true,
                    "title": "String",
                    "type": "string",
                    "description": "The negative prompt used for the video generation."
                  },
                  "promptEnhance": {
                    "nullable": true,
                    "title": "Boolean",
                    "type": "boolean",
                    "description": "Whether to enhance the prompt."
                  },
                  "duration": {
                    "nullable": true,
                    "title": "Integer",
                    "type": "integer",
                    "description": "Duration of the output video in seconds. Allowed values: 4, 6, or 8 on models VEO3 and VEO3FAST (default: 8) and 5 or 10 on model KLING2_5 (default: 5)."
                  },
                  "promptEnhanceInstruction": {
                    "nullable": true,
                    "title": "String",
                    "type": "string",
                    "description": "A natural language instruction used to modify the main prompt. For example, 'make it cinematic', 'add a rainbow', or 'change the subject to a cat'."
                  },
                  "styleIds": {
                    "nullable": true,
                    "title": "Array of Strings",
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Predefined styles to enhance the prompt. This accepts a list of style uuids."
                  },
                  "elements": {
                    "nullable": true,
                    "title": "Array of Element Inputs",
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/element_input"
                    },
                    "description": "An array of elements/loras objects that will be applied sequentially to the output. Elements are only supported for Motion2.0 generations. "
                  },
                  "height": {
                    "nullable": true,
                    "title": "Integer",
                    "type": "integer",
                    "description": "Height of the output video. Acceptable values vary based on model"
                  },
                  "width": {
                    "nullable": true,
                    "title": "Integer",
                    "type": "integer",
                    "description": "Width of the output video. Acceptable values vary based on model"
                  }
                },
                "type": "object",
                "required": [
                  "prompt",
                  "imageId",
                  "imageType"
                ]
              }
            }
          },
          "description": "Query parameters can also be provided in the request body as a JSON object",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "motionVideoGenerationJob": {
                      "nullable": true,
                      "properties": {
                        "generationId": {
                          "nullable": false,
                          "title": "String",
                          "type": "string"
                        },
                        "apiCreditCost": {
                          "$ref": "#/components/schemas/apiCreditCost"
                        },
                        "cost": {
                          "$ref": "#/components/schemas/cost"
                        }
                      },
                      "title": "MotionVideoGenerationOutput",
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "motionVideoGenerationJob": {
                    "generationId": "i8j9k0l1-m2n3-o4p5-qrst-uv7890123456",
                    "apiCreditCost": null,
                    "cost": {
                      "amount": "0.0147",
                      "unit": "DOLLARS"
                    }
                  }
                }
              }
            },
            "description": "Responses for POST /generations-image-to-video"
          }
        }
      }
    },
    "/generations-text-to-video": {
      "post": {
        "tags": [
          "Motion"
        ],
        "summary": "Create a video generation from a text prompt",
        "description": "This endpoint will generate a video using a text prompt",
        "operationId": "createTextToVideoGeneration",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "prompt": {
                    "nullable": false,
                    "title": "String",
                    "type": "string",
                    "description": "The prompt used to generate video"
                  },
                  "resolution": {
                    "nullable": true,
                    "title": "String",
                    "enum": [
                      "RESOLUTION_480",
                      "RESOLUTION_720",
                      "RESOLUTION_1080"
                    ],
                    "description": "The resolution of the output video. Acceptable values vary based on model"
                  },
                  "model": {
                    "nullable": true,
                    "title": "String",
                    "enum": [
                      "MOTION2",
                      "VEO3",
                      "MOTION2FAST",
                      "VEO3FAST",
                      "KLING2_1",
                      "KLING2_5"
                    ],
                    "description": "The model to use for the video generation. Defaults to MOTION2 if not specified.",
                    "default": "MOTION2"
                  },
                  "frameInterpolation": {
                    "nullable": true,
                    "title": "Boolean",
                    "type": "boolean",
                    "description": "Smoothly blend frames for fluid video transitions using Interpolation."
                  },
                  "isPublic": {
                    "$ref": "#/components/schemas/public"
                  },
                  "seed": {
                    "type": "integer",
                    "nullable": true,
                    "title": "seed",
                    "description": "Apply a fixed seed to maintain consistency across generation sets. The maximum seed value is 2147483637 for Motion 2.0 and 4294967293 for Veo3."
                  },
                  "negativePrompt": {
                    "nullable": true,
                    "title": "String",
                    "type": "string",
                    "description": "The negative prompt used for the video generation."
                  },
                  "promptEnhance": {
                    "nullable": true,
                    "title": "Boolean",
                    "type": "boolean",
                    "description": "Whether to enhance the prompt."
                  },
                  "promptEnhanceInstruction": {
                    "nullable": true,
                    "title": "String",
                    "type": "string",
                    "description": "A natural language instruction used to modify the main prompt. For example, 'make it cinematic', 'add a rainbow', or 'change the subject to a cat'."
                  },
                  "styleIds": {
                    "nullable": true,
                    "title": "Array of Strings",
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Predefined styles to enhance the prompt. This accepts a list of style uuids."
                  },
                  "height": {
                    "nullable": true,
                    "title": "Integer",
                    "type": "integer",
                    "description": "Height of the output video. Acceptable values vary based on model"
                  },
                  "width": {
                    "nullable": true,
                    "title": "Integer",
                    "type": "integer",
                    "description": "Width of the output video. Acceptable values vary based on model"
                  },
                  "duration": {
                    "nullable": true,
                    "title": "Integer",
                    "type": "integer",
                    "description": "Duration of the output video in seconds. Defaults to 8 seconds if not specified. Allowed values: 4, 6, or 8. Supported on models VEO3 and VEO3FAST.",
                    "default": 8
                  },
                  "elements": {
                    "nullable": true,
                    "title": "Array of Element Inputs",
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/element_input"
                    },
                    "description": "An array of elements/loras objects that will be applied sequentially to the output. Elements are only supported for Motion2.0 generations. "
                  }
                },
                "type": "object",
                "required": [
                  "prompt"
                ]
              }
            }
          },
          "description": "Query parameters can also be provided in the request body as a JSON object",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "motionVideoGenerationJob": {
                      "nullable": true,
                      "properties": {
                        "generationId": {
                          "nullable": false,
                          "title": "String",
                          "type": "string"
                        },
                        "apiCreditCost": {
                          "$ref": "#/components/schemas/apiCreditCost"
                        },
                        "cost": {
                          "$ref": "#/components/schemas/cost"
                        }
                      },
                      "title": "MotionVideoGenerationOutput",
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "motionVideoGenerationJob": {
                    "generationId": "j9k0l1m2-n3o4-p5q6-rstu-vw8901234567",
                    "apiCreditCost": null,
                    "cost": {
                      "amount": "0.0147",
                      "unit": "DOLLARS"
                    }
                  }
                }
              }
            },
            "description": "Responses for POST /generations-text-to-video"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "cost": {
        "nullable": true,
        "type": "object",
        "title": "Cost",
        "description": "The cost of the operation.",
        "properties": {
          "amount": {
            "type": "string",
            "description": "The amount of the cost."
          },
          "unit": {
            "type": "string",
            "enum": [
              "CREDITS",
              "DOLLARS"
            ],
            "description": "The unit of the cost. Can be CREDITS or DOLLARS. Note: DOLLARS unit only supports PAYG plan."
          }
        }
      },
      "Cursor": {
        "type": "string",
        "title": "Cursor",
        "description": "An opaque cursor used for pagination"
      },
      "Blueprint": {
        "type": "object",
        "title": "Blueprint",
        "description": "A Blueprint object",
        "properties": {
          "akUUID": {
            "type": "string",
            "description": "Unique identifier for the Blueprint",
            "example": "c846413e-92ba-4302-84f8-47c667d4761f"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp",
            "example": "2025-10-29T21:31:47.999Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp",
            "example": "2025-12-19T02:34:44.740Z"
          },
          "name": {
            "type": "string",
            "description": "Name of the Blueprint",
            "example": "Golden Hour Relight"
          },
          "description": {
            "type": "string",
            "description": "Description of the Blueprint",
            "example": "Relight an image with warm, golden tones of late afternoon sunlight for a soft and radiant glow."
          },
          "thumbnails": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Thumbnail type name (e.g., thumbnailUrl, videoUrl, thumbnailUrlBanner, thumbnailUrlLandscape, thumbnailUrlExtremePortrait)",
                  "example": "thumbnailUrl"
                },
                "url": {
                  "type": "string",
                  "description": "URL of the thumbnail",
                  "example": "https://cdn.leonardo.ai/blueprint_assets/official/384ab5c8-55d8-47a1-be22-6a274913c324/thumbnails/goldenhour.jpg"
                }
              }
            }
          },
          "teamId": {
            "type": "string",
            "nullable": true,
            "description": "Team ID if Blueprint belongs to a team",
            "example": null
          },
          "official": {
            "type": "boolean",
            "description": "Whether this is an official Blueprint",
            "example": true
          }
        }
      },
      "BlueprintVersion": {
        "type": "object",
        "title": "BlueprintVersion",
        "description": "A Blueprint Version object",
        "properties": {
          "edges": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "cursor": {
                  "type": "string",
                  "example": "eyJjcmVhdGVkQXQiOiIyMDI1LTExLTI3VDA1OjEzOjIxLjg5NloiLCJha1VVSUQiOiI5NTZlOTU2NC0xOWY3LTQ5NjgtYjU2ZC0wNWMyYzU2NzcyNmYifQ=="
                },
                "node": {
                  "type": "object",
                  "properties": {
                    "akUUID": {
                      "type": "string",
                      "format": "uuid",
                      "example": "956e9564-19f7-4968-b56d-05c2c567726f"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-11-27T05:13:21.896Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-11-27T05:13:21.896Z"
                    },
                    "cost": {
                      "type": "integer",
                      "example": 160
                    },
                    "uiMetadata": {
                      "type": "object",
                      "properties": {
                        "inputs": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          }
                        },
                        "outputs": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          }
                        }
                      },
                      "additionalProperties": false
                    },
                    "uiMetadataSchemaVersion": {
                      "type": "string",
                      "example": "21"
                    },
                    "models": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "executability": {
                      "type": "object",
                      "properties": {
                        "isExecutable": {
                          "type": "boolean",
                          "example": true
                        },
                        "reasons": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "models": {
                                "type": "string",
                                "example": "gemini-2.5-flash-image"
                              }
                            }
                          }
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                }
              },
              "additionalProperties": false
            }
          },
          "totalCount": {
            "type": "integer",
            "example": 2
          },
          "pageInfo": {
            "type": "object",
            "properties": {
              "hasNextPage": {
                "type": "boolean",
                "example": false
              },
              "hasPreviousPage": {
                "type": "boolean",
                "example": false
              },
              "startCursor": {
                "type": "string",
                "example": "eyJjcmVhdGVkQXQiOiIyMDI1LTExLTI3VDA1OjEzOjIxLjg5NloiLCJha1VVSUQiOiI5NTZlOTU2NC0xOWY3LTQ5NjgtYjU2ZC0wNWMyYzU2NzcyNmYifQ=="
              },
              "endCursor": {
                "type": "string",
                "example": "eyJjcmVhdGVkQXQiOiIyMDI1LTExLTI3VDA1OjEzOjIxLjg5NloiLCJha1VVSUQiOiI5NTZlOTU2NC0xOWY3LTQ5NjgtYjU2ZC0wNWMyYzU2NzcyNmYifQ=="
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "NodeInput": {
        "type": "object",
        "title": "NodeInput",
        "description": "A node input object for customizing a Blueprint Execution",
        "required": [
          "nodeId",
          "settingName",
          "value"
        ],
        "properties": {
          "nodeId": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the node in the Blueprint",
            "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
          },
          "settingName": {
            "type": "string",
            "enum": [
              "text",
              "imageUrl",
              "textVariables"
            ],
            "description": "The type of setting to replace:\n- `text`: Direct text replacement (value is a string)\n- `imageUrl`: Image URL input (value is a URL string)\n- `textVariables`: Text with placeholder variables (value is an array of TextVariable)",
            "example": "text"
          },
          "value": {
            "oneOf": [
              {
                "type": "string",
                "description": "String value. Use for settingName='text' (direct text) or settingName='imageUrl' (image URL)"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TextVariable"
                },
                "description": "Array of TextVariable objects. Use only for settingName='textVariables' to replace {{placeholders}} in the Blueprint"
              }
            ],
            "description": "The replacement value. Type depends on settingName:\n- `text`: string (the full text)\n- `imageUrl`: string (the image URL)\n- `textVariables`: array of TextVariable objects",
            "example": "A futuristic cityscape at sunset"
          }
        }
      },
      "TextVariable": {
        "type": "object",
        "title": "TextVariable",
        "description": "A text variable for replacing placeholders in Blueprint templates",
        "required": [
          "name",
          "value"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the placeholder variable (without curly braces)",
            "example": "characterName"
          },
          "value": {
            "type": "string",
            "description": "The value to replace the placeholder with",
            "example": "Luna"
          }
        }
      },
      "ApiError": {
        "type": "object",
        "title": "ApiError",
        "description": "API error response structure",
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string",
            "description": "Error message"
          },
          "path": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Path to the field that caused the error"
          },
          "locations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "column": {
                  "type": "integer"
                },
                "line": {
                  "type": "integer"
                }
              }
            },
            "description": "Location information for the error"
          },
          "extensions": {
            "type": "object",
            "description": "Additional error details and context"
          }
        }
      },
      "apiCreditCost": {
        "nullable": true,
        "title": "Int",
        "type": "integer",
        "description": "API credits cost, available for Production API users. Note: it will be deprecated. Please use the cost instead.",
        "deprecated": true
      },
      "isVariation": {
        "nullable": true,
        "title": "Boolean",
        "type": "boolean",
        "description": "If it is a variation image."
      },
      "isInitImage": {
        "nullable": true,
        "title": "Boolean",
        "type": "boolean",
        "description": "If it is an init image uploaded by the user. This image is uploaded from endpoint: Upload init image."
      },
      "imageToVideo": {
        "nullable": true,
        "title": "Boolean",
        "type": "boolean",
        "description": "If it is an image to video generation."
      },
      "sd_versions": {
        "type": "string",
        "nullable": false,
        "title": "sd_versions",
        "enum": [
          "v1_5",
          "v2",
          "v3",
          "SDXL_0_8",
          "SDXL_0_9",
          "SDXL_1_0",
          "SDXL_LIGHTNING",
          "PHOENIX",
          "FLUX",
          "FLUX_DEV",
          "KINO_2_0"
        ],
        "description": "The base version of stable diffusion to use if not using a custom model. v1_5 is 1.5, v2 is 2.1, if not specified it will default to v1_5. Also includes SDXL and SDXL Lightning models"
      },
      "lora": {
        "type": "object",
        "properties": {
          "akUUID": {
            "nullable": true,
            "type": "string",
            "description": "Unique identifier for the element. Elements can be found from the List Elements endpoint."
          },
          "creatorName": {
            "nullable": true,
            "type": "string",
            "description": "Name of the creator of the element"
          },
          "name": {
            "nullable": true,
            "type": "string",
            "description": "Name of the element"
          },
          "description": {
            "nullable": true,
            "type": "string",
            "description": "Description for the element"
          },
          "urlImage": {
            "nullable": true,
            "type": "string",
            "description": "URL of the element image"
          },
          "baseModel": {
    

# --- truncated at 32 KB (53 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/leonardo-ai/refs/heads/main/openapi/leonardo-ai-video-generation-openapi.json