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

# Wan 3.0 - Video

> Generate videos with Wan 3.0 using text, frames, reference media, files, or public webpages.

Generate videos with the **Wan 3.0** standard video model.

Supported generation modes:

* Text to video
* First-frame to video
* First-and-last-frame to video
* Reference to video
* File to video
* Link to video

## Create a Video Generation Task

```http theme={null}
POST /api/v1/jobs/createTask
```

## Authentication

All API requests require a Bearer Token.

```http theme={null}
Authorization: Bearer YOUR_API_KEY
```

## Model

Use:

```text theme={null}
wan/3-0-video
```

## Text to Video

```json theme={null}
{
  "model": "wan/3-0-video",
  "input": {
    "prompt": "Describe a video you want to generate.",
    "resolution": "480P",
    "aspect_ratio": "adaptive",
    "duration": 5,
    "audio": true
  }
}
```

## First Frame to Video

```json theme={null}
{
  "model": "wan/3-0-video",
  "input": {
    "prompt": "Describe a video you want to generate.",
    "first_frame_url": "https://example.com/first-frame.png",
    "resolution": "720P",
    "aspect_ratio": "adaptive",
    "duration": 5,
    "audio": true
  }
}
```

## First and Last Frames to Video

```json theme={null}
{
  "model": "wan/3-0-video",
  "input": {
    "prompt": "Describe a video you want to generate.",
    "first_frame_url": "https://example.com/first-frame.jpg",
    "last_frame_url": "https://example.com/last-frame.jpg",
    "resolution": "1080P",
    "aspect_ratio": "adaptive",
    "duration": 8,
    "audio": true,
    "seed": 12345
  }
}
```

## Reference to Video

Reference media can include images, videos, and audio. In the prompt, reference items correspond to their array order:

* `Image1`, `Image2`, ...
* `Video1`, `Video2`, ...
* `Audio1`, `Audio2`, ...

```json theme={null}
{
  "model": "wan/3-0-video",
  "input": {
    "prompt": "Video 1 holds image 3 and is playing a song on the chair in image 4. Image 1 holds image 2 and passes through Video 1, placing image 2 on the table.",
    "reference_image_urls": [
      "https://example.com/character.jpg",
      "https://example.com/object.png",
      "https://example.com/prop.png",
      "https://example.com/background.png"
    ],
    "reference_video_urls": [
      "https://example.com/role.mp4"
    ],
    "reference_audio_urls": [
      "https://example.com/voice.mp3"
    ],
    "resolution": "720P",
    "aspect_ratio": "adaptive",
    "duration": 5,
    "audio": true
  }
}
```

## File to Video

```json theme={null}
{
  "model": "wan/3-0-video",
  "input": {
    "prompt": "Based on this product presentation PPT, create an advertisement video for an ultra-minimalist tech-style smart glasses.",
    "reference_file_urls": [
      "https://example.com/product.pptx"
    ],
    "resolution": "480P",
    "aspect_ratio": "adaptive",
    "duration": 10,
    "audio": true
  }
}
```

## Link to Video

The referenced webpage must be publicly accessible and must not require login.

```json theme={null}
{
  "model": "wan/3-0-video",
  "input": {
    "prompt": "Based on the content of this public webpage, create a concise product introduction video.",
    "reference_link_urls": [
      "https://example.com/article"
    ],
    "resolution": "720P",
    "aspect_ratio": "16:9",
    "duration": 8,
    "audio": true
  }
}
```

## Parameters

<ParamField body="model" type="string" required>
  Must be `wan/3-0-video`.
</ParamField>

### `input` Parameters

