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

# Wan3.0 Video Prime

> Generate videos faster with the accelerated Wan3.0 Video Prime model using text, frames, multimodal media, files, and webpages.

Wan3.0 Video Prime is Alibaba Cloud's accelerated Wan3.0 video generation model. It supports the same text-to-video, first-frame and first-and-last-frame generation, multimodal reference, and file or webpage reference workflows. Use the AnyFast model ID `wan3.0-video-prime` with `POST /v1/video/generations`.

<Info>
  Prime uses the same multimodal request structure and workflows as Wan3.0 Video while targeting faster generation. For specific content requests, select `wan3.0-video-prime-nsfw` in the `Direct` resource group and set `parameters.prompt_extend` to `false`. This `-nsfw` ID is an AnyFast model variant, not an Alibaba Cloud model ID.
</Info>

## Key capabilities

* Generate videos from a prompt, media, or both. At least one of `input.prompt` and `input.media` is required.
* Guide a video with a first frame or with both first and last frames.
* Combine up to 10 reference images, 5 reference videos, and 5 reference audio clips.
* Let the model understand a document, presentation, spreadsheet, text file, or public webpage before generating the video.
* Generate up to 30 seconds of 30 fps video, with synchronized audio enabled by default.
* Let the model select duration and composition with `duration: -1` and `ratio: "adaptive"`.

| Capability                | Input                                                       | Main limits                                                |
| ------------------------- | ----------------------------------------------------------- | ---------------------------------------------------------- |
| Text to video             | `input.prompt` only                                         | The prompt must not exceed 5,000 characters                |
| First frame               | One `first_frame` image                                     | Cannot be combined with reference media, `file`, or `link` |
| First and last frames     | One `first_frame` and one `last_frame` image                | Cannot be combined with reference media, `file`, or `link` |
| Multimodal reference      | `reference_image`, `reference_video`, and `reference_audio` | 10 images, 5 videos, and 5 audio clips                     |
| File or webpage reference | One `file` or one `link`                                    | `file` and `link` are mutually exclusive                   |

## Capability examples

<Info>
  Alibaba Cloud's official page provides the input media below but does not publish output videos for these examples. Treat them as upstream input examples, not as results reproduced through AnyFast.
</Info>

<Tabs sync={false}>
  <Tab title="Text to video">
    Supply `input.prompt` without `input.media`. Describe the subject, action, setting, camera movement, visual style, and desired sound. The prompt must not exceed 5,000 characters.

    This workflow supports `duration` values from 2 to 30 seconds, as well as `-1` for smart duration selection.
  </Tab>

  <Tab title="First frame">
    Add one image with `type: "first_frame"` to anchor the opening frame. A prompt is optional when media is present, but it helps define motion, camera behavior, and audio.

    <Frame caption="Upstream first-frame input">
      <img src="https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png" alt="Graffiti rapper image used as the upstream Wan3.0 first-frame input" />
    </Frame>

    Do not combine `first_frame` with `reference_image`, `reference_video`, `reference_audio`, `file`, or `link`.
  </Tab>

  <Tab title="First and last frames">
    Add one `first_frame` followed by one `last_frame`. The two images define the starting and ending compositions; the prompt should explain the action and transition between them.

    <Columns cols={2}>
      <Frame caption="Upstream first-frame input">
        <img src="https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png" alt="First-frame image from the upstream Wan3.0 first-and-last-frame example" className="w-full aspect-video object-cover object-center" />
      </Frame>

      <Frame caption="Upstream last-frame input">
        <img src="https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260408/sjuytr/wan-r2v-object-girl.jpg" alt="Last-frame image from the upstream Wan3.0 first-and-last-frame example" className="w-full aspect-video object-cover object-center" />
      </Frame>
    </Columns>

    This frame-guided mode is exclusive. Do not add reference media, a file, or a webpage link to the same request.
  </Tab>

  <Tab title="Multimodal reference">
    Combine reference images, videos, and audio to control identity, objects, movement, setting, and sound. Refer to media by type and order, such as `Image 1`, `Video 1`, and `Audio 1`.

    <Accordion title="View the upstream multimodal inputs">
      <Columns cols={2}>
        <Frame caption="Image 1 — character reference">
          <img src="https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260408/sjuytr/wan-r2v-object-girl.jpg" alt="Character reference image from the upstream Wan3.0 example" />
        </Frame>

        <Frame caption="Video 1 — role and motion reference">
          <video controls playsInline preload="none" className="w-full aspect-video rounded-xl" src="https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/qigswt/wan-r2v-role2.mp4">
            Your browser does not support video playback.
          </video>
        </Frame>

        <Frame caption="Image 2 — object reference">
          <img src="https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/rtjeqf/wan-r2v-object3.png" alt="First object reference image from the upstream Wan3.0 example" />
        </Frame>

        <Frame caption="Image 3 — object reference">
          <img src="https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/qpzxps/wan-r2v-object4.png" alt="Second object reference image from the upstream Wan3.0 example" />
        </Frame>

        <Frame caption="Image 4 — background reference">
          <img src="https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/wfjikw/wan-r2v-backgroud5.png" alt="Background reference image from the upstream Wan3.0 example" />
        </Frame>
      </Columns>
    </Accordion>

    Reference videos may total up to 15 seconds, and reference audio clips have a separate 15-second total limit.
  </Tab>

  <Tab title="File or webpage">
    Use `type: "file"` to let the model understand an uploaded document or `type: "link"` to reference a public, no-login webpage. Only one file or one link is allowed, and the two types cannot appear together.

    <Card title="Upstream PPTX input" icon="file" href="https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260806/ebapmr/glass.pptx">
      Download the presentation used as the official Wan3.0 file-reference input.
    </Card>

    The official page does not provide the generated video for this presentation.
  </Tab>
