Authentication
authorization string required
All APIs require authentication via Bearer Token.
Get API Key:
Visit API Key Management Page to get your API Key.
Usage:
Add to request header:
Authorization: Bearer YOUR_API_KEY
Parameters
model string required
Model ID to use for the request.
Value: veo_31_fast
prompt string required
Text description for the generated video, audio prompts are supported
negativePrompt string
Text describing what should not appear in the generated video
image object
Initial image used for animation generation
lastFrame object
Final image that interpolation should transition to
Must be used together with image
referenceImages array
Up to 3 images used as style/content references
Type: VideoGenerationReferenceImage[]
Only available for Veo 3.1 series
video object
Video object used for video extension/add-on scenarios
Type: previous-generation Video object
aspectRatio string
Video aspect ratio
Options: 16:9, 9:16
Default: 16:9
resolution string
Video resolution
Options: 720p, 1080p, 4k
1080p and 4k are only supported when durationSeconds is 8.
720p only applies to extension service scenarios.
durationSeconds integer
Generated video duration in seconds
Options: 4, 6, 8
When using extension, reference images, 1080p, or 4k, this must be 8.
personGeneration string
Controls person generation behavior
Text-to-video and extension only support allow_all
Image-to-video, interpolation, and reference image flows only support allow_adult
Polling
Since result generation takes time, you need to poll the task status after creating the task.
The initial response only returns information such as the task ID and initial status. The final result must be obtained by polling the task status endpoint using the task ID.
See the examples on the right for polling requests and responses.
Response Format
error object
Error details. Present when status is failed.
code
integerError code.
error_message
stringDetailed error message.
output array
Generation results. Present when status is completed.
content
arrayGenerated resource list.
type
stringResource type.
Value:
videourl
stringOutput URL.
jobId
stringRemote job ID.
usage object
Usage statistics. Present when status is completed.
cost
stringTotal cost in USD.
discount
numberDiscount amount.
input_tokens
integerNumber of input tokens.
output_tokens
integerNumber of output tokens.
total_tokens
integerTotal number of tokens.
metadata object
Metadata information.