Generate with Motion 1.0 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.

πŸ“˜

Tip

The API endpoint to upload init images or dataset images will 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. The image ID returned from the presigned URL can be used in the sample request below.

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
}
'