Generate Motion Using Generated Images

Example for generating a video (motion) from images generated on Leonardo.Ai

Follow this recipe to generate motion using generated images:


The guide will recreate the following functionality in the Web UI via API.

Selecting Images from Recent Generations for Motion

Selecting Images from Recent Generations for Motion

Selecting Motion Strength and Visibility for Motion

Selecting Motion Strength and Visibility for Motion

πŸ“˜

Tip

Be sure to use the id from the Get Single Generation API call as the imageIdin your request, instead of the generationId from the Create Generation of Images API call. This way, you'll apply Motion to the exact image you're aiming for, and avoid any errors if applied to the generation of images.

Sample Request

curl --request POST \
     --url https://cloud.leonardo.ai/api/rest/v1/generations-motion-svd \
     --header 'accept: application/json' \
     --header 'authorization: Bearer <YOUR_API_KEY>' \
     --header 'content-type: application/json' \
     --data '
{
  "imageId": "<YOUR_GENERATED_IMAGE_ID>",
  "motionStrength": 3,
  "isPublic": true
}
'