Skip to Content

Veo 3.1

Overview

Veo 3.1 is a high-quality video generation model that supports both text-to-video and image-to-video modes. This model offers three versions: Fast, Pro, and Lite.

Test API KEY: key_00000000000000000000000000000000

Endpoints

1. Create Task

Request

POST https://api.pixwithapi.online/api/task/create

Headers

HeaderValueRequired
Content-Typeapplication/jsonYes
Api-Key{API_KEY}Yes

Request Parameters

ParameterTypeRequiredDescription
promptstringYesThe input prompt (e.g., “A cat walking in the garden”)
image_urlsarrayConditional[“https://cdn.pixwithapi.online/start_frame.jpg ”, “https://cdn.pixwithapi.online/end_frame.jpg ”]. Provide 1 or 2 images. The first image is the start frame (required for image-to-video), and the second image is the end frame (optional).
model_idstringYes2-11(Fast), 2-12(Pro), 2-55(Lite)
optionsobjectYesConfiguration options for the task
options.prompt_optimizationbooleanYesIf true, all prompt words will be automatically translated into English.
options.resolutionstringNoOutput resolution. Valid values: '720p', '1080p', or '4K'. Defaults to '720p'.
options.durationnumberNoVideo duration in seconds. Valid values: 4, 6, or 8. Defaults to 8.
options.aspect_ratiostringYesAspect ratio of the output. Valid values: '16:9' or '9:16'

Example Request - Text-to-Video (Fast)

{ "prompt": "A cat walking in the garden", "model_id": "2-11", "options": { "prompt_optimization": true, "resolution": "720p", "duration": 8, "aspect_ratio": "16:9" } }

Example Request - Image-to-Video (Pro)

{ "prompt": "A cat walking in the garden", "image_urls": [ "https://cdn.pixwithapi.online/start_frame.jpg", "https://cdn.pixwithapi.online/end_frame.jpg" ], "model_id": "2-12", "options": { "prompt_optimization": true, "resolution": "4K", "duration": 6, "aspect_ratio": "16:9" } }

Response Parameters

ParameterTypeDescription
codeint1=success, 0=error
messagestringSuccess and failure messages
dataobject
data.task_idstring
data.estimated_timeintEstimated time in seconds

Response

{ "code": 1, "message": "success", "data": { "task_id": "d425ab4dc256f0ebaa84862b9cea8a3d", "estimated_time": 90 } }
Last updated on