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

# Wan 3.0

> Generate videos up to 30 seconds with audio from text, images, references, documents, or web pages. See parameters, pricing, and API examples.

Generate videos up to 30 seconds using Wan 3.0 with three modes: text-to-video, image-to-video (first frame or first + last frame), and reference-to-video (images, videos, audio, documents, or web pages as references). Audio generation is on by default.

## Model

```
alibaba/wan-3.0-video
```

## Modes

| Mode  | Description                                                                                |
| ----- | ------------------------------------------------------------------------------------------ |
| `t2v` | Generate video from a text prompt.                                                         |
| `i2v` | Generate video from a first frame, or a first + last frame pair.                           |
| `r2v` | Generate video from reference images, videos, audio clips, a document, or a web page link. |

## Common Parameters

| Parameter    | Type    | Required | Default      | Description                                                                         |
| ------------ | ------- | -------- | ------------ | ----------------------------------------------------------------------------------- |
| `mode`       | string  | No       | `"t2v"`      | `"t2v"`, `"i2v"`, or `"r2v"`                                                        |
| `prompt`     | string  | Depends  | `""`         | Text prompt (max 20,000 chars). Required for T2V and R2V                            |
| `resolution` | string  | No       | `"1080P"`    | `"480P"`, `"720P"`, or `"1080P"`                                                    |
| `ratio`      | string  | No       | `"adaptive"` | Aspect ratio (T2V/R2V): `"adaptive"`, `"16:9"`, `"4:3"`, `"1:1"`, `"3:4"`, `"9:16"` |
| `duration`   | integer | No       | `5`          | Output duration in seconds (2-30)                                                   |
| `audio`      | boolean | No       | `true`       | Generate an audio track for the video                                               |
| `watermark`  | boolean | No       | `false`      | Add "AI Generated" watermark to the output                                          |
| `seed`       | integer | No       | `null`       | Random seed (0-2147483647)                                                          |

***

## T2V Mode

Prompt only — no media inputs.

### Example - Basic Text-to-Video

```bash theme={null}
curl -X POST https://api.unifically.com/v1/tasks \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "alibaba/wan-3.0-video",
    "input": {
      "mode": "t2v",
      "prompt": "A kitten running in the moonlight, cinematic lighting",
      "resolution": "1080P",
      "ratio": "16:9",
      "duration": 10
    }
  }'
```

### Example - 30-Second Video

```bash theme={null}
curl -X POST https://api.unifically.com/v1/tasks \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "alibaba/wan-3.0-video",
    "input": {
      "mode": "t2v",
      "prompt": "A day in the life of a lighthouse keeper: sunrise over the sea, morning chores, a storm rolling in, and the beam cutting through the night",
      "resolution": "720P",
      "ratio": "16:9",
      "duration": 30
    }
  }'
```

***

## I2V Mode

### Parameters

| Parameter         | Type   | Required | Default | Description                                                                                 |
| ----------------- | ------ | -------- | ------- | ------------------------------------------------------------------------------------------- |
| `first_frame_url` | string | Yes      | `null`  | First frame image URL. Formats: JPEG, JPG, PNG, BMP, WEBP. Resolution: 240-8000px. Max 20MB |
| `last_frame_url`  | string | No       | `null`  | Last frame image URL. Same format limits. Requires `first_frame_url`                        |

Reference, file, and link inputs cannot be combined with I2V frames.

### Example - First Frame to Video

```bash theme={null}
curl -X POST https://api.unifically.com/v1/tasks \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "alibaba/wan-3.0-video",
    "input": {
      "mode": "i2v",
      "prompt": "The cat stretches and walks toward the camera",
      "first_frame_url": "https://example.com/cat.png",
      "resolution": "1080P",
      "duration": 8
    }
  }'
```

### Example - First + Last Frame

```bash theme={null}
curl -X POST https://api.unifically.com/v1/tasks \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "alibaba/wan-3.0-video",
    "input": {
      "mode": "i2v",
      "prompt": "A smooth transition from day to night over the city skyline",
      "first_frame_url": "https://example.com/day.png",
      "last_frame_url": "https://example.com/night.png",
      "duration": 10
    }
  }'
```

***

## R2V Mode

### Parameters

| Parameter              | Type      | Required | Default | Description                                                                          |
| ---------------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------ |
| `reference_image_urls` | string\[] | Depends  | `null`  | Reference images. Up to 10. Formats: JPEG, JPG, PNG, BMP, WEBP. Max 20MB each        |
| `reference_video_urls` | string\[] | Depends  | `null`  | Reference videos. Up to 5 clips, 15 seconds total. Formats: MP4, MOV. Max 100MB each |
| `reference_audio_urls` | string\[] | Depends  | `null`  | Reference audio clips. Up to 5 clips, 15 seconds total                               |
| `file_url`             | string    | Depends  | `null`  | Document URL (PDF, DOCX, PPTX, XLSX, and more). Max 100MB, 50 pages                  |
| `link_url`             | string    | Depends  | `null`  | Web page URL to generate the video from                                              |

### Validation Rules

* At least one reference URL, `file_url`, or `link_url` is required
* `first_frame_url` / `last_frame_url` cannot be combined with R2V inputs

### Example - Character References

```bash theme={null}
curl -X POST https://api.unifically.com/v1/tasks \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "alibaba/wan-3.0-video",
    "input": {
      "mode": "r2v",
      "prompt": "The character from the reference image walks through a sunlit garden and greets the camera",
      "reference_image_urls": ["https://example.com/person.png"],
      "resolution": "1080P",
      "ratio": "16:9",
      "duration": 10
    }
  }'
```

### Example - Document to Video

```bash theme={null}
curl -X POST https://api.unifically.com/v1/tasks \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "alibaba/wan-3.0-video",
    "input": {
      "mode": "r2v",
      "prompt": "Turn this pitch deck into a 20-second product explainer video with narration",
      "file_url": "https://example.com/pitch-deck.pdf",
      "resolution": "720P",
      "ratio": "16:9",
      "duration": 20
    }
  }'
```

***

## Input Limits

| Asset                  | Formats                         | Resolution                  | Duration                  | File Size  |
| ---------------------- | ------------------------------- | --------------------------- | ------------------------- | ---------- |
| First/last frame image | JPEG, JPG, PNG, BMP, WEBP       | 240-8000px, ratio up to 8:1 | —                         | 20MB       |
| Reference image        | JPEG, JPG, PNG, BMP, WEBP       | 240-8000px, ratio up to 8:1 | —                         | 20MB       |
| Reference video        | MP4, MOV                        | 240-4096px                  | 1-15s per clip, 15s total | 100MB each |
| Reference audio        | WAV, MP3                        | —                           | 15s total                 | —          |
| Document (`file_url`)  | PDF, DOCX, PPTX, XLSX, and more | —                           | max 50 pages              | 100MB      |

## Response

```json theme={null}
{
  "code": 200,
  "success": true,
  "data": {
    "task_id": "abc123def456",
    "status": "processing"
  }
}
```

<Note>
  **Volume discounts** are available for almost all models. Reach out at [contact@unifically.com](mailto:contact@unifically.com) to discuss custom pricing.
</Note>
