> ## 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.

# PixVerse V6 Reference to Video

> PixVerse V6 reference-to-video (Fusion): blend 1–7 subject or background reference images into a video, referring to them as @name in the prompt.

PixVerse V6 is the video generation model PixVerse released in March 2026. It advances shot execution, character performance and multi-shot audio-visual generation: camera movement is more accurate with fewer artifacts, characters keep their emotion and body language consistent across scenes, and a single prompt can produce a multi-shot short film with sound, the audio generated together with the picture. On-screen text in English, Chinese and other languages renders correctly.

`pixverse-v6/reference-to-video` (Fusion multi-reference) blends 1–7 reference images into one video: `type` marks each image as a subject (person, animal, product…) or a background, and `ref_name` names it so the prompt can refer to it as `@name`; people, products and scenes stay consistent in the video.

## Setup

The PixVerse V6 models use an asynchronous task API: `POST /api/v1/jobs/createTask` creates a task (`model` selects the model and the parameters go in `input`), `GET /api/v1/jobs/recordInfo?taskId=` queries it, and with `callBackUrl` the result is pushed to that URL when the task finishes. The base URL is `https://api.dreamto.ai`; send the API Key in the `Authorization: Bearer` header.

Every response has HTTP status 200; the `code` in the body tells the outcome: `200` is success, anything else an error (see the response examples of each endpoint).

