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

> PixVerse V6 extend: add 1–15 seconds after an existing video, billed only for the added seconds.

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/extend` continues an existing video with a new segment, the prompt describing what happens next. The source is either `taskId`, a PixVerse task on DreamTo that succeeded within the last 14 days, or `video_url`, a public video link. PixVerse states that the source video can be up to 30 seconds and 50 MB, the total after extension up to 40 seconds, and that the result may contain the source video plus the extension.

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

## Parameters

`model` is `pixverse-v6/extend`; 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 |
| `taskId` | Use either this or `video_url`: a PixVerse task of your account that succeeded within the last 14 days (`data.taskId` of createTask) |
| `video_url` | Use either this or `taskId`: a publicly reachable video link |
| `quality` | Required: `360p` / `540p` / `720p` / `1080p`, case-insensitive |
| `duration` | Required: seconds to add, `1`–`15` |
| `generate_audio_switch` | `false` (default) / `true` (dialogue, sound effects and music generated with the picture, at a higher price) |
| `seed` | Required, `0`–`2147483647` |

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

Extension is billed only for the added seconds (`duration`), not for the source video: cost = price per second × `duration`. 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/extend",
    "input": {
      "prompt": "The camera keeps flying forward through the clouds toward distant snowy mountains",
      "taskId": "c2a81e5f09d34b7e8f61a2d4c9b03e75",
      "quality": "720p",
      "duration": 5,
      "seed": 42
    }
  }'

# 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/extend",
    "input": {
        "prompt": "The camera keeps flying forward through the clouds toward distant snowy mountains",
        "taskId": "c2a81e5f09d34b7e8f61a2d4c9b03e75",
        "quality": "720p",
        "duration": 5,
        "seed": 42
    }
}

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

* `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.