Generate Motion Using Uploaded Images

Example for generating a video (motion) from your own image

Follow this recipe to generate motion using uploaded images:


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

Selecting Images from Recent Generations for Motion

Use Images from Uploaded Images for Motion

Creating Motion with Uploaded Image

Creating Motion with Uploaded Image

πŸ“˜

Tip

The API endpoints to upload init images or dataset images return a presigned URL. Use this URL to upload the image file to S3. View more details on how to create a presigned URL here

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_INIT_IMAGE_ID>",
  "motionStrength": 3,
  "isInitImage": True
}
'