veo/veo-3.1-fast-generate-001, served by Comfy Router from Veo.
Quick start
Create a key at platform.comfy.org/profile/api-keys and export it asCOMFY_API_KEY. The Python and TypeScript snippets use the Comfy SDKs (pip install comfy-sdk, npm install @comfyorg/sdk); the cURL snippet is the same call over raw HTTP.
Model ID: veo/veo-3.1-fast-generate-001
Endpoint: POST https://api.comfy.org/v2/models/veo/veo-3.1-fast-generate-001
Schema
Input
object[]
string
Camera motion type. Requires image to be provided.Possible values:
fixed, pan_left, pan_right, tilt_up, tilt_down, truck_left, truck_right, pedestal_up, pedestal_down, push_in, pull_outobject | object
Optional first frame image to guide video generation
string (byte)
Base64-encoded image dataFormat:
bytestring
Cloud Storage URI of the image
string
MIME type of the image (image/jpeg or image/png)Possible values:
image/jpeg, image/pngobject | object
Optional last frame image. Used with image to generate video between first and last frames. Supported by Veo 3.0+ models.
string (byte)
Base64-encoded image dataFormat:
bytestring
Cloud Storage URI of the image
string
MIME type of the image (image/jpeg or image/png)Possible values:
image/jpeg, image/pngobject | object
Optional mask for video editing. Applies to input video.
string (byte)
Base64-encoded mask bytesFormat:
bytestring
Cloud Storage URI to mask file
string
How the mask is appliedPossible values:
insert, remove, remove_static, outpaintstring
MIME type of the mask (image/png, image/jpeg, image/webp, or video formats)
string
required
Text description of the video to generate
object[]
Optional reference images to guide video generation. Supports up to 3 asset images or 1 style image. Supported by Veo 3.1 models (preview).
object | object
required
string (byte)
Base64-encoded image dataFormat:
bytestring
Cloud Storage URI of the image
string
MIME type of the image (image/jpeg or image/png)Possible values:
image/jpeg, image/pngstring
Optional identifier for the reference image
string
required
Type of reference imagePossible values:
asset, styleobject | object
Optional input video for video extension or editing. Incompatible with image and referenceImages.
string (byte)
Base64-encoded video bytesFormat:
bytestring
Cloud Storage URI of the input video
string
MIME type of the videoPossible values:
video/mov, video/mpeg, video/mp4, video/mpg, video/avi, video/wmv, video/mpegps, video/x-flvobject
string
Aspect ratio of the generated video. Default: 16:9Possible values:
16:9, 9:16string
Video compression quality. Default: optimizedPossible values:
optimized, losslessnumber
Target duration of the generated video in seconds. Veo 2: 5-8. Veo 3/3.1: 4, 6, or 8. Default: 8
boolean
Automatically improve prompt for higher quality. Defaults to true.
integer
Frame rate of generated videos in frames per second
boolean
Whether to generate audio along with the video. Defaults to true. Supported by Veo 3.0+ models.
string
Text describing what to avoid in the generated video
string
Controls people in generated videos. Default: allow_adultPossible values:
dont_allow, allow_adult, allowAllstring
Cloud Pub/Sub topic for progress updates (projects/{project}/topics/{topic})
string
Resize approach for input image. Default: padPossible values:
pad, cropstring
Output video resolution. Supported by Veo 3.0+ models. Default: 720pPossible values:
720p, 1080p, 4kinteger
Number of videos to generate. If not specified, 1 video is generated.Range:
1 to 4integer
Random seed for deterministic output. Different seeds used per video if sampleCount > 1.Format:
uint32string
Cloud Storage URI (gs://) for saving generated videos
string
Operation type for the video generation requestPossible values:
textToVideo, imageToVideo, referenceToVideo, edit, extend, upscaleGET /v2/models/veo/veo-3.1-fast-generate-001/openapi.json, the same document it validates a call against before the request reaches the provider.
Output
boolean
Whether the operation has completed
object
Error details, present if the operation failed
integer
gRPC error code
string
Error message
string
Operation resource name
object
The prediction response, present when done is true
string
integer
Number of videos filtered by responsible AI policies
string[]
Reasons why videos were filtered by responsible AI policies
object[]
string
Base64-encoded video content
string
Cloud Storage URI of the generated video
string
Video MIME type (video/mp4)
Examples
Input
Output
Before you ship
The snippets above are the shortest working call. Three things are the same for every model and are documented once on the Comfy Router headers page: send anIdempotency-Key on every paid call and reuse it when you retry, expect the connection to be held up to Router’s 10 minute deadline, and keep X-Comfy-Request-Id from every response. The SDKs do all three for you; the cURL tab does none of them. On failure, X-Comfy-Error-Type names the bucket, and a 422 means the body failed the model’s schema and was never billed.
Headers
Authentication, idempotency, request IDs, error buckets, retry pacing, spend limits.
Quick Start
Typed error handling in Python and TypeScript, reading the 422, walking the catalog.
Limitations
What Router does not do today, and what to use instead.