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/createHeaders
| Header | Value | Required |
|---|---|---|
| Content-Type | application/json | Yes |
| Api-Key | {API_KEY} | Yes |
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| model_id | string | Yes | 2-97. Requires an image; text-to-video is not supported. |
| prompt | string | Yes | Non-empty scene and motion description. |
| image_urls | array of URLs | Yes | Exactly one publicly downloadable image URL. JPG, JPEG, PNG, or WebP, up to 50 MiB. The output inherits the image’s aspect ratio. |
| options | object | No | Omitted fields use the defaults below. |
| options.resolution | string | No | 540p, 720p, 1080p, 2k, or 4k. Default: 720p. |
| options.duration | int | No | Any whole number from 3 through 16 seconds, at every resolution. Default: 5. |
| options.sound | boolean | No | Generate synchronized dialogue and sound effects. Default: true. |
| options.prompt_optimization | boolean | No | Optimize 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
| Parameter | Type | Description |
|---|---|---|
| code | int | 1 for success, 0 for error. |
| message | string | Success or failure message. |
| data.task_id | string | Pixwith task ID. |
| data.estimated_time | int | Estimated 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
| Parameter | Type | Required | Description |
|---|---|---|---|
| model_id | string | Yes | 2-98. |
| prompt | string | Yes | Non-empty video description. |
| reference_urls | object | Yes | Reference media URLs |
| reference_urls.reference_images | array of URLs | Yes | 1–10 JPG, JPEG, PNG, or WebP images, up to 50 MiB each. Array order is preserved. |
| reference_urls.reference_audios | array of URLs | No | 0–3 MP3 files, up to 50 MiB each. Each audio must be 3–12 seconds. There is no additional combined audio duration limit. |
| options | object | No | Omitted fields use the defaults below. |
| options.resolution | string | No | 540p, 720p, 1080p, 2k, or 4k. Default: 720p. |
| options.duration | int | No | Any whole number from 3 through 16 seconds, Default: 5. |
| options.aspect_ratio | string | No | 16:9, 9:16, 1:1, 4:3, or 3:4. Default: 16:9. |
| options.sound | boolean | No | Generate synchronized audio. Default: true. |
| options.prompt_optimization | boolean | No | Optimize 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.