> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dreamto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Vidu Q4 Preview

> Vidu Q4 Preview: image-to-video from a first frame and reference-to-video (1–15 reference images, 0–3 reference audio clips), 3–16 seconds, 540P to 4K, with synchronised audio.

`viduq4` is the preview of Vidu Q4, the next-generation flagship video model from ShengShu Technology (released October 2026), built for lifelike performances: more natural expressions, motion and dialogue, with 2K / 4K output at 10-bit color depth. ShengShu will refine the final release based on feedback on the preview. It has two modes: image-to-video from one first-frame image, and reference-to-video from 1–15 reference images plus 0–3 reference audio clips. Videos are 3–16 seconds at 540P to 4K. Audio and video are generated together by default, with dialogue and sound effects, and the model switches camera shots intelligently while keeping characters and scenes consistent across shots. Text-to-video and first-and-last-frame generation are not supported.

* **Image-to-video**: a video from one first-frame image.
* **Reference-to-video**: 1–15 reference images, optionally with 0–3 reference audio clips.
* **Synchronised audio**: dialogue and sound effects are generated with the picture; turn it off with `generate_audio`.
* **Intelligent shot switching**: automatic camera changes with consistency across shots.
* **Specs**: 3–16 seconds, 540P / 720P / 1080P / 2K / 4K.

## Capabilities

| Mode | Parameters | Notes |
| - | - | - |
| Image-to-video (first frame) | `image_url`, optional `prompt` | Exactly one first frame; the output follows the aspect ratio of the image |
| Reference-to-video | `prompt` + `reference_image_urls` | 1–15 reference images; set the frame with `aspect_ratio` |
| Reference-to-video with audio | `prompt` + `reference_image_urls` + `reference_audio_urls` | 0–3 mp3 clips, 3–12 seconds each |
| Text-to-video / first and last frame | — | Not supported |

## Endpoints

The API is asynchronous: create a task, poll it, and download the video from `video_url` when it completes. Set `model` to `viduq4` and put every generation parameter inside `input`.

