Generate with Motion 2.0 Using Text Prompts
Example for generating a video from text
Follow this recipe to generate video using text:
πΉ
Generate with Motion 2.0 Using Text Prompts
Open Recipe
The guide will recreate the following functionality in the Web UI via API.'

Sample Request
curl --request POST \
--url https://cloud.leonardo.ai/api/rest/v1/generations-text-to-video \
--header 'accept: application/json' \
--header 'authorization: Bearer <YOUR_API_KEY>' \
--header 'content-type: application/json' \
--data '
{
"height": 480,
"width": 832,
"prompt": "A dog walking on the beach",
"frameInterpolation": true,
"isPublic": false,
"promptEnhance": true
}
'
Smooth Video
Applying
frameInterpolation:true
is the same as applying Smooth Video from the Advanced Settings tab
Video Dimensions
Use the following width and height combinations to achieve the supported video dimensions.
Video Dimension | Width | Height |
---|---|---|
9:16 | 480 | 832 |
16:9 | 832 | 480 |
2:3 | 512 | 768 |
4:5 | 576 | 720 |
Style
Choose a combination of Vibe, Lighting, Shot Type, and Color Theme. Make sure to choose only one or none of each of the four style types similar to the web app.

Vibe
Vibe Option | Style ID |
---|---|
Clay | 964d8a8f-865b-48c5-b79e-e75ae8727648 |
Color Sketch | 9cdfea2a-b4ab-4e97-a558-ec9fcb78f30a |
Logo | 12b0d8c9-5cf8-4094-a3e5-6809bc269e21 |
Papercraft | c4ac9781-8624-4b7d-bbed-dedaaf7b9da6 |
Pro Photo | 28a53b2e-eb80-41d7-8360-208068fecf49 |
Sci-Fi | d28c8f2b-22bb-4c0c-893d-d3835e28f2f7 |
Sketch | 6078b232-d1be-4a01-9c10-95c05132a8e4 |
Stock Footage | d760b628-4a1d-41cb-bccb-053a13973b94 |
Streetshot | 5658d8ce-d486-4501-a701-7832395a8962 |
Lighting
Lighting Option | Style ID |
---|---|
Backlight | c39fe4f8-76d6-4aad-899b-e7ca5a4148f3 |
Candle Lit | 7d36972e-b9d5-46c7-813d-2c9934f9321b |
Chiaroscuro | ff9bfd01-a7ac-4556-889a-25dd5fc0956f |
Film Haze | be32c760-2bb3-49ae-83dc-6f9b2d62a97f |
Foggy | 1d6e92d2-6e83-4ea2-bd4c-34ddfedfa163 |
Golden Hour | 3f705252-1197-4f59-b6ed-21625dce6a65 |
Hardlight | 64b84d56-8b76-4367-95a6-df345a909af0 |
Lens Flare | 4b60b356-a4ab-4983-9e9a-30e0d5b27bc6 |
Light Art | 771bc1bd-0f88-4ff9-af63-f646847ed075 |
Low Key | 1974bd47-75bb-499a-9c7a-354913904fcf |
Luminous | 994e33e6-4862-495d-9efb-d9a09ecdd769 |
Mystical | acb9deb3-31e3-495e-ab31-b138fde26bd6 |
Rainy | fa347beb-6d70-482d-94a8-a70736e9e7f1 |
Soft Light | 746e70e5-ab4d-4f39-9057-75698cb64bc2 |
Volumetric | 92c2d8d4-9757-4cbf-88f3-d7ea54c425af |
Shot Type
Shot Type Option | Style ID |
---|---|
Bokeh | 2e2669d5-4473-4ab9-b476-9f0a314bf661 |
Cinematic | a0f4907f-8cd0-41de-b67c-460ec3a2bda0 |
Close Up | ba6baeab-1a8f-4cb8-b0f5-efc13a805371 |
Overhead | 8eb75811-5148-40ac-8abc-531e64f6e269 |
Spiritual | 8b5f5d7f-fd3f-4235-92a4-baa9f8507fbb |
Spooky | 49dfd828-5473-4594-9187-c6129aeaa4bf |
Color Theme
Color Theme Option | Style ID |
---|---|
Autumn | 21b0a3e9-304a-4ff2-9603-15ddbc5a6b82 |
Complimentary | dcfb60ca-f165-407f-b01c-2b34d22432c2 |
Cool | 913efd9b-1da8-4876-91d3-b6de0aa5582c |
Dark | 9581d460-7023-4d85-b440-9fea8bbfe194 |
Earthy | 9517dd8e-9588-4fe5-aede-6711438dd420 |
Electric | d26aded5-e191-45d5-9662-db36b7085a76 |
Iridescent | 2380bd07-caf1-4ae6-a348-3bcf4b12f90a |
Pastel | 6c27f994-2e03-4d07-95b8-4a5db5bd3a27 |
Split | 1bffb3f3-4110-4185-85f9-f7254ae6f81d |
Terracotta Teal | 46af026e-d21a-4cf4-a0c0-b482e6800331 |
Ultraviolet | 9243b709-ed08-49d9-9198-440f2127d3b5 |
Vibrant | f84bbf31-1d72-415d-ae4c-deb4b18fccba |
Warm | d838fb14-9719-44f3-877e-da70d072b79c |
Sample Request with Style
curl --request POST \
--url https://cloud.leonardo.ai/api/rest/v1/generations-text-to-video \
--header 'accept: application/json' \
--header 'authorization: Bearer <YOUR_API_KEY>' \
--header 'content-type: application/json' \
--data '
{
"height": 480,
"width": 832,
"prompt": "A dog walking on the beach",
"frameInterpolation": true,
"isPublic": false,
"promptEnhance": true,
"styleIds": [
"28a53b2e-eb80-41d7-8360-208068fecf49",
"3f705252-1197-4f59-b6ed-21625dce6a65",
"d838fb14-9719-44f3-877e-da70d072b79c"
]
}
'
Cost
The Text-to-Video endpoint costs 250 API Credits per video.
Width x Height (Size) | Length | API Credit Cost |
---|---|---|
480 x 832 (9:16) | 5 seconds | 250 |
832 x 480 (16:9) | 5 seconds | 250 |
512 x 768 (2:3) | 5 seconds | 250 |
576 x 720 (4:5) | 5 seconds | 250 |
Updated 8 days ago