Skip to Content

Vidu Q4

Overview

Vidu Q4 is an AI video generation model designed for cinematic visuals, realistic motion, and synchronized audio. Vidu Q4 Preview supports up to 4K resolution, 16-second videos, 10 image references, and three audio references for consistent characters and voices.

Endpoints

1. Create Task — Image-to-Video

Request

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

Headers

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

Request Parameters

ParameterTypeRequiredDescription
model_idstringYes2-97. Requires an image; text-to-video is not supported.
promptstringYesNon-empty scene and motion description.
image_urlsarray of URLsYesExactly one publicly downloadable image URL. JPG, JPEG, PNG, or WebP, up to 50 MiB. The output inherits the image’s aspect ratio.
optionsobjectNoOmitted fields use the defaults below.
options.resolutionstringNo540p, 720p, 1080p, 2k, or 4k. Default: 720p.
options.durationintNoAny whole number from 3 through 16 seconds, at every resolution. Default: 5.
options.soundbooleanNoGenerate synchronized dialogue and sound effects. Default: true.
options.prompt_optimizationbooleanNoOptimize the prompt before generation. Default: false for this ordinary API endpoint. Set true to match the Web default.

Only one first-frame image is supported. Do not send a last frame, reference audio, or aspect_ratio for this mode. Each API request produces one video.

Example Request

{ "model_id": "2-97", "prompt": "The astronaut waves as the camera slowly moves upward", "image_urls": ["https://media.example.com/astronaut.webp"], "options": { "resolution": "720p", "duration": 6, "sound": true, "prompt_optimization": true } }

Response Parameters

ParameterTypeDescription
codeint1 for success, 0 for error.
messagestringSuccess or failure message.
data.task_idstringPixwith task ID.
data.estimated_timeintEstimated generation time in seconds, based on output resolution and duration.

Response

{ "code": 1, "message": "success", "data": { "task_id": "d425ab4dc256f0ebaa84862b9cea8a3d", "estimated_time": 240 } }

2. Create Task With R2V

Request Parameters

ParameterTypeRequiredDescription
model_idstringYes2-98.
promptstringYesNon-empty video description.
reference_urlsobjectYesReference media URLs
reference_urls.reference_imagesarray of URLsYes1–10 JPG, JPEG, PNG, or WebP images, up to 50 MiB each. Array order is preserved.
reference_urls.reference_audiosarray of URLsNo0–3 MP3 files, up to 50 MiB each. Each audio must be 3–12 seconds. There is no additional combined audio duration limit.
optionsobjectNoOmitted fields use the defaults below.
options.resolutionstringNo540p, 720p, 1080p, 2k, or 4k. Default: 720p.
options.durationintNoAny whole number from 3 through 16 seconds, Default: 5.
options.aspect_ratiostringNo16:9, 9:16, 1:1, 4:3, or 3:4. Default: 16:9.
options.soundbooleanNoGenerate synchronized audio. Default: true.
options.prompt_optimizationbooleanNoOptimize the prompt before generation. Default: true.

All R2V URLs must be publicly downloadable HTTPS URLs with a supported path extension. Optional media arrays may be omitted or set to []; do not use null. At least one reference image is required, including when reference audio is supplied. Each API request produces one video; other option fields are ignored.

Example Request

{ "model_id": "2-98", "prompt": "The person in reference image 1 enters the scene in reference image 2 and greets the viewer using reference audio 1", "reference_urls": { "reference_images": [ "https://media.example.com/character.jpg", "https://media.example.com/scene.png" ], "reference_audios": ["https://media.example.com/voice.mp3"] }, "options": { "resolution": "1080p", "duration": 10, "aspect_ratio": "16:9", "sound": true, "prompt_optimization": true } }

Response

{ "code": 1, "message": "success", "data": { "task_id": "d425ab4dc256f0ebaa84862b9cea8a3d" } }

3. Get Task Status & Results

Call POST /api/task/get with the returned task_id. The public task status is 1 for processing, 2 for completed, and 3 for failed. Successful tasks include result_urls; preparation failures or cancellations include error_code and error_message when available.

See Get Task Status & Results for the full request and response format.

Last updated on