</Tabs>

## Create a task

<Tabs sync={false}>
  <Tab title="Text to video">
    ```bash cURL theme={null}
    curl --request POST \
      --url https://www.anyfast.ai/v1/video/generations \
      --header 'Authorization: Bearer YOUR_API_KEY' \
      --header 'Content-Type: application/json' \
      --data '{
        "model": "wan3.0-video-prime",
        "input": {
          "prompt": "A small cat runs across moonlit rooftops while distant city neon flickers, cinematic lighting and a smooth tracking shot."
        },
        "parameters": {
          "resolution": "1080P",
          "ratio": "16:9",
          "duration": 5,
          "audio": true,
          "prompt_extend": true,
          "seed": 42,
          "watermark": false
        }
      }'
    ```
  </Tab>

  <Tab title="First frame">
    ```bash cURL theme={null}
    curl --request POST \
      --url https://www.anyfast.ai/v1/video/generations \
      --header 'Authorization: Bearer YOUR_API_KEY' \
      --header 'Content-Type: application/json' \
      --data '{
        "model": "wan3.0-video-prime",
        "input": {
          "prompt": "The graffiti character comes alive and performs an energetic English rap beneath a railway bridge at night. The camera pushes in smoothly.",
          "media": [{
            "type": "first_frame",
            "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png"
          }]
        },
        "parameters": {
          "resolution": "1080P",
          "ratio": "adaptive",
          "duration": 8,
          "audio": true,
          "prompt_extend": true,
          "watermark": false
        }
      }'
    ```
  </Tab>

  <Tab title="First and last frames">
    ```bash cURL theme={null}
    curl --request POST \
      --url https://www.anyfast.ai/v1/video/generations \
      --header 'Authorization: Bearer YOUR_API_KEY' \
      --header 'Content-Type: application/json' \
      --data '{
        "model": "wan3.0-video-prime",
        "input": {
          "prompt": "The girl changes from a gentle smile to a joyful laugh while the camera holds a natural close-up.",
          "media": [
            {"type": "first_frame", "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png"},
            {"type": "last_frame", "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260408/sjuytr/wan-r2v-object-girl.jpg"}
          ]
        },
        "parameters": {
          "resolution": "1080P",
          "ratio": "adaptive",
          "duration": 8,
          "audio": true,
          "prompt_extend": true,
          "watermark": false
        }
      }'
    ```
  </Tab>

  <Tab title="Multimodal reference">
    ```bash cURL theme={null}
    curl --request POST \
      --url https://www.anyfast.ai/v1/video/generations \
      --header 'Authorization: Bearer YOUR_API_KEY' \
      --header 'Content-Type: application/json' \
      --data '{
        "model": "wan3.0-video-prime",
        "input": {
          "prompt": "Video 1 holds Image 3 and performs on the chair from Image 4. Image 1 walks past carrying Image 2. Pace the scene to Audio 1.",
          "media": [
            {"type": "reference_image", "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260408/sjuytr/wan-r2v-object-girl.jpg"},
            {"type": "reference_video", "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/qigswt/wan-r2v-role2.mp4"},
            {"type": "reference_image", "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/rtjeqf/wan-r2v-object3.png"},
            {"type": "reference_image", "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/qpzxps/wan-r2v-object4.png"},
            {"type": "reference_image", "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/wfjikw/wan-r2v-backgroud5.png"},
            {"type": "reference_audio", "url": "https://example.com/country-ballad.mp3"}
          ]
        },
        "parameters": {
          "resolution": "1080P",
          "ratio": "adaptive",
          "duration": 5,
          "audio": true,
          "prompt_extend": true,
          "watermark": false
        }
      }'
    ```
  </Tab>

  <Tab title="File or webpage">
    Use one `file` item:

    ```bash cURL theme={null}
    curl --request POST \
      --url https://www.anyfast.ai/v1/video/generations \
      --header 'Authorization: Bearer YOUR_API_KEY' \
      --header 'Content-Type: application/json' \
      --data '{
        "model": "wan3.0-video-prime",
        "input": {
          "prompt": "Create a concise, futuristic product advertisement from the presentation, highlighting the design, materials, and core features.",
          "media": [{
            "type": "file",
            "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260806/ebapmr/glass.pptx"
          }]
        },
        "parameters": {
          "resolution": "1080P",
          "ratio": "16:9",
          "duration": 10,
          "audio": true,
          "prompt_extend": true,
          "watermark": false
        }
      }'
    ```

    Or replace it with one public webpage:

    ```bash cURL theme={null}
    curl --request POST \
      --url https://www.anyfast.ai/v1/video/generations \
      --header 'Authorization: Bearer YOUR_API_KEY' \
      --header 'Content-Type: application/json' \
      --data '{
        "model": "wan3.0-video-prime",
        "input": {
          "prompt": "Turn the main points on this page into a short explainer video.",
          "media": [{
            "type": "link",
            "url": "https://example.com/public-product-overview"
          }]
        },
        "parameters": {
          "resolution": "1080P",
          "ratio": "16:9",
          "duration": 10,
          "audio": true,
          "prompt_extend": true,
          "watermark": false
        }
      }'
    ```
  </Tab>
