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

# Wan 3.0 API

> Generate AI videos with Wan 3.0, Alibaba's unified video model. Text-to-video, first and last frames, and reference-guided generation from up to 10 images, 5 videos and 5 audios, from 2 to 30 seconds at 480p, 720p or 1080p with native audio. Standard and Prime tiers.

> [card] Wan 3.0
>
> One endpoint for every mode: generate from a prompt, from a first (and last) frame, or from a mix of reference images, videos and audios that you cite in the prompt.

Wan 3.0 is Alibaba's unified video generation model. A single request covers text-to-video, first/last frame image-to-video and reference-guided generation; the mode follows from the fields you send. It outputs MP4 videos from `2` to `30` seconds at 480p, 720p or 1080p, with a synchronized audio track (dialogue, sound effects, music) generated by default.

It comes in two tiers with the same parameters: **Wan 3.0**, and **Wan 3.0 Prime**, the same model on Alibaba's priority queue. Prime finishes a generation in about 2 minutes instead of about 14, at a higher price per second. Each tier has its own create, list and status endpoints.

### Key capabilities

* **Three modes in one endpoint**: Text-to-video, first/last frame, and reference-guided generation
* **Mixed references**: Up to **10** `image_urls`, **5** `video_urls` and **5** `audio_urls` in a single request
* **Cite references in the prompt**: Refer to them by position as `Image 1`, `Video 1`, `Audio 1`
* **Durations from 2 to 30 seconds** (default `5`)
* **Three resolutions**: `480P`, `720P` or `1080P` (default)
* **Native audio**: `generate_audio` (default `true`) adds a synchronized audio track at no extra cost
* **Two tiers**: Standard, or Prime for faster delivery
* **Async processing**: Webhook notification or polling for task completion

### Use cases

* **Character consistency**: Supply reference images of a subject and cite them as `Image 1` so the same character carries across shots
* **Motion and voice transfer**: Give a `video_urls` reference for movement, or an `audio_urls` reference for voice timbre
* **Product animation**: Animate a still with `start_image_url`, or transition to a final shot with `end_image_url`
* **Dialogue scenes**: Write the lines in the prompt and keep `generate_audio` on
* **Social media content**: Vertical `9:16` clips for TikTok, Instagram Reels and YouTube Shorts

### Generation modes

Keyframes and references are **mutually exclusive**. A request that mixes `start_image_url` or `end_image_url` with any of `image_urls`, `video_urls` or `audio_urls` is rejected.

| Mode | Required input | Optional input | Output behavior |
| - | - | - | - |
| **Text-to-Video** | `prompt` | `aspect_ratio`, `resolution`, `duration`, `generate_audio`, `seed` | Video generated entirely from the prompt |
| **First/Last frame** | `prompt` + `start_image_url` | `end_image_url`, `resolution`, `duration`, `generate_audio`, `seed` | Video starts from the first frame (and ends on the last one); the output follows the first frame's aspect ratio |
| **References** | `prompt` + at least one of `image_urls` / `video_urls` / `audio_urls` | the other reference fields, `aspect_ratio`, `resolution`, `duration`, `generate_audio`, `seed` | References steer subject, motion and sound; cite them in the prompt |

> [!WARNING]
>
> **Reference videos are billed.** Their combined duration is added to the output duration, capped at 15 seconds. A 5-second generation with one 4-second reference video is billed as 9 seconds. Reference images and audios add nothing to the price.

## API Operations

Generate a video with the endpoint of the tier you want, then track it with the list and status endpoints of that same tier. Generation returns a task ID for async polling or webhook notification.

