Skip to main content

Veo 3.1 Lite create video (Gemini)

POST 

/v1beta/models/veo-3.1-lite:predictLongRunning

Create an asynchronous Veo 3.1 Lite video generation task with the Gemini REST API (:predictLongRunning).

Call this system's /v1beta/... endpoints. Do not call generativelanguage.googleapis.com or *-aiplatform.googleapis.com.

Auth may use either header:

Authorization: Bearer YOUR_API_KEY
x-goog-api-key: YOUR_API_KEY

Gemini SDK / official REST examples commonly use x-goog-api-key.

Request flow

  1. Call POST /v1beta/models/veo-3.1-lite:predictLongRunning to submit a task
  2. Read name from the response (for example models/veo-3.1-lite/operations/task_xxx)
  3. Poll GET /v1beta/models/veo-3.1-lite/operations/{operation_id} until done is true
  4. Download the video from response.generateVideoResponse.generatedVideos[0].video.uri

This path also accepts:

POST /v1beta/models/veo-3.1-lite:generateVideos

sampleCount is fixed to 1 by the system.

Veo 3.1 Lite does not support 4K. Requesting resolution: 4k returns HTTP 400 (INVALID_ARGUMENT).

Image-to-video uses instances[0].image with bytesBase64Encoded and mimeType. HTTP/HTTPS image URLs, referenceImages, lastFrame, video extension (video), and remix are not guaranteed.

Do not mix this task's poll path with the OpenAI Videos style (GET /v1/videos/{video_id}).

Request example

curl --location 'https://open-api.fancyai.com/v1beta/models/veo-3.1-lite:predictLongRunning' \
--header 'Content-Type: application/json' \
--header 'x-goog-api-key: YOUR_API_KEY' \
--data '{
"instances": [
{
"prompt": "A cat walking on a sunny beach, cinematic camera push-in, native audio"
}
],
"parameters": {
"aspectRatio": "16:9",
"durationSeconds": 8,
"resolution": "720p"
}
}'

Request

Responses

Task submitted successfully