</Tabs>

## How Wan3.0 Video Prime selects the workflow

Wan3.0 Video Prime uses the media `type` values to select its generation workflow.

| Workflow              | `input.media` contents                                                                   | Compatibility rules                                            |
| --------------------- | ---------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
| Text to video         | Omit `input.media`                                                                       | `input.prompt` is required                                     |
| First frame           | One `first_frame`                                                                        | Do not add reference media, `file`, or `link`                  |
| First and last frames | One `first_frame` and one `last_frame`                                                   | Do not add reference media, `file`, or `link`                  |
| Multimodal reference  | Any supported combination of `reference_image`, `reference_video`, and `reference_audio` | Cannot be combined with `first_frame` or `last_frame`          |
| File reference        | At most one `file`                                                                       | Cannot be combined with `link`, `first_frame`, or `last_frame` |
| Webpage reference     | At most one `link`                                                                       | Cannot be combined with `file`, `first_frame`, or `last_frame` |

`input.prompt` and `input.media` are individually optional, but a request must include at least one of them. When you include media without a prompt, the model infers the generation intent from the media.

## Control the output

| Parameter                  | Behavior                                                                                                          |
| -------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| `parameters.resolution`    | `1080P` (default), `720P`, or `480P`                                                                              |
| `parameters.ratio`         | `adaptive` (default), `16:9`, `4:3`, `1:1`, `3:4`, or `9:16`                                                      |
| `parameters.duration`      | `5` seconds by default; use `-1` for smart duration selection                                                     |
| `parameters.audio`         | Defaults to `true`; set to `false` to omit the audio track. The price is the same for either value                |
| `parameters.prompt_extend` | Defaults to `true`; set to `false` to disable prompt rewriting. It must be `false` with `wan3.0-video-prime-nsfw` |
| `parameters.seed`          | Integer from `0` to `2147483647`                                                                                  |
| `parameters.watermark`     | Defaults to `false`; set to `true` to add a watermark                                                             |

Resolution values are service tiers rather than fixed width-by-height dimensions. The exact output dimensions vary with the selected aspect ratio.

Without a video input, set `duration` to an integer from 2 to 30 seconds or to `-1`. When a request contains reference video input, the total input-video duration plus output duration must not exceed 30 seconds.

All generated videos use a 30 fps frame rate.

## Input requirements

### Images

