Skip to content

About

Veo 3.1 API — Python wrapper for Veo 3.1, Veo 3.1 Fast and Veo 3.1 Lite on WaveSpeedAI: text-to-video, image-to-video, reference-to-video, video extension.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Veo 3.1 API — Python wrapper

Call Veo 3.1, Veo 3.1 Fast and Veo 3.1 Lite from Python with one function per endpoint: text-to-video, image-to-video, reference-to-video, video extension. Built on the official wavespeed SDK and the WaveSpeedAI hosted API — no GPU, pay per generation.

Veo 3.1 API Try in browser

Quick start

pip install git+https://github.com/WaveSpeedAI/veo-3.1-api.git
export WAVESPEED_API_KEY="your-api-key"   # https://wavespeed.ai/accesskey
import veo_api

urls = veo_api.text_to_video(
    prompt="A slow cinematic dolly shot through a rain-soaked neon night market, reflections on the pavement",
)
print(urls[0])

Every function waits for the generation to finish and returns a list of output URLs. Optional arguments you leave out are not sent, so the API defaults apply. Inputs such as images, videos and audio are passed as URLs; use veo_api.upload("local-file") to get a URL for a local file.

Endpoints

Function Model Type
text_to_video() google/veo3.1/text-to-video text-to-video
image_to_video() google/veo3.1/image-to-video image-to-video
reference_to_video() google/veo3.1/reference-to-video reference-to-video
video_extend() google/veo3.1/video-extend video-extend
fast_text_to_video() google/veo3.1-fast/text-to-video text-to-video
fast_image_to_video() google/veo3.1-fast/image-to-video image-to-video
fast_reference_to_video() google/veo3.1-fast/reference-to-video reference-to-video
fast_video_extend() google/veo3.1-fast/video-extend video-extend
lite_text_to_video() google/veo3.1-lite/text-to-video text-to-video
lite_image_to_video() google/veo3.1-lite/image-to-video image-to-video
lite_start_end_to_video() google/veo3.1-lite/start-end-to-video image-to-video

Each model page has a playground, live pricing and copy-paste API snippets. Prices are per generation and depend on the settings you choose; check a request before running it with wavespeed price <model> from the CLI.

Parameters

text_to_video

google/veo3.1/text-to-video — Google Veo 3.1 converts text prompts into videos with synchronized audio at native 1080p for high-quality outputs.

Parameter Type Required Default Allowed Description
prompt str yes Text prompt for generation; Positive text prompt.
aspect_ratio str "16:9" 16:9, 9:16 Aspect ratio of the video.
duration int 8 8, 4, 6 The duration of the generated media in seconds.
resolution str "1080p" 720p, 1080p, 4k Video resolution.
generate_audio bool true Whether to generate audio.
negative_prompt str Negative prompt for the generation.
seed int The random seed to use for the generation.

image_to_video

google/veo3.1/image-to-video — Google Veo 3.1 is an Image-to-Video model that converts images into high-quality videos with native 1080P output for enhanced detail and creative flexibility.

Parameter Type Required Default Allowed Description
prompt str yes The positive prompt for the generation.
image str yes The image to use for the generation.
last_image str The end image for generating the output.
aspect_ratio str "16:9" 16:9, 9:16 The aspect ratio of the generated media.
duration int 8 8, 4, 6 The duration of the generated media in seconds.
resolution str "1080p" 720p, 1080p, 4k Video resolution.
generate_audio bool true Whether to generate audio.
negative_prompt str The negative prompt for the generation.
seed int The random seed to use for the generation.

reference_to_video

google/veo3.1/reference-to-video — Google Veo3.1 Reference-to-Video performs image-to-video generation that preserves a specific subject's appearance and identity from provided reference images, enabling consistent character or product motion across frames.

Parameter Type Required Default Allowed Description
prompt str yes The positive prompt for the generation.
images List[str] yes up to 3 items The model will use the provided images as references to generate a video with consistent subjects. For fields that accept images: Accepts 1 to 3 images; Images Assets can be provided via URLs or Base64 encode; You must use one of the following codecs: PNG, JPEG, JPG, WebP; The dimensions of the images must be at least 128*128 pixels; All images are limited to 50MB; The length of the base64 decode must be under 50MB, and it must include an appropriate content type string.
resolution str "1080p" 720p, 1080p, 4k Video resolution.
generate_audio bool true Whether to generate audio.
negative_prompt str The negative prompt for the generation.
seed int The random seed to use for the generation.

video_extend

google/veo3.1/video-extend — Extend and continue Veo 3.1 videos with smooth motion, preserved style, and strong scene coherence.

Parameter Type Required Default Allowed Description
video str yes The video to use for the generation.
prompt str yes The positive prompt for the generation.
resolution str "1080p" 720p, 1080p Video resolution.
negative_prompt str The negative prompt for the generation.
seed int The random seed to use for the generation.

fast_text_to_video

google/veo3.1-fast/text-to-video — Google Veo 3.1 Fast creates text-to-video with native 1080p and synchronized audio, delivering high-quality videos for creators.

Parameter Type Required Default Allowed Description
prompt str yes Text prompt for generation; Positive text prompt.
aspect_ratio str "16:9" 16:9, 9:16 Aspect ratio of the video.
duration int 8 8, 4, 6 The duration of the generated media in seconds.
resolution str "1080p" 720p, 1080p, 4k Video resolution.
generate_audio bool true Whether to generate audio.
negative_prompt str Negative prompt for the generation.
seed int The random seed to use for the generation.