| Endpoint | Purpose |
| - | - |
| [`POST /api/v1/jobs/createTask`](https://docs.dreamto.ai/en/api-reference/pixverse-v6-reference-to-video/create-task) | Create task |
| [`GET /api/v1/jobs/recordInfo?taskId=...`](https://docs.dreamto.ai/en/api-reference/pixverse-v6-reference-to-video/query-task) | Get task |
| [`POST callBackUrl`](https://docs.dreamto.ai/en/api-reference/pixverse-v6-reference-to-video/task-callback) | Task callback |

## Parameters

`model` is `pixverse-v6/reference-to-video`; the generation parameters go in `input`. Requests out of range return `code: 422`; no task is created or charged.

| Field | Values |
| - | - |
| `prompt` | Required, 3–5,000 characters; refer to reference images as `@ref_name` |
| `image_references` | Required: 1–7 reference images, each with `image_url` (required), `type` (`subject`, default, / `background`) and `ref_name` (up to 30 characters, unique in the list) |
| `aspect_ratio` | Required: `16:9` / `4:3` / `1:1` / `3:4` / `9:16` / `2:3` / `3:2` / `21:9` |
| `quality` | Required: `360p` / `540p` / `720p` / `1080p`, case-insensitive |
| `duration` | Required: integer from `1` to `15` seconds |
| `generate_audio_switch` | `false` (default) / `true` (dialogue, sound effects and music generated with the picture, at a higher price) |
| `seed` | Optional, `0`–`2147483647`; random when omitted |

## Pricing

Billed per second of generated video at the official PixVerse list price (225 credits = 1 USD); the model price in the console is authoritative:

| Quality | Without audio | With audio (`generate_audio_switch: true`) |
| - | - | - |
| `360p` | \$0.0222 / second | \$0.0311 / second |
| `540p` | \$0.0311 / second | \$0.04 / second |
| `720p` | \$0.04 / second | \$0.0533 / second |
| `1080p` | \$0.08 / second | \$0.1022 / second |

Cost of a task = price per second × `duration`. The balance is checked for the request's cost when the task is created (`code: 402` when insufficient); invalid requests and failed tasks are not charged.

## Quick start

Create a task to get `data.taskId`, poll about every 10 seconds, and download `response.resultUrls` once `state` is `success`; or pass `callBackUrl` to be called back when the task finishes. `$DREAMTO_API_KEY` is your API Key.

```bash cURL theme={null}
# 1. Create the task
curl -X POST "https://api.dreamto.ai/api/v1/jobs/createTask" \
  -H "Authorization: Bearer $DREAMTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "pixverse-v6/reference-to-video",
    "input": {
      "prompt": "@dog rolls over on the sofa in @room, then jumps down and runs toward the camera",
      "image_references": [
        {
          "image_url": "https://your-cdn.example.com/dog.png",
          "type": "subject",
          "ref_name": "dog"
        },
        {
          "image_url": "https://your-cdn.example.com/room.png",
          "type": "background",
          "ref_name": "room"
        }
      ],
      "aspect_ratio": "16:9",
      "quality": "720p",
      "duration": 5
    }
  }'

# 2. Query the task
curl "https://api.dreamto.ai/api/v1/jobs/recordInfo?taskId=7d3f0a9c41e85b2f6a1c9e04b8d27f53" \
  -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": "pixverse-v6/reference-to-video",
    "input": {
        "prompt": "@dog rolls over on the sofa in @room, then jumps down and runs toward the camera",
        "image_references": [
            {
                "image_url": "https://your-cdn.example.com/dog.png",
                "type": "subject",
                "ref_name": "dog"
            },
            {
                "image_url": "https://your-cdn.example.com/room.png",
                "type": "background",
                "ref_name": "room"
            }
        ],
        "aspect_ratio": "16:9",
        "quality": "720p",
        "duration": 5
    }
}

created = requests.post(f"{BASE_URL}/api/v1/jobs/createTask", headers=HEADERS, json=payload, timeout=60).json()
if created["code"] != 200:
    raise SystemExit(f"{created['code']}: {created['msg']}")
task_id = created["data"]["taskId"]
while True:
    record = requests.get(f"{BASE_URL}/api/v1/jobs/recordInfo", headers=HEADERS, params={"taskId": task_id}, timeout=60).json()["data"]
    if record["state"] in ("success", "fail"):
        break
    time.sleep(10)
if record["state"] == "success":
    print(record["response"]["resultUrls"])
else:
    print(record["failCode"], record["failMsg"])
```

## Callback

Pass `callBackUrl` (a public `http` / `https` URL) when creating the task; when the task succeeds or fails DreamTo `POST`s the result there once: the outer `code` is `200` (success) or `501` (failure) and `data` is the same as the `data` of the query endpoint. The request carries `X-DreamTo-Event: task.completed`, `X-DreamTo-Timestamp` (UTC, RFC 3339) and `X-DreamTo-Signature`:

```
X-DreamTo-Signature = hex( HMAC-SHA256( secret, X-DreamTo-Timestamp + "." + data.taskId + "." + status ) )
```

`status` is `success` when the task succeeded and `failed` when it failed (not the `fail` of `data.state`). Generate the secret under Webhook signing secret on the API Key page of the console; without a secret `X-DreamTo-Signature` is not sent. The callback times out after 10 seconds and any `2xx` counts as delivered; otherwise it is retried after 1, 5 and 30 minutes, at most 4 deliveries, so handle it idempotently by `data.taskId`. See [Task callback](https://docs.dreamto.ai/en/webhooks/task-callback.md) for secret management and verification code.

## Notes

* Only image references are supported; PixVerse's video references (`video_references`) are not available.
* `taskId` is issued by DreamTo (32 hex digits) and can only be queried with an API Key of the same account; an unknown or expired task returns `code: 422` with `msg: recordInfo is null`.
* The body accepts only `model`, `callBackUrl` and `input`; undeclared `input` fields, wrong types and out-of-range values return `code: 422` with an English reason in `msg`; no task is created or charged.
* Video links (`response.resultUrls`, the same as in `resultJson`) are DreamTo download links (`/v1/tasks/{task_id}/artifacts/...`) that work without an API Key and support `Range`; they stay valid for about 14 days after the task is created, so download and keep the videos promptly.
* `param` echoes the create request, with `input` as a JSON string that needs a second parse; `creditsConsumed` is not returned, and the charge is shown in the DreamTo console bills.
* `failCode` / `failMsg` of a failed task come from the model service (an image that cannot be downloaded, content moderation and so on); internal errors are reported as `failCode: "500"` with `failMsg: "Internal Error, Please try again later."`.


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