<ParamField body="input" type="object" required>
  The `input` object contains the parameters used to generate the video.

  <ParamField body="prompt" type="string">
    Use `prompt` to describe the video motion you want to generate in English or Chinese.

    **Note:** Required for text-to-video.

    **Maximum length:** `20,000` characters.
  </ParamField>

  <ParamField body="first_frame_url" type="string">
    Use the provided image URL as the first frame. <br /> The `first_frame_url` must contain the URL of an uploaded image. The value must be an uploaded file URL, not the file content itself.

    **Note:** `first_frame_url` cannot be used together with `reference_*_urls` according to the source specification.

    Supported image types:

    * `image/jpeg`
    * `image/png`
    * `image/webp`
    * `image/bmp`

    Maximum file size: **20 MB** <br /> Each side: **240–8,000** px. <br /> Aspect ratio : **≤ 8:1**
  </ParamField>

  <ParamField body="last_frame_url" type="string">
    Use the provided image URL as the last frame. <br /> The `last_frame_url` must contain the URL of an uploaded image. The value must be an uploaded file URL, not the file content itself.

    **Note:** Cannot be provided together with `reference_*_urls`

    Supported image types:

    * `image/jpeg`
    * `image/png`
    * `image/webp`
    * `image/bmp`

    Maximum file size: **20 MB** <br /> Each side: **240–8,000** px. <br /> Aspect ratio : **≤ 8:1**
  </ParamField>

  <ParamField body="reference_video_urls" type="string[]">
    Reference videos for the all-purpose reference mode. <br /> The `reference_video_urls` must contain the URLs of an uploaded videos. The value must be an uploaded file URL, not the file content itself.

    **Note:** The input video duration + duration must not exceed 30 seconds.

    Supported videos types:

    * `.mp4`
    * `.mov`

    Supported duration each an clip: `1` to `15` seconds.

    Maximum reference videos: **5** <br /> Maximum each file size: **100 MB** <br />
  </ParamField>

  <ParamField body="reference_image_urls" type="string[]">
    Reference images for the all-purpose reference mode. <br /> The `reference_image_urls` must contain the URLs of an uploaded images. The value must be an uploaded file URL, not the file content itself.

    **Note:** Cannot be provided together with the first-frame/last-frame parameters

    Supported image types:

    * `image/jpeg`
    * `image/png`
    * `image/webp`
    * `image/bmp`

    Maximum reference images: **10** <br /> Maximum file size: **20 MB** <br /> Aspect ratio : **≤ 8:1**
  </ParamField>

  <ParamField body="reference_audio_urls" type="string[]">
    Reference audio for the all-purpose reference mode. <br /> The `reference_audio_urls` must contain the URLs of an uploaded audios. The value must be an uploaded file URL, not the file content itself.

    **Note:** The source recommends pairing audio with an image or video rather than using audio alone.

    Supported audios types:

    * `.wav`
    * `.mp3`

    Supported duration each an clip: `1` to `15` seconds.

    Maximum reference audios: **5** <br /> Maximum each file size: **15 MB** <br />
  </ParamField>

  <ParamField body="reference_file_urls" type="string[]">
    File-to-video generation. <br /> The `reference_file_urls` must contain the URLs of an uploaded file. The value must be an uploaded file URL, not the file content itself.

    **Note:**  `reference_file_urls` cannot be combined with `reference_link_urls` or the first-frame/last-frame parameters.

    * Maximum 1 file.
    * Maximum size: 100 MB.
    * Supported formats: DOCX, DOC, XLSX, XLS, PPTX, PPT, PDF, TXT, KEY, PAGES, NUMBERS, MD.
    * PDF, DOCX, PPT, KEY, PAGES, and similar documents: up to 50 pages.
  </ParamField>

  <ParamField body="reference_link_urls" type="string[]">
    Link-to-video generation. <br /> The `reference_link_urls` must be publicly accessible webpage that does not require login.

    **Note:** `reference_link_urls` cannot be combined with `reference_file_urls` or the first-frame/last-frame parameters.

    Maximum file: **1**
  </ParamField>

  <ParamField body="resolution" default="1080P" type="string">
    Specify the resolution of the output video.

    Supported output resolutions:

    * `480P`
    * `720P`
    * `1080P`

    **Default:** `1080P`
  </ParamField>

  <ParamField body="aspect_ratio" default="adaptive" type="string">
    Applies to multi-image generation. In single-image mode, video dimensions follow the source image dimensions.

    Supported values: `3:4`, `4:3`, `1:1`, `16:9`, `9:16`, `adaptive`.

    **Default:** `adaptive`
  </ParamField>

  <ParamField body="duration" type="number">
    Generated video duration in seconds.

    **Type:** `integer` <br /> Supported range without video input: `2`–`30`, in one-second steps. <br /> Supported range with reference videos: input video duration + output duration **≤ 30**, in one-second steps. <br />

    **Default:** `5`
  </ParamField>

  <ParamField body="audio" default="true" type="boolean">
    When enabled, the output video includes an audio track.

    **Default:** `true`
  </ParamField>

  <ParamField body="seed" type="number">
    The seed can be used to reproduce results.

    * Minimum: `0`
    * Maximum: `2147483647`
    * If omitted, a random seed is used.
  </ParamField>
</ParamField>

> **Note:** The source schema requires `model` and `input` at the top level. It describes `prompt` as required for text-to-video, but does not mark it as required in the `input` schema.

## Successful Response

<ResponseField name="code" type="number">
  Response status code.
</ResponseField>

<ResponseField name="msg" type="string">
  Response message. Contains the error description when the request fails.

  **Example:** `success`
</ResponseField>

<ResponseField name="data" type="object" required>
  The task data object containing task id.

  <ResponseField name="taskId" type="string" required>
    The unique identifier for this task.

    **Example:** `task_123456`
  </ResponseField>
</ResponseField>

## Query Task Status

After submitting a task, use the unified query endpoint to check the task progress and retrieve the generated results.

<Card title="Get Task Details" icon="search" href="/get-task-detail">
  Check task status, monitor generation progress, and retrieve results.
</Card>

### Error Response

```json theme={null}
{
  "code": 500,
  "msg": "Server Error - An unexpected error occurred while processing the request",
  "data": null
}
```

## Response Codes

|  Code | Meaning                                                                   |
| ----: | ------------------------------------------------------------------------- |
| `200` | Success — the request was successfully processed.                         |
| `401` | Unauthorized — authentication credentials are missing or invalid.         |
| `402` | Insufficient Credits — the account does not have enough credits.          |
| `404` | Not Found — the requested resource or interface does not exist.           |
| `408` | Upstream service issue — no result has been returned for over 10 minutes. |
| `422` | Validation Error — request parameters failed validation.                  |
| `429` | Rate Limited — request frequency limit has been exceeded.                 |
| `433` | Request Limit — sub-key usage exceeded the limit.                         |
| `455` | Service Unavailable — system is undergoing maintenance.                   |
| `500` | Server Error — an unexpected error occurred while processing the request. |
| `501` | Generation Failed — content generation failed.                            |
| `505` | Feature Disabled — the requested feature is disabled.                     |