These requirements apply to `first_frame`, `last_frame`, and `reference_image` items.

| Property      | Requirement                                                                                               |
| ------------- | --------------------------------------------------------------------------------------------------------- |
| Input methods | Public URL or Base64 data URL                                                                             |
| Formats       | JPEG, JPG, PNG without an alpha channel, BMP, or WEBP                                                     |
| Dimensions    | Each side from 240 to 8,000 px                                                                            |
| Aspect ratio  | Between 1:8 and 8:1                                                                                       |
| File size     | Up to 20 MB per image                                                                                     |
| Count         | Up to 10 `reference_image` items; frame-guided requests use one first frame and optionally one last frame |

### Videos

| Property     | Requirement                                                            |
| ------------ | ---------------------------------------------------------------------- |
| Input method | Public URL                                                             |
| Formats      | MP4 or MOV                                                             |
| Dimensions   | Each side from 240 to 4,096 px                                         |
| Aspect ratio | Between 1:8 and 8:1                                                    |
| Duration     | 1–15 seconds each; no more than 15 seconds across all reference videos |
| File size    | Up to 100 MB per video                                                 |
| Count        | Up to 5 `reference_video` items                                        |

### Audio

| Property     | Requirement                                                                 |
| ------------ | --------------------------------------------------------------------------- |
| Input method | Public URL                                                                  |
| Formats      | WAV or MP3                                                                  |
| Duration     | 1–15 seconds each; no more than 15 seconds across all reference audio clips |
| File size    | Up to 15 MB per audio clip                                                  |
| Count        | Up to 5 `reference_audio` items                                             |

### Files and webpages

| Input          | Requirement                                                            |
| -------------- | ---------------------------------------------------------------------- |
| File types     | DOCX, DOC, XLSX, XLS, PPTX, PPT, PDF, TXT, KEY, PAGES, NUMBERS, or MD  |
| File access    | Public URL                                                             |
| File size      | Up to 100 MB                                                           |
| Page limit     | PDF, DOC/DOCX, PPT/PPTX, KEY, and PAGES files must not exceed 50 pages |
| File count     | At most one `file` item                                                |
| Webpage access | Public URL that opens without signing in                               |
| Webpage count  | At most one `link` item                                                |

<Warning>
  A `file` and a `link` cannot appear in the same request. Neither type can be combined with `first_frame` or `last_frame`.
</Warning>

## Prompting tips

* Describe the subject, action, setting, visual style, camera movement, timing, dialogue, music, and sound effects that matter to the result.
* Refer to multimodal inputs by type and order, such as `Image 1`, `Video 1`, and `Audio 1`, and state what each item should contribute.
* For first-and-last-frame generation, describe the motion and visual transition between the two frames.
* For file or webpage references, identify which facts, products, slides, or sections should appear and how they should be ordered.
* Keep `input.prompt` at or below 5,000 characters. Requests with a longer prompt are rejected; the service does not silently truncate the prompt.

## Query and retain the result

The create endpoint returns an asynchronous task ID. Poll `GET /v1/video/generations/{id}` until `status` reaches `SUCCESS` or `FAILURE`. A task can begin at `NOT_START`, then move through `QUEUED` and `IN_PROGRESS`; terminal states are `SUCCESS` and `FAILURE`. The `progress` field is a percentage string such as `"0%"` or `"100%"`.

Alibaba Cloud reports a typical generation time of 1–5 minutes and recommends polling at roughly 15-second intervals. This upstream estimate is not an AnyFast service-level commitment; actual AnyFast processing time can vary with the request and queue state.

```bash cURL theme={null}
curl --request GET \
  --url https://www.anyfast.ai/v1/video/generations/{TASK_ID} \
  --header 'Authorization: Bearer YOUR_API_KEY'
```

* The task can be queried for 24 hours after creation.
* The generated result URL remains valid for 24 hours.
* Download or transfer the video promptly after `status` reaches `SUCCESS`.

<Card title="Wan3.0 Video Prime API Reference" icon="code" href="/api-reference/model-api/alibaba/wan3.0-video-prime">
  View the complete request and response schema for every workflow.
</Card>

Sources: [Alibaba Cloud Wan3.0 Video Prime model page](https://www.alibabacloud.com/help/en/model-studio/wan3-0-video-prime) and [Wan3.0 video generation API reference](https://www.alibabacloud.com/help/en/model-studio/wan3-video-generation-api-reference).

<script src="/public/feedback.js" />