fast_image_to_video

google/veo3.1-fast/image-to-video — Google Veo 3.1 Fast is an Image-to-Video model with native 1080p output for high-detail videos from images and fast performance.

Parameter Type Required Default Allowed Description
prompt str yes The positive prompt for the generation.
image str yes The image to use for the generation.
last_image str The end image for generating the output.
aspect_ratio str "16:9" 16:9, 9:16 The aspect ratio of the generated media.
duration int 8 8, 4, 6 The duration of the generated media in seconds.
resolution str "1080p" 720p, 1080p, 4k Video resolution.
generate_audio bool true Whether to generate audio.
negative_prompt str The negative prompt for the generation.
seed int The random seed to use for the generation.

fast_reference_to_video

google/veo3.1-fast/reference-to-video — Google Veo 3.1 Fast Reference-to-Video generates 8-second videos from up to three reference images using the official Veo predictLongRunning endpoint with referenceImages assets.

Parameter Type Required Default Allowed Description
prompt str yes Positive prompt describing the desired video motion, scene, and camera behavior.
images List[str] yes up to 3 items Reference images used as asset references. Upload 1 to 3 PNG, JPEG, JPG, or WebP images.
aspect_ratio str "16:9" 16:9, 9:16 Aspect ratio of the generated video.
resolution str "720p" 720p, 1080p Video resolution.
generate_audio bool false Whether to generate audio.
negative_prompt str Negative prompt for the generation.
seed int The random seed to use for the generation.

fast_video_extend

google/veo3.1-fast/video-extend — Extend Veo 3.1 videos in 7-second steps with the Fast endpoint—quick, coherent continuation that preserves style and motion, output as a single merged clip.

Parameter Type Required Default Allowed Description
video str yes The video to use for the generation.
prompt str yes The positive prompt for the generation.
resolution str "1080p" 720p, 1080p Video resolution.
negative_prompt str The negative prompt for the generation.
seed int The random seed to use for the generation.

lite_text_to_video

google/veo3.1-lite/text-to-video — Google Veo 3.1 Lite generates high-fidelity videos with native audio from text prompts, optimized for cost efficiency.

Parameter Type Required Default Allowed Description
prompt str yes Text prompt for generation; Positive text prompt.
aspect_ratio str "16:9" 16:9, 9:16 Aspect ratio of the video.
duration int 6 8, 6, 4 The duration of the generated media in seconds.
resolution str "720p" 720p, 1080p Video resolution.
negative_prompt str Negative prompt for the generation.
seed int The random seed to use for the generation.

lite_image_to_video

google/veo3.1-lite/image-to-video — Google Veo 3.1 Lite transforms static images into high-fidelity videos with native audio.

Parameter Type Required Default Allowed Description
prompt str yes The positive prompt for the generation.
image str yes The image to use for the generation.
aspect_ratio str "16:9" 16:9, 9:16 The aspect ratio of the generated media.
duration int 8 8, 6, 4 The duration of the generated media in seconds.
resolution str "720p" 720p, 1080p Video resolution.
negative_prompt str The negative prompt for the generation.
seed int The random seed to use for the generation.

lite_start_end_to_video

google/veo3.1-lite/start-end-to-video — Google Veo 3.1 Lite Start-End-to-Video generates videos by interpolating between start and end keyframe images.

Parameter Type Required Default Allowed Description
prompt str yes The positive prompt for the generation.
image str yes The image to use for the generation.
last_image str yes The last image to use for the generation.
aspect_ratio str "16:9" 16:9, 9:16 The aspect ratio of the generated media.
resolution str "720p" 720p, 1080p Video resolution.
negative_prompt str The negative prompt for the generation.
seed int The random seed to use for the generation.

REST and CLI

The wrapper is a thin layer over the REST API: submit, then poll for the result.

curl -s -X POST "https://api.wavespeed.ai/api/v3/google/veo3.1/text-to-video" \
  -H "Authorization: Bearer $WAVESPEED_API_KEY" -H "Content-Type: application/json" \
  -d '{"prompt": "A slow cinematic dolly shot through a rain-soaked neon night market, reflections on the pavement"}'
# -> {"data": {"id": "<prediction_id>"}}

curl -s "https://api.wavespeed.ai/api/v3/predictions/<prediction_id>/result" \
  -H "Authorization: Bearer $WAVESPEED_API_KEY"
# -> status: completed, outputs: ["<url>"]
npm i -g @wavespeed/cli && wavespeed login
wavespeed run google/veo3.1/text-to-video -p "your prompt"

Related

Notes

  • Veo 3.1 is a model by Google. This repository is maintained by WaveSpeedAI and wraps the WaveSpeedAI hosted API for it.
  • Function signatures and the tables above are generated from the live model schemas (last generated 2026-11-22). The model pages are the source of truth if an endpoint changes.
  • Issues and pull requests are welcome. License: MIT.

About

Veo 3.1 API — Python wrapper for Veo 3.1, Veo 3.1 Fast and Veo 3.1 Lite on WaveSpeedAI: text-to-video, image-to-video, reference-to-video, video extension.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages