> ## 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 Max Text to Video

> PixVerse V6 Max text-to-video: the flagship model tuned for film, short drama and advertising, 1–15 seconds at up to 1080p, with optional native audio.

PixVerse V6 Max is the flagship version of PixVerse V6 (launched in October 2026), tuned for film, short drama and advertising: stronger prompt following and camera control, more realistic lighting and materials, more stable subject consistency across shots, tighter music-beat sync, more accurate multi-character dialogue and lip-sync, and more reliable product appearance and on-screen text. It covers text-to-video and image-to-video, up to 15 seconds at up to 1080p, with optional native audio.

`pixverse-v6-max/text-to-video` turns a text prompt into a 1–15 second video at 360p–1080p in 8 aspect ratios; with `generate_audio_switch` it also generates dialogue, sound effects and music.

## 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-max-text-to-video/create-task) | Create task |
| [`GET /api/v1/jobs/recordInfo?taskId=...`](https://docs.dreamto.ai/en/api-reference/pixverse-v6-max-text-to-video/query-task) | Get task |
| [`POST callBackUrl`](https://docs.dreamto.ai/en/api-reference/pixverse-v6-max-text-to-video/task-callback) | Task callback |

## Parameters

`model` is `pixverse-v6-max/text-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, 1–5,000 characters |
| `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.0267 / second | \$0.04 / second |
| `540p` | \$0.04 / second | \$0.0489 / second |
| `720p` | \$0.0489 / second | \$0.0667 / second |
| `1080p` | \$0.0978 / second | \$0.1244 / 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-max/text-to-video",
    "input": {
      "prompt": "Drone shot of a futuristic coastal city at sunrise, the camera glides smoothly from the sea toward the skyline, cinematic lighting",
      "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-max/text-to-video",
    "input": {
        "prompt": "Drone shot of a futuristic coastal city at sunrise, the camera glides smoothly from the sea toward the skyline, cinematic lighting",
        "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

* V6 Max has no multi-shot switch, effect templates, first/last frame, reference images or extension; use the matching PixVerse V6 model for those.
* `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.