> [card] [POST /v1/ai/video/wan-3-0](https://docs.magnific.com/api-reference/video/wan-3-0/generate.md)
>
> Create a Wan 3.0 video

> [card] [POST /v1/ai/video/wan-3-0-prime](https://docs.magnific.com/api-reference/video/wan-3-0/generate-prime.md)
>
> Create a Wan 3.0 Prime video

> [card] [GET /v1/ai/video/wan-3-0](https://docs.magnific.com/api-reference/video/wan-3-0/wan-3-0-tasks.md)
>
> List Wan 3.0 tasks

> [card] [GET /v1/ai/video/wan-3-0-prime](https://docs.magnific.com/api-reference/video/wan-3-0/wan-3-0-prime-tasks.md)
>
> List Wan 3.0 Prime tasks

> [card] [GET /v1/ai/video/wan-3-0/\{task-id}](https://docs.magnific.com/api-reference/video/wan-3-0/task-by-id.md)
>
> Get a Wan 3.0 task by ID

> [card] [GET /v1/ai/video/wan-3-0-prime/\{task-id}](https://docs.magnific.com/api-reference/video/wan-3-0/task-by-id-prime.md)
>
> Get a Wan 3.0 Prime task by ID

### Parameters

| Parameter | Type | Required | Default | Description |
| - | - | - | - | - |
| `prompt` | `string` | Yes | - | Description of the scene, action and dialogue (1-20,000 characters) |
| `image_urls` | `array` | No | - | Up to 10 reference images: public HTTPS URL, base64 or upload id (`upl_...`) |
| `video_urls` | `array` | No | - | Up to 5 reference videos: public HTTPS URL or video upload id (`upl_vid_...`). MP4 or MOV, 1-15 s each, 15 s combined. **Billed** |
| `audio_urls` | `array` | No | - | Up to 5 reference audios: public HTTPS URL. WAV or MP3, 1-15 s each, 15 s combined |
| `start_image_url` | `string` | No | - | First frame: public HTTPS URL, base64 or upload id. Sets the aspect ratio |
| `end_image_url` | `string` | No | - | Last frame. Requires `start_image_url` |
| `aspect_ratio` | `string` | No | `16:9` | `16:9`, `9:16`, `1:1`, `4:3`, `3:4`. Ignored with `start_image_url` |
| `resolution` | `string` | No | `1080P` | `480P`, `720P`, `1080P`. Sets the price per second |
| `duration` | `integer` | No | `5` | 2 to 30 seconds. Sets the price together with `resolution` |
| `generate_audio` | `boolean` | No | `true` | Generate a synchronized audio track. Does not change the price |
| `seed` | `integer` | No | random | 0 to 2147483647 |
| `webhook_url` | `string` | No | - | URL for async status notifications |

### Input limits

| Input | Formats | Limits |
| - | - | - |
| Images (`image_urls`, `start_image_url`, `end_image_url`) | JPEG, PNG (no alpha), BMP, WEBP | Up to 20 MB, 240-8000 px per side, aspect ratio up to 8:1 |
| Videos (`video_urls`) | MP4, MOV | 1-15 s each and 15 s combined, up to 100 MB, 240-4096 px per side, aspect ratio up to 8:1. Video references plus `duration` must not exceed 30 s |
| Audios (`audio_urls`) | WAV, MP3 | 1-15 s each and 15 s combined, up to 15 MB |

## Frequently Asked Questions

> [accordion] What is Wan 3.0 and how does it work?
>
> Wan 3.0 is Alibaba's unified video model. You send a `prompt`, optionally with a first frame or with reference images, videos and audios, and receive a task ID immediately. Poll the task endpoint or configure a `webhook_url` to receive the MP4 URL when processing completes. Each request generates one video.

> [accordion] What is the difference between Wan 3.0 and Wan 3.0 Prime?
>
> They are the same model with the same parameters and output. Prime runs on Alibaba's priority queue: a generation finishes in about 2 minutes instead of about 14, at a higher price per second. Use Prime when latency matters and Wan 3.0 when cost does.

> [accordion] How do I cite references in the prompt?
>
> By their position in each list: the first item of `image_urls` is `Image 1`, the second `Image 2`; the first item of `video_urls` is `Video 1`; the first item of `audio_urls` is `Audio 1`. For example: *"Image 1 walks along the beach of Video 1, speaking with the voice of Audio 1"*.

> [accordion] Can I send only a last frame?
>
> No. `end_image_url` requires `start_image_url`: a request with only a last frame is rejected with a 400 error and is not charged.

> [accordion] How are reference videos billed?
>
> The price is per second of the selected `resolution`. The billed seconds are `duration` plus the combined duration of the `video_urls`, capped at 15 seconds. Reference images, reference audios and `generate_audio` do not change the price. See the [Pricing page](https://docs.magnific.com/pricing.md) for current rates.

> [accordion] Which aspect ratio does the output have?
>
> The one you set in `aspect_ratio` (default `16:9`). With `start_image_url`, the output follows the first frame instead. `resolution` is the short side of the video: `480P` at `16:9` is 854x480.

> [accordion] What happens if my reference videos are too long?
>
> The request is rejected with a 400 error that names the field and is not charged. Each reference video must last 1 to 15 seconds, all of them 15 seconds combined, and their combined duration plus `duration` must not exceed 30 seconds.

> [accordion] Can I upload my media instead of hosting it?
>
> Yes. Upload it first through the uploads endpoint (`POST /v1/ai/uploads/request-url`) and pass the returned file id: `upl_img_...` in the image fields and `upl_vid_...` in `video_urls`. `audio_urls` takes public HTTPS URLs only.

> [accordion] What are the rate limits for Wan 3.0?
>
> Rate limits depend on your subscription tier. See [Rate Limits](https://docs.magnific.com/ratelimits.md) for current limits.

## Best practices

* **Describe action and dialogue**: Wan 3.0 follows long, multi-part prompts; write what happens and what is said
* **Cite every reference**: A reference the prompt never mentions may be ignored
* **Keep reference videos short**: They add to the billed seconds, up to 15 seconds
* **Iterate at 480P**: Explore with short, low-resolution generations and render the final clip at `1080P`
* **Production integration**: Use `webhook_url` instead of polling for scalable applications
* **Error handling**: Implement retry logic with exponential backoff for 503 errors

## Related APIs

* **[WAN 2.7](https://docs.magnific.com/api-reference/text-to-video/wan-2-7/overview.md)**: The previous Wan generation, with separate text, image, reference and edit endpoints
* **[MiniMax Hailuo 3](https://docs.magnific.com/api-reference/video/minimax-h3/overview.md)**: Reference-guided video generation from MiniMax
* **[Seedance 2.5 Pro](https://docs.magnific.com/api-reference/video/seedance-2-5-pro/overview.md)**: ByteDance video generation with reference videos


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