| Endpoint | Purpose |
| - | - |
| [`POST /v1/videos`](https://docs.dreamto.ai/en/api-reference/vidu-q4-preview/create-task) | Create a video task |
| [`GET /v1/videos/{task_id}`](https://docs.dreamto.ai/en/api-reference/vidu-q4-preview/query-task) | Query a video task |

## Quick start

Create a task to get a `task_id`, poll every 10–15 seconds, and download `video_url` once `status` is `completed`. `$DREAMTO_API_KEY` is your API Key.

```bash cURL theme={null}
# 1. Create the task
curl -X POST "https://api.dreamto.ai/v1/videos" \
  -H "Authorization: Bearer $DREAMTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "viduq4",
    "input": {
      "prompt": "The girl smiles and gently strokes the fox in a soft breeze, cinematic",
      "image_url": "https://your-cdn.example.com/first-frame.png",
      "resolution": "1080P",
      "duration": 5
    }
  }'

# 2. Query the task
curl "https://api.dreamto.ai/v1/videos/job_02b88886c4fda5be35baff61" \
  -H "Authorization: Bearer $DREAMTO_API_KEY"
```

```python Python theme={null}
import os
import time

import requests

BASE_URL = "https://api.dreamto.ai"
HEADERS = {"Authorization": f"Bearer {os.environ['DREAMTO_API_KEY']}"}

payload = {
    "model": "viduq4",
    "input": {
        "prompt": "The girl smiles and gently strokes the fox in a soft breeze, cinematic",
        "image_url": "https://your-cdn.example.com/first-frame.png",
        "resolution": "1080P",
        "duration": 5
    }
}

task = requests.post(f"{BASE_URL}/v1/videos", headers=HEADERS, json=payload, timeout=60).json()
task_id = task["task_id"]
while task["status"] not in ("completed", "failed"):
    time.sleep(10)
    task = requests.get(f"{BASE_URL}/v1/videos/{task_id}", headers=HEADERS, timeout=60).json()
print(task["status"], task.get("video_url"), task.get("error"))
```

## Generation modes

### Image-to-video (first frame)

`image_url` carries one first-frame image; the output follows the image.

```bash cURL theme={null}
curl -X POST "https://api.dreamto.ai/v1/videos" \
  -H "Authorization: Bearer $DREAMTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "viduq4",
    "input": {
      "prompt": "The girl smiles and gently strokes the fox in a soft breeze, cinematic",
      "image_url": "https://your-cdn.example.com/first-frame.png",
      "resolution": "1080P",
      "duration": 5
    }
  }'
```

### Reference-to-video

Send 1–15 reference images with a prompt; `aspect_ratio` sets the frame.

```bash cURL theme={null}
curl -X POST "https://api.dreamto.ai/v1/videos" \
  -H "Authorization: Bearer $DREAMTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "viduq4",
    "input": {
      "prompt": "The girl and the fox sit by a campfire at night while the camera cuts between them",
      "reference_image_urls": [
        "https://your-cdn.example.com/girl.png",
        "https://your-cdn.example.com/fox.png"
      ],
      "resolution": "720P",
      "duration": 8,
      "aspect_ratio": "9:16"
    }
  }'
```

### Reference-to-video with audio

Add 0–3 reference audio clips (mp3, 3–12 seconds each) to the reference images.

```bash cURL theme={null}
curl -X POST "https://api.dreamto.ai/v1/videos" \
  -H "Authorization: Bearer $DREAMTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "viduq4",
    "input": {
      "prompt": "The girl talks to the fox with the voice of the reference audio and the fox tilts its head in reply",
      "reference_image_urls": [
        "https://your-cdn.example.com/girl.png",
        "https://your-cdn.example.com/fox.png"
      ],
      "reference_audio_urls": [
        "https://your-cdn.example.com/voice.mp3"
      ],
      "resolution": "720P",
      "duration": 5,
      "aspect_ratio": "16:9"
    }
  }'
```

### Silent video and options

`generate_audio: false` produces a silent video; `enhance_prompt` lets the model optimise the prompt; `seed` fixes the random seed.

```bash cURL theme={null}
curl -X POST "https://api.dreamto.ai/v1/videos" \
  -H "Authorization: Bearer $DREAMTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "viduq4",
    "input": {
      "prompt": "The fox runs through the snow and the camera follows",
      "image_url": "https://your-cdn.example.com/first-frame.png",
      "resolution": "540P",
      "duration": 3,
      "generate_audio": false,
      "enhance_prompt": true,
      "seed": 20261116
    }
  }'
```

## Parameters

All parameters below go inside `input` in the request body.

| Parameter | Type | Required | Default | Values | Description |
| - | - | - | - | - | - |
| `prompt` | string | No | — | — | The prompt: describes the content, motion and camera work of the video. Required for reference-to-video. |
| `image_url` | string (image URL) | No | — | — | Public URL of the first-frame image (exactly one); turns the request into image-to-video and cannot be combined with `reference_image_urls`. jpeg / jpg / png, up to 10MB. |
| `reference_image_urls` | string\[] | No | — | 1–15 items | Public URLs of the reference images, 1–15; turns the request into reference-to-video and cannot be combined with `image_url`. png / jpeg / jpg / webp. |
| `reference_audio_urls` | string\[] | No | — | Up to 3 items | Public URLs of the reference audio clips, 0–3; only together with `reference_image_urls`. mp3, 3–12 seconds each. |
| `resolution` | string | No | `720P` | `540P` / `720P` / `1080P` / `2K` / `4K` | Output resolution. Defaults to `720P`. |
| `duration` | integer | No | `5` | `3`–`16` | Output duration in seconds, an integer from `3` to `16`. Defaults to `5`. |
| `aspect_ratio` | string | No | — | `16:9` / `9:16` / `1:1` / `4:3` / `3:4` | Output aspect ratio, for reference-to-video only. With a first-frame image the output follows the image. |
| `generate_audio` | boolean | No | — | `true` / `false` | Whether to generate synchronised audio with dialogue and sound effects. On by default; send `false` for a silent video. |
| `enhance_prompt` | boolean | No | — | `true` / `false` | Whether the model optimises the prompt automatically. |
| `seed` | integer | No | — | — | Random seed, an integer; random when omitted. |

See [Create a video task](https://docs.dreamto.ai/en/api-reference/vidu-q4-preview/create-task.md) for the full request and response definitions.

## Response and task status

Creating a task returns `task_id`, `status`, `model`, `created_at` and `request_id`. Querying it additionally returns `completed_at` (once finished), `video_url` (on success) and `error` (on failure).

| `status` | Meaning |
| - | - |
| `queued` | Waiting in the queue. |
| `in_progress` | Being generated. |
| `completed` | Finished; download the video from `video_url`. |
| `failed` | Failed; see `error` for the reason. Not charged. |

Query response of a completed task:

```json theme={null}
{
  "task_id": "job_02b88886c4fda5be35baff61",
  "status": "completed",
  "model": "viduq4",
  "created_at": 1794846663,
  "completed_at": 1794847019,
  "request_id": "req_6a9a539502118ba1c33f1bfc",
  "video_url": "https://cdn.example.com/videos/02b88886c4fda5be35baff61.mp4"
}
```

Query response of a failed task:

```json theme={null}
{
  "task_id": "job_02b88886c4fda5be35baff61",
  "status": "failed",
  "model": "viduq4",
  "created_at": 1794846663,
  "completed_at": 1794847019,
  "request_id": "req_6a9a539502118ba1c33f1bfc",
  "error": {
    "type": "api_error",
    "message": "InvalidParameterValue: Please input the ImageURL that can be retrieved from the external network."
  }
}
```

## Pricing

Billed per second of output video at the price of the chosen resolution.

| Resolution | USD / second | CNY / second |
| - | - | - |
| 540P | \$0.040179 | ¥0.28125 |
| 720P | \$0.084821 | ¥0.59375 |
| 1080P | \$0.107143 | ¥0.75 |
| 2K | \$0.169643 | ¥1.1875 |
| 4K | \$0.348214 | ¥2.4375 |

These are list prices; the model price shown in the console is authoritative. Failed tasks and invalid requests are not charged.

## Limits and notes

* `video_url` is valid for 7 days after the task completes; download the video and keep it in your own storage.
* Input media URLs must be publicly reachable from mainland China. Images hosted on sites such as `raw.githubusercontent.com` or `upload.wikimedia.org` fail to download: the task ends as `failed` and is not charged.
* Audio is generated by default; send `generate_audio: false` for a silent video.
* `image_url` and `reference_image_urls` are mutually exclusive; `reference_audio_urls` can only be used together with `reference_image_urls`.
* There is no text-to-video mode: a request must carry `image_url` or `reference_image_urls`. There is no first-and-last-frame mode either.
* `aspect_ratio` only applies to reference-to-video; with a first frame the output follows the image.
* A failed task returns `status: "failed"` with the reason in `error.message` (for example `InvalidParameterValue: Please input the ImageURL that can be retrieved from the external network.`) and is not charged.
* When a task is created, the estimated price of the request (resolution price × duration) is reserved from the balance and settled to the actual usage when the task completes. With an insufficient balance the create request returns HTTP 402 (`insufficient_balance`) and no task is created.
* An invalid request returns HTTP 400; no task is created and nothing is charged. When the duration or a media count is out of range, the message names the field and the allowed range (in the form `input.duration must be a number between <min> and <max>`). When an enum parameter such as `resolution` or `aspect_ratio` has a value outside its allowed list, the message is generic and does not name the field, so check the request against the parameter table. Media formats and content are checked by the model: a violation ends the task as `failed`, also without a charge.
* A video takes several minutes; poll the task every 10–15 seconds, not faster.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.