# Wan 2.7

> 從文字、影格和參考素材生成、編輯或延長 720p 和 1080p 影片。

Wan 2.7 是 Alibaba 推出的 AI 影片生成模型。可透過 Kerox API 以模型 ID alibaba/wan-2.7 呼叫，或在 Studio 中直接生成，無需撰寫程式碼。在 Kerox 上的價格為 $0.0900 / 秒，比官方價格低 10% 起，無需訂閱。

## 定價

| 模型 | ID | 計費方式 | Kerox 費率 | 折扣 |
| --- | --- | --- | --- | --- |
| Wan 2.7 | `alibaba/wan-2.7` | 每秒 | 720p: $0.0900, 1080p: $0.1350 | 比官方價格低 10% |

- [Wan 2.7 價格](https://kerox.ai/zh-hant/pricing#pricing-alibaba/wan-2.7)
- [Wan 2.7 API 文件](https://kerox.ai/zh-hant/docs/models/alibaba/wan-2.7)
- [Wan 2.7](https://kerox.ai/zh-hant/models/alibaba/wan-2.7)

## 常見問題

### Wan 2.7 的價格是多少？

在 Kerox 上，Wan 2.7 的價格從 $0.0900 / 秒 起，比官方價格低 10%。按次計費，生成失敗不收費。本頁的價格表列出了所有選項。

### Wan 2.7 有提供 API 嗎？

有。使用模型 ID alibaba/wan-2.7 向 Kerox API 提交任務，再輪詢任務狀態，或在任務完成時接收 Webhook 通知。Wan 2.7 的 API 文件 列出所有參數，並附有程式碼範例。

### 不寫程式碼也能在線上使用 Wan 2.7 嗎？

可以。在 Kerox Studio 中開啟 Wan 2.7，輸入提示詞，即可直接在瀏覽器中生成。Studio 與 API 共用相同的餘額。

### 使用 Wan 2.7 需要訂閱嗎？

不需要。沒有方案，也沒有月費。最低儲值 $5，只需為實際生成的內容付費。

### 如何使用 Wan 2.7？

登入 Kerox，在 Studio 中開啟 Wan 2.7，輸入提示詞，即可在瀏覽器中生成。若要透過程式碼使用，請建立 API 金鑰，並以模型 ID alibaba/wan-2.7 送出任務。

### Wan 2.7 可以免費使用嗎？

Wan 2.7 是 Kerox 上的付費模型：每次成功生成皆依本頁價格計費，生成失敗不收費。沒有月費，最低儲值 $5 即可開始使用。


---

## Request example

Submit a task and get its id at once; get the result by polling (below) or by [webhook](https://kerox.ai/zh-hant/docs/webhooks.md). `webhook_url` and `metadata` are optional. To use a webhook, provide your own public HTTPS address in `webhook_url`. Every field is in [Submit a task](https://kerox.ai/zh-hant/docs/tasks.md#submit-body).

Set `KEROX_API_KEY` first. Polling requires Bash, curl and jq. For Python, run `pip install requests` first.

### cURL

```bash
curl --fail-with-body -X POST https://api.kerox.ai/v1/tasks \
  -H "Authorization: Bearer $KEROX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "alibaba/wan-2.7",
  "input": {
    "prompt": "a red fox running through fresh snow, cinematic lighting",
    "resolution": "720p",
    "duration": 5,
    "aspect_ratio": "16:9"
  }
}'
```

### Python

```python
import os
import requests

resp = requests.post(
    "https://api.kerox.ai/v1/tasks",
    headers={
        "Authorization": f"Bearer {os.environ['KEROX_API_KEY']}",
        "Content-Type": "application/json",
    },
    json={
        "model": "alibaba/wan-2.7",
        "input": {
            "prompt": "a red fox running through fresh snow, cinematic lighting",
            "resolution": "720p",
            "duration": 5,
            "aspect_ratio": "16:9",
        },
    },
    timeout=60,
)
resp.raise_for_status()
task = resp.json()
print(task["id"], task["status"])  # Save the id for polling
```

### Node.js

```javascript
const res = await fetch('https://api.kerox.ai/v1/tasks', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.KEROX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "model": "alibaba/wan-2.7",
    "input": {
      "prompt": "a red fox running through fresh snow, cinematic lighting",
      "resolution": "720p",
      "duration": 5,
      "aspect_ratio": "16:9"
    }
  }),
});
const task = await res.json();
if (!res.ok) throw new Error(JSON.stringify(task));
console.log(task.id, task.status); // Save the id for polling
```

### Go

```go
package main

import (
	"bytes"
	"fmt"
	"io"
	"net/http"
	"os"
	"time"
)

func main() {
	body := []byte(`{
  "model": "alibaba/wan-2.7",
  "input": {
    "prompt": "a red fox running through fresh snow, cinematic lighting",
    "resolution": "720p",
    "duration": 5,
    "aspect_ratio": "16:9"
  }
}`)
	req, _ := http.NewRequest("POST", "https://api.kerox.ai/v1/tasks", bytes.NewReader(body))
	req.Header.Set("Authorization", "Bearer "+os.Getenv("KEROX_API_KEY"))
	req.Header.Set("Content-Type", "application/json")
	client := &http.Client{Timeout: 60 * time.Second}
	resp, err := client.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()
	out, _ := io.ReadAll(resp.Body)
	if resp.StatusCode >= 400 {
		fmt.Fprintln(os.Stderr, string(out))
		os.Exit(1)
	}
	fmt.Println(string(out))
}
```

### Reference image

```bash
curl --fail-with-body -X POST https://api.kerox.ai/v1/tasks \
  -H "Authorization: Bearer $KEROX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "alibaba/wan-2.7",
  "input": {
    "prompt": "Image 1: the lighthouse beam sweeps slowly across the water",
    "resolution": "720p",
    "duration": 5,
    "aspect_ratio": "16:9",
    "images": [
      "https://cdn.kerox.ai/assets/samples/seedream-5.5/lighthouse-blue-hour.webp"
    ],
    "mode": "reference"
  }
}'
```

### First frame

```bash
curl --fail-with-body -X POST https://api.kerox.ai/v1/tasks \
  -H "Authorization: Bearer $KEROX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "alibaba/wan-2.7",
  "input": {
    "prompt": "A lighthouse beam sweeps slowly across the waves",
    "resolution": "720p",
    "duration": 5,
    "aspect_ratio": "16:9",
    "first_frame": "https://cdn.kerox.ai/assets/samples/seedream-5.5/lighthouse-blue-hour.webp"
  }
}'
```

### First and last frames

```bash
curl --fail-with-body -X POST https://api.kerox.ai/v1/tasks \
  -H "Authorization: Bearer $KEROX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "alibaba/wan-2.7",
  "input": {
    "prompt": "Slowly dissolve from the coast to the cabin by the lake",
    "resolution": "720p",
    "duration": 5,
    "aspect_ratio": "16:9",
    "first_frame": "https://cdn.kerox.ai/assets/samples/seedream-5.5/lighthouse-blue-hour.webp",
    "last_frame": "https://cdn.kerox.ai/assets/samples/seedream-5.0-pro/alpine-cabin-dawn.webp"
  }
}'
```

### Reference video

```bash
curl --fail-with-body -X POST https://api.kerox.ai/v1/tasks \
  -H "Authorization: Bearer $KEROX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "alibaba/wan-2.7",
  "input": {
    "prompt": "Use the camera motion of Video 1 for a flyover of a rocky coastline",
    "resolution": "720p",
    "duration": 5,
    "aspect_ratio": "16:9",
    "videos": [
      "https://cdn.kerox.ai/assets/samples/seedance-2.0/sea-stacks-fog.mp4"
    ]
  }
}'
```

### Edit a two-second clip

```bash
curl --fail-with-body -X POST https://api.kerox.ai/v1/tasks \
  -H "Authorization: Bearer $KEROX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "alibaba/wan-2.7",
  "input": {
    "prompt": "Turn the paper boat blue",
    "mode": "edit",
    "videos": [
      "https://cdn.kerox.ai/assets/samples/wan-2.7/paper-sail.mp4"
    ],
    "duration": 2
  }
}'
```

### Extend to seven seconds

```bash
curl --fail-with-body -X POST https://api.kerox.ai/v1/tasks \
  -H "Authorization: Bearer $KEROX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "alibaba/wan-2.7",
  "input": {
    "prompt": "Continue the boat’s drift",
    "mode": "extend",
    "videos": [
      "https://cdn.kerox.ai/assets/samples/wan-2.7/paper-sail.mp4"
    ],
    "duration": 7
  }
}'
```

### Reference audio

```bash
curl --fail-with-body -X POST https://api.kerox.ai/v1/tasks \
  -H "Authorization: Bearer $KEROX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "alibaba/wan-2.7",
  "input": {
    "prompt": "Show a dinosaur at dusk and time its roar to Audio 1",
    "resolution": "720p",
    "duration": 5,
    "aspect_ratio": "16:9",
    "audios": [
      "https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3"
    ]
  }
}'
```

## Parameters

The [parameter names](https://kerox.ai/zh-hant/docs/models.md) mean the same on every model.

| Parameter | Type | Required | Default | Values | Description | Example |
| --- | --- | --- | --- | --- | --- | --- |
| `prompt` | string | Yes | — | at least one non-whitespace character; 1–5000 characters | Text describing what to generate. | `"A lighthouse at dawn"` |
| `audio_setting` | string | No | — | auto, origin | Choose automatic audio or preserve the source soundtrack during a video edit. | `"auto"` |
| `mode` | string | No | — | reference, edit, extend | Select reference generation, video editing or extension. Without a mode the input selects text, frame or reference generation. | `"reference"` |
| `negative_prompt` | string | No | — | at least one non-whitespace character; 1–500 characters | Text describing what the result should not contain. | `"blurred lettering"` |
| `images` | string \| string[] | No | — | one public HTTPS URL; one string or an array of 1–5 items; Model file limits: image/jpeg, image/png, image/bmp or image/webp, up to 20 MB each; 240–8,000 px per side, aspect ratio 1:8–8:1 | Images for the model to draw on, in the order the prompt refers to them. | `"https://example.com/photo.png"` |
| `videos` | string \| string[] | No | — | one public HTTPS URL; one string or an array of 1–5 items | Videos for the model to draw on, in the order the prompt refers to them. | `"https://example.com/clip.mp4"` |
| `audios` | string \| string[] | No | — | one public HTTPS URL; one string or an array of 1–1 items | Audio clips for the model to draw on, in the order the prompt refers to them. | `"https://example.com/music.wav"` |
| `first_frame` | string | No | — | one public HTTPS URL; Model file limits: image/jpeg, image/png, image/bmp or image/webp, up to 20 MB each; 240–8,000 px per side, aspect ratio 1:8–8:1 | The image a video starts from. | `"https://example.com/start.png"` |
| `last_frame` | string | No | — | one public HTTPS URL; Model file limits: image/jpeg, image/png, image/bmp or image/webp, up to 20 MB each; 240–8,000 px per side, aspect ratio 1:8–8:1 | The image a video ends on. Needs `first_frame`. | `"https://example.com/end.png"` |
| `aspect_ratio` | string | No | — | 16:9, 9:16, 1:1, 4:3, 3:4 | Width to height of the output. | `"16:9"` |
| `resolution` | string | No | `"720p"` | 720p, 1080p | Output resolution tier. The exact pixels follow from it and `aspect_ratio`. | `"720p"` |
| `duration` | integer | No | `5` | 0–15 | Length of the output in whole seconds. | `5` |
| `seed` | integer | No | — | 0–2147483647 | The same seed and input give a similar result. | `0` |
| `prompt_extend` | boolean | No | `false` | true, false | Whether the maker rewrites and expands the prompt before generating. On Wan 3.0 and Prime, file or link enables rewriting automatically and requires true if specified. | `false` |
| `n` | integer | No | `1` | 1 | How many outputs one task may produce. | `1` |

- Omit mode to select by input. A prompt generates from text, first_frame animates an image and images/videos supply references. For editing or extension send mode=edit or extend with one source clip in videos.
- Reference images are free. Reference videos share five billable input seconds equally across clips. Editing accepts a 2–10 second source and bills input plus output. Omit duration or set it to 0 to match the source length, up to ten output seconds.
- Extension duration is the whole final length including the source, up to 15 seconds. A 2-second source accepts totals of 7–15 seconds. Add at least five whole seconds. Trim fractional sources to whole seconds first.
- Some short or uneven reference and edit clips cannot be offered at the quoted rate after duration rounding. Estimates and submissions explain the adjustment before any charge. Combine references, trim to whole seconds or increase the output duration.

Use a public HTTPS URL directly for images, audio and video. For local media, upload with `POST /v1/files` and pass the returned `url`. For upload MIME and size limits, see [Files & inputs](https://kerox.ai/zh-hant/docs/files.md#presigned).

Not supported yet: `watermark`.

## Polling and output

Poll `GET /v1/tasks/{id}`, or pass `webhook_url` when you submit and receive the same task object when it finishes: see [Webhooks](https://kerox.ai/zh-hant/docs/webhooks.md) for the setup. Output files expire at `expires_at` (7 days after completion), so download anything you want to keep. See every task field in [Tasks & polling](https://kerox.ai/zh-hant/docs/tasks.md#submit-response).

Set `TASK_ID` to the `id` returned on submission. The script waits up to 10 minutes, prints `error` on failure and downloads every `outputs[].url` on success.

```bash
(
  set -eu
  # Set TASK_ID to the id returned by the submit request.
  : "${TASK_ID:?Set TASK_ID}"
  deadline=$((SECONDS + 600))
  while (( SECONDS < deadline )); do
    task=$(curl --fail-with-body --silent --show-error --max-time "$((deadline - SECONDS))" https://api.kerox.ai/v1/tasks/"$TASK_ID" \
      -H "Authorization: Bearer $KEROX_API_KEY")
    case $(jq -er .status <<< "$task") in
      succeeded)
        if ! jq -e '.outputs | length > 0' <<< "$task" >/dev/null; then
          echo "Result files are unavailable." >&2
          exit 1
        fi
        i=0
        while IFS= read -r url; do
          file_path=${url%%\?*}
          filename="output-${i}.${file_path##*.}"
          curl --fail-with-body --silent --show-error --max-time 120 "$url" -o "$filename"
          printf "%s\n" "$filename"
          i=$((i + 1))
        done < <(jq -r '.outputs[].url' <<< "$task")
        exit 0 ;;
      failed) jq -c .error <<< "$task" >&2; exit 1 ;;
      processing) sleep 2 ;;
      *) echo "Unexpected task status." >&2; exit 1 ;;
    esac
  done
  echo "Poll timed out. Keep TASK_ID to check again later." >&2
  exit 1
)
```

### Success response JSON

Actual charges depend on your account price and task result.

```json
{
  "id": "task_01JD8X9B4Q2M7T8N3K5P6R1S0V",
  "object": "task",
  "model": "alibaba/wan-2.7",
  "status": "succeeded",
  "source": "api",
  "format": "unified",
  "input": {
    "prompt": "a red fox running through fresh snow, cinematic lighting",
    "resolution": "720p",
    "duration": 5,
    "aspect_ratio": "16:9"
  },
  "outputs": [
    {
      "type": "video",
      "url": "https://cdn.kerox.ai/t/task_01JD8X9B4Q2M7T8N3K5P6R1S0V/5f2b8c1e9d3a4f6b8a7c0d1e2f3a4b5c/0.mp4",
      "content_type": "video/mp4",
      "duration": 5
    }
  ],
  "outputs_deleted": false,
  "error": null,
  "cost": {
    "amount": "0.4500",
    "currency": "USD",
    "status": "settled"
  },
  "metadata": null,
  "warnings": [],
  "created_at": "2026-11-20T08:00:00Z",
  "started_at": "2026-11-20T08:00:01Z",
  "completed_at": "2026-11-20T08:01:10Z",
  "expires_at": "2026-11-27T08:01:10Z"
}
```

## Pricing

| Tier | Official / second | Kerox / second | Below official price |
| --- | --- | --- | --- |
| 720p | $0.1000 | $0.0900 | 10% |
| 1080p | $0.1500 | $0.1350 | 10% |

### Estimate before submitting

The returned `amount` is what submitting would hold. An estimate creates no task and charges nothing. When `exact` is `false`, the final charge may differ from the hold.

### Without a reference video

```bash
curl --fail-with-body -X POST https://api.kerox.ai/v1/estimate \
  -H "Authorization: Bearer $KEROX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "alibaba/wan-2.7",
  "input": {
    "prompt": "a red fox running through fresh snow, cinematic lighting",
    "resolution": "720p",
    "duration": 5,
    "aspect_ratio": "16:9"
  }
}'
```

### With a reference video

```bash
curl --fail-with-body -X POST https://api.kerox.ai/v1/estimate \
  -H "Authorization: Bearer $KEROX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "alibaba/wan-2.7",
  "input": {
    "prompt": "a red fox running through fresh snow, cinematic lighting",
    "resolution": "720p",
    "duration": 5,
    "aspect_ratio": "16:9",
    "videos": [
      "https://cdn.kerox.ai/assets/samples/seedance-2.0/sea-stacks-fog.mp4"
    ]
  }
}'
```

## Common usage

| Clip | Official price | Kerox | You save |
| --- | --- | --- | --- |
| 5 s · 720p | $0.5000 | $0.4500 | 10% |
| 10 s · 720p | $1.0000 | $0.9000 | 10% |
| 15 s · 720p | $1.5000 | $1.3500 | 10% |
| 5 s · 1080p | $0.7500 | $0.6750 | 10% |
| 10 s · 1080p | $1.5000 | $1.3500 | 10% |
| 15 s · 1080p | $2.2500 | $2.0250 | 10% |

- **$10 gets you**: 111 seconds of 720p video

## Input schema (JSON)

### Parameters (`unified.input_schema`)

```json
{
  "type": "object",
  "allOf": [
    {
      "if": {
        "required": [
          "first_frame"
        ],
        "properties": {
          "first_frame": true
        }
      },
      "then": {
        "not": {
          "anyOf": [
            {
              "required": [
                "mode"
              ],
              "properties": {
                "mode": {
                  "const": "edit"
                }
              }
            },
            {
              "required": [
                "mode"
              ],
              "properties": {
                "mode": {
                  "const": "extend"
                }
              }
            }
          ]
        }
      }
    },
    {
      "if": {
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "enum": [
              "extend",
              "edit"
            ]
          }
        }
      },
      "then": {
        "required": [
          "videos"
        ],
        "properties": {
          "videos": {
            "maxItems": 1
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "enum": [
              "extend"
            ]
          }
        }
      },
      "then": {
        "not": {
          "anyOf": [
            {
              "required": [
                "images"
              ],
              "properties": {
                "images": true
              }
            },
            {
              "required": [
                "aspect_ratio"
              ],
              "properties": {
                "aspect_ratio": true
              }
            }
          ]
        }
      }
    },
    {
      "if": {
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "enum": [
              "reference"
            ]
          }
        }
      },
      "then": {
        "anyOf": [
          {
            "required": [
              "videos"
            ],
            "properties": {
              "videos": true
            }
          },
          {
            "required": [
              "images"
            ],
            "properties": {
              "images": true
            }
          }
        ]
      }
    },
    {
      "if": {
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "enum": [
              "edit"
            ]
          }
        }
      },
      "else": {
        "properties": {
          "duration": {
            "minimum": 2
          }
        }
      },
      "then": {
        "properties": {
          "images": {
            "maxItems": 3
          },
          "duration": {
            "enum": [
              0,
              2,
              3,
              4,
              5,
              6,
              7,
              8,
              9,
              10
            ]
          }
        }
      }
    },
    {
      "if": {
        "allOf": [
          {
            "required": [
              "videos"
            ],
            "properties": {
              "videos": true
            }
          },
          {
            "not": {
              "required": [
                "mode"
              ],
              "properties": {
                "mode": {
                  "enum": [
                    "extend",
                    "edit"
                  ]
                }
              }
            }
          }
        ]
      },
      "then": {
        "properties": {
          "duration": {
            "maximum": 10
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "last_frame"
        ],
        "properties": {
          "last_frame": true
        }
      },
      "then": {
        "anyOf": [
          {
            "required": [
              "first_frame"
            ],
            "properties": {
              "first_frame": true
            }
          },
          {
            "required": [
              "mode"
            ],
            "properties": {
              "mode": {
                "const": "extend"
              }
            }
          }
        ]
      }
    },
    {
      "if": {
        "required": [
          "audio_setting"
        ],
        "properties": {
          "audio_setting": true
        }
      },
      "then": {
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "const": "edit"
          }
        }
      }
    },
    {
      "if": {
        "anyOf": [
          {
            "required": [
              "mode"
            ],
            "properties": {
              "mode": {
                "const": "edit"
              }
            }
          },
          {
            "required": [
              "mode"
            ],
            "properties": {
              "mode": {
                "const": "reference"
              }
            }
          },
          {
            "required": [
              "images"
            ],
            "properties": {
              "images": true
            }
          },
          {
            "allOf": [
              {
                "required": [
                  "videos"
                ],
                "properties": {
                  "videos": true
                }
              },
              {
                "not": {
                  "required": [
                    "mode"
                  ],
                  "properties": {
                    "mode": {
                      "const": "extend"
                    }
                  }
                }
              }
            ]
          }
        ]
      },
      "then": {
        "not": {
          "anyOf": [
            {
              "required": [
                "audios"
              ],
              "properties": {
                "audios": true
              }
            }
          ]
        }
      }
    },
    {
      "if": {
        "anyOf": [
          {
            "required": [
              "images"
            ],
            "properties": {
              "images": true
            }
          },
          {
            "required": [
              "mode"
            ],
            "properties": {
              "mode": {
                "const": "reference"
              }
            }
          },
          {
            "allOf": [
              {
                "required": [
                  "videos"
                ],
                "properties": {
                  "videos": true
                }
              },
              {
                "not": {
                  "required": [
                    "mode"
                  ],
                  "properties": {
                    "mode": {
                      "const": "extend"
                    }
                  }
                }
              }
            ]
          }
        ]
      },
      "then": {
        "not": {
          "anyOf": [
            {
              "required": [
                "last_frame"
              ],
              "properties": {
                "last_frame": true
              }
            }
          ]
        }
      }
    },
    {
      "if": {
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "const": "edit"
          }
        }
      },
      "then": {
        "not": {
          "anyOf": [
            {
              "required": [
                "aspect_ratio"
              ],
              "properties": {
                "aspect_ratio": true
              }
            }
          ]
        }
      }
    }
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "prompt"
  ],
  "properties": {
    "prompt": {
      "type": "string",
      "pattern": "\\S",
      "maxLength": 5000,
      "minLength": 1,
      "description": "Text describing what to generate.",
      "x-label-en": "Prompt",
      "x-label-zh": "提示词",
      "x-tier": "common"
    },
    "audio_setting": {
      "enum": [
        "auto",
        "origin"
      ],
      "type": "string",
      "description": "Choose automatic audio or preserve the source soundtrack during a video edit.",
      "x-label-en": "Edit audio",
      "x-label-zh": "编辑音轨",
      "x-tier": "advanced"
    },
    "mode": {
      "enum": [
        "reference",
        "edit",
        "extend"
      ],
      "type": "string",
      "description": "Select reference generation, video editing or extension. Without a mode the input selects text, frame or reference generation.",
      "x-label-en": "Video mode",
      "x-label-zh": "视频模式",
      "x-tier": "common"
    },
    "negative_prompt": {
      "type": "string",
      "pattern": "\\S",
      "maxLength": 500,
      "minLength": 1,
      "description": "Text describing what the result should not contain.",
      "x-label-en": "Negative prompt",
      "x-label-zh": "负向提示词",
      "x-tier": "advanced"
    },
    "images": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^https://"
        },
        {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^https://"
          },
          "maxItems": 5,
          "minItems": 1
        }
      ],
      "description": "Images for the model to draw on, in the order the prompt refers to them.",
      "x-label-en": "Reference images",
      "x-label-zh": "参考图",
      "x-tier": "common"
    },
    "videos": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^https://"
        },
        {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^https://"
          },
          "maxItems": 5,
          "minItems": 1
        }
      ],
      "description": "Videos for the model to draw on, in the order the prompt refers to them.",
      "x-label-en": "Reference videos",
      "x-label-zh": "参考视频",
      "x-tier": "advanced"
    },
    "audios": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^https://"
        },
        {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^https://"
          },
          "maxItems": 1,
          "minItems": 1
        }
      ],
      "description": "Audio clips for the model to draw on, in the order the prompt refers to them.",
      "x-label-en": "Reference audio",
      "x-label-zh": "参考音频",
      "x-tier": "advanced"
    },
    "first_frame": {
      "type": "string",
      "pattern": "^https://",
      "description": "The image a video starts from.",
      "x-label-en": "First frame",
      "x-label-zh": "首帧",
      "x-tier": "common"
    },
    "last_frame": {
      "type": "string",
      "pattern": "^https://",
      "description": "The image a video ends on. Needs `first_frame`.",
      "x-label-en": "Last frame",
      "x-label-zh": "尾帧",
      "x-tier": "advanced"
    },
    "aspect_ratio": {
      "enum": [
        "16:9",
        "9:16",
        "1:1",
        "4:3",
        "3:4"
      ],
      "type": "string",
      "description": "Width to height of the output.",
      "x-label-en": "Aspect ratio",
      "x-label-zh": "画面比例",
      "x-tier": "common"
    },
    "resolution": {
      "enum": [
        "720p",
        "1080p"
      ],
      "type": "string",
      "default": "720p",
      "description": "Output resolution tier. The exact pixels follow from it and `aspect_ratio`.",
      "x-label-en": "Resolution",
      "x-label-zh": "分辨率",
      "x-tier": "common"
    },
    "duration": {
      "type": "integer",
      "default": 5,
      "maximum": 15,
      "minimum": 0,
      "description": "Length of the output in whole seconds.",
      "x-label-en": "Duration",
      "x-label-zh": "时长",
      "x-tier": "common"
    },
    "seed": {
      "type": "integer",
      "maximum": 2147483647,
      "minimum": 0,
      "description": "The same seed and input give a similar result.",
      "x-label-en": "Seed",
      "x-label-zh": "随机种子",
      "x-tier": "advanced"
    },
    "prompt_extend": {
      "type": "boolean",
      "default": false,
      "description": "Whether the maker rewrites and expands the prompt before generating. On Wan 3.0 and Prime, file or link enables rewriting automatically and requires true if specified.",
      "x-label-en": "Prompt rewrite",
      "x-label-zh": "提示词扩写",
      "x-tier": "advanced"
    },
    "n": {
      "type": "integer",
      "const": 1,
      "default": 1,
      "description": "How many outputs one task may produce.",
      "x-label-en": "Number of outputs",
      "x-label-zh": "生成数量",
      "x-tier": "advanced"
    }
  },
  "x-unsupported": [
    "watermark"
  ],
  "additionalProperties": false
}
```
