Veo 3.1 Lite
This guide shows how to generate videos using the Veo 3.1 Lite model via the Leonardo.AI REST API.
Sample Request
curl --request POST \
--url https://cloud.leonardo.ai/api/rest/v2/generations \
--header 'accept: application/json' \
--header 'authorization: Bearer <YOUR_API_KEY>' \
--header 'content-type: application/json' \
--data '
{
"model": "veo-3.1-lite",
"public": false,
"parameters": {
"prompt": "A koala and a cat playing together in a sunlit meadow",
"quantity": 1,
"width": 1280,
"height": 720,
"mode": "RESOLUTION_720",
"duration": 8,
"motion_has_audio": true
}
}
'API Request Endpoint, Headers, Parameters
Endpoint
https://cloud.leonardo.ai/api/rest/v2/generationsHeaders
--header "accept: application/json" \
--header "authorization: Bearer <YOUR_API_KEY>" \
--header "content-type: application/json"Body Parameters
| Parameter | Type | Definition |
|---|---|---|
| audio | boolean | Optional. Whether the video generation will include audio. Defaults to True. |
| duration | integer | Optional. Duration of the video in seconds. Accepts 4, 6, 8. Defaults to 8. |
| guidances | object | Optional. Object defining guidance inputs (e.g. reference images, start/end frames) that influence the result. |
| guidances.end_frame | array | Optional. Creative reinterpretation of vibe or structure from a reference image. Maximum 1 item. Each item includes image.id and image.type (INIT, GENERATION, UPLOADED, GENERATED, VARIATION). |
| guidances.start_frame | array | Optional. Creative reinterpretation of vibe or structure from a reference image. Maximum 1 item. Each item includes image.id and image.type (INIT, GENERATION, UPLOADED, GENERATED, VARIATION). |
| height | integer | Optional. Height of the output in pixels. Accepts 720, 1080, 1280, 1920. Defaults to 720. |
| mode | string | Optional. Resolution mode for the generation. Accepts RESOLUTION_720, RESOLUTION_1080. Defaults to RESOLUTION_720. |
| model | string | Required. Specifies the model used for generation. Set to veo-3.1-lite. |
| motion_has_audio | boolean | Optional. Whether the video generation will include audio. Defaults to True. |
| negative_prompt | string | Optional. The negative prompt to use for the generation. Maximum 1000 characters. |
| prompt | string | Required. The prompt to use for the generation. Maximum 9999 characters. |
| public | boolean | Optional. Controls whether the generation is public (true) or private (false). |
| quantity | integer | Required. The number of outputs to generate. Defaults to 1. Range 1-1. |
| seed | number | Optional. The seed value for generation. |
| width | integer | Optional. Width of the output in pixels. Accepts 720, 1080, 1280, 1920. Defaults to 1280. |
Dimensions
The API accepts the following width and height values (in pixels), per the v2 API schema:
| Parameter | Allowed values (px) |
|---|---|
| width | 720, 1080, 1280, 1920 |
| height | 720, 1080, 1280, 1920 |
Defaults: width 1280, height 720.
The mode parameter accepts: RESOLUTION_720, RESOLUTION_1080.
