Wan 2.5 API
Alibaba Wan 2.5:最高 1080p 的文字轉影片與圖片轉影片,具同步音訊,同系列還有 video-extend、image-edit 與 text-to-image,影片端點皆有 Fast 版本。
本 Wan 2.5 API 指南介紹 WaveSpeedAI 上已上線的端點:具 Fast 版本的文字轉影片、圖片轉影片與 video-extend,以及 image-edit 與 text-to-image。下方的 Playground、範例、價格與 API 範例程式碼皆使用已上線的 Wan 2.5 端點。
概覽
關於 Wan 2.5 API
Wan 2.5 的功能、它在 Alibaba 模型陣容中的定位,以及團隊選用它的原因。
Wan 2.5 是來自 Alibaba 的影片生成模型,可透過 WaveSpeedAI REST API 使用。Alibaba Wan 2.5:最高 1080p 的文字轉影片與圖片轉影片,具同步音訊,同系列還有 video-extend、image-edit 與 text-to-image,影片端點皆有 Fast 版本。
本 Wan 2.5 API 指南介紹 WaveSpeedAI 上已上線的端點:具 Fast 版本的文字轉影片、圖片轉影片與 video-extend,以及 image-edit 與 text-to-image。下方的 Playground、範例、價格與 API 範例程式碼皆使用已上線的 Wan 2.5 端點。
WaveSpeedAI 上的 Wan 2.5 系列提供 8 個 REST 端點,涵蓋 Image-To-Image, Text-To-Image, Video-Extend, Text-To-Video, Image-To-Video 等工作流程。每個變體都有各自的定價、參數選項與範例輸出 — 請挑選符合您輸入模態與生產限制的版本,或使用同一組 API 金鑰呼叫多個變體,組合成多步驟的處理流程。
使用您呼叫其他 1,000+ 個 WaveSpeedAI AI 模型時相同的 API 金鑰、帳單帳戶與速率限制額度來執行 Wan 2.5。無需另外設定供應商、無需各家 SDK、無需處理各家不同的速率限制 — 一次整合,涵蓋從文字轉圖片、文字轉影片,到音訊合成、3D 生成、放大與編輯的所有功能。
規格
Wan 2.5 API 功能與上線狀態
開發者在選擇 API 前會查詢的模型專屬資訊:可用性、預期輸出長度、參考素材支援,以及目前可用的替代方案。
可用性
已上線
Wan 2.5 端點已在 WaveSpeedAI 目錄上線:文字轉影片、圖片轉影片與 video-extend(皆有 Fast 版本)、image-edit 與 text-to-image,全部使用同一套 REST 預測流程。
解析度
480p、720p、1080p
影片輸出可選 480p、720p 與 1080p,依端點而定;文字轉影片在每個解析度下都提供橫式與直式尺寸。
時長
3 到 10 秒
文字轉影片生成 5 或 10 秒的影片;圖片轉影片 Fast 與 video-extend 生成 3 到 10 秒。
音訊
同步音訊
影片端點會生成與畫面同步的音訊,也可選擇提供音訊檔(WAV 或 MP3,至少 3 秒,最大 15 MB)來引導生成。
Fast 版本
文字、圖片與延長
Wan 2.5 Fast 適用於文字轉影片、圖片轉影片與 video-extend,定位為更快、更實惠的生成。
圖片工具
編輯與 text-to-image
image-edit 可搭配提示詞接受最多兩張輸入圖片,text-to-image 則在與影片端點相同的系列中生成靜態圖。
端點
所有 Wan 2.5 API 端點
WaveSpeedAI 目前提供 8 個 Wan 2.5 端點 — 請選擇符合您工作流程的變體。
/filters:quality(82)/media/images/20260408104220_jymu91ex.webp)
Wan 2.5 Image Edit
Refine existing visuals with WAN 2.5 image-edit using prompt-driven adjustments and stylistic upgrades for photos and graphics. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408104211_97h9m7p7.webp)
Wan 2.5 Text To Image
WAN 2.5 Text-to-Image turns text prompts into AI-generated images with the WAN 2.5 model for on-demand image creation. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408104203_64hpvi1b.webp)
Wan 2.5 Video Extend Fast
WAN 2.5 Fast is an AI-powered video extender that turns short clips into longer videos while preserving audio tracks for seamless extensions. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408104158_jzbs7q2h.webp)
Wan 2.5 Video Extend
WAN 2.5 Video-Extend turns short clips into longer videos with preserved or generated synchronized audio for continuity. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408104214_334vajy7.webp)
Wan 2.5 Text To Video
WAN 2.5 makes 480p-1080p text/image-to-video with synced audio and is faster, more affordable than Google Veo3. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408104222_y5iz96kb.webp)
Wan 2.5 Text To Video Fast
WAN 2.5 Fast creates synchronized-audio videos from text or images in 720p, faster and more affordable than Google Veo3. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408104205_99s4gqxu.webp)
Wan 2.5 Image To Video Fast
WAN 2.5 Fast converts text or images into synchronized-audio videos in 480p, 720p, or 1080p, offering faster, more affordable generation compared to Google Veo3. REST API, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408104159_4c1hr4ym.webp)
Wan 2.5 Image To Video
WAN 2.5 converts text or images into videos (480p/720p/1080p) with synced audio, faster and more affordable than Google Veo3. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
範例
看看 Wan 2.5 的實際效果
由 Wan 2.5 API 生成的真實輸出。將滑鼠移到任一影片上即可預覽,點擊可開啟完整尺寸檢視器。
使用方式
如何使用 Wan 2.5 API
從註冊到完成生成,只要四個步驟。完整的 Python、Node.js 與 cURL 範例請見下方的 API 區段。
- 01
取得 API 金鑰
註冊 WaveSpeedAI 帳號,並從控制台複製您的 API 金鑰。新帳號會獲贈免費入門點數 — 足以在開始計費前執行數十次 Playground。
- 02
提交 prediction
將您的輸入以 JSON 格式 POST 到 https://api.wavespeed.ai/api/v3/alibaba/wan-2.5/text-to-video。端點會立即回傳 prediction id — 生成是非同步進行的,因此推論期間您不需要保持連線。
- 03
輪詢完成狀態
GET https://api.wavespeed.ai/api/v3/predictions/{request_id}/result。狀態為 completed 時回傳輸出;狀態為 failed、cancelled、timeout 或 deleted 時停止並回報錯誤;其他狀態則持續輪詢。
- 04
讀取輸出網址
當狀態為 "completed" 時,從 data.outputs[0] 讀取網址。該網址指向 WaveSpeedAI CDN 上您生成的媒體 — 依您呼叫的 Wan 2.5 變體,可能是圖片、影片、音訊或 3D 檔案。
應用情境
您可以用 Wan 2.5 打造什麼
開發者與創作者使用 Wan 2.5 API 的常見工作流程。
具同步音訊的文字轉影片
alibaba/wan-2.5/text-to-video 將提示詞轉為最高 1080p 的 5 或 10 秒影片,音訊與畫面一同生成。
由靜態圖生成影片
alibaba/wan-2.5/image-to-video 及其 Fast 版本依提示詞讓參考圖片動起來,Fast 端點支援 720p 或 1080p,時長 3 到 10 秒。
延長影片
alibaba/wan-2.5/video-extend 以保留或新生成的同步音訊接續既有影片,支援 480p、720p 或 1080p,Fast 版本能以較低成本完成相同工作。
用您自己的音訊引導影片
將音訊檔傳入影片端點來引導生成結果,例如讓動作跟隨一句台詞或一段節拍。
同系列內編輯圖片
alibaba/wan-2.5/image-edit 對一張或兩張圖片進行由提示詞驅動的編輯,讓靜態圖與影片出自同一個模型系列。
以 text-to-image 生成靜態圖
alibaba/wan-2.5/text-to-image 依提示詞生成圖片,尺寸以像素設定,最高 2880。
技巧
Wan 2.5 提示詞技巧
讓 Wan 2.5 產出更好結果的實用建議 — 整理自在實際生產流程中,影片模型通用的有效做法。
- 01
用 Fast 打樣,用標準端點交付
先用 Fast 版本測試提示詞與動作,再用標準端點生成最終影片。
- 02
依平台選擇尺寸
文字轉影片在 480p、720p 與 1080p 下都提供橫式與直式尺寸,生成前請依影片的播放場景選擇尺寸。
- 03
用音訊掌控節奏
一段至少 3 秒的短 WAV 或 MP3 可以引導生成,當動作需要跟隨台詞或節拍時很有幫助。
- 04
分小步延長
使用 video-extend 時,每次只延長幾秒,並描述接下來發生的內容,讓每一步都保持場景與音訊的連貫。
定價
Wan 2.5 API 定價
依輸出計費。最終費用會依您在各變體 Playground 中設定的參數(解析度、時長、輸出數量、參考素材)而調整。
| 端點 | 類型 | 起始價格 |
|---|---|---|
| alibaba/ | image-to-image | $0.035 |
| alibaba/ | text-to-image | $0.03 |
| alibaba/ | video-extend | $0.068 |
| alibaba/ | video-extend | $0.10 |
| alibaba/ | text-to-video | $0.10 |
| alibaba/ | text-to-video | $0.068 |
| alibaba/ | image-to-video | $0.068 |
| alibaba/ | image-to-video | $0.10 |
API
呼叫 Wan 2.5 API
請到 wavespeed.ai/accesskey 註冊取得 API 金鑰,然後透過 REST 提交 prediction。Playground 會為任何輸入組合產生可直接貼上的範例。
POSThttps://api.wavespeed.ai/api/v3/alibaba/wan-2.5/text-to-video
# 1. Submit the prediction.
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
-X POST "https://api.wavespeed.ai/api/v3/alibaba/wan-2.5/text-to-video" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $WAVESPEED_API_KEY" \
-d '{
"prompt": "A cinematic shot of a city at sunset, soft golden light",
"size": "1280*720",
"duration": 5,
"enable_prompt_expansion": false
}')
TASK=$(printf '%s' "$SUBMIT_RESPONSE" | jq 'if has("data") then .data else . end')
PREDICTION_ID=$(printf '%s' "$TASK" | jq -r '.id')
if [ -z "$PREDICTION_ID" ] || [ "$PREDICTION_ID" = "null" ]; then
printf 'Submission response did not contain a prediction id
' >&2
exit 1
fi
RESULT_URL="https://api.wavespeed.ai/api/v3/predictions/$PREDICTION_ID/result"
# 2. Poll until the prediction finishes.
while true; do
RESPONSE=$(curl --silent --show-error --fail-with-body "$RESULT_URL" \
-H "Authorization: Bearer $WAVESPEED_API_KEY")
RESULT=$(printf '%s' "$RESPONSE" | jq 'if has("data") then .data else . end')
STATUS=$(printf '%s' "$RESULT" | jq -r '.status')
case "$STATUS" in
completed) printf '%s\n' "$RESULT" | jq '.outputs'; break ;;
failed|cancelled|timeout|deleted) printf '%s\n' "$RESULT" | jq . >&2; exit 1 ;;
*) sleep 2 ;;
esac
doneconst submitUrl = "https://api.wavespeed.ai/api/v3/alibaba/wan-2.5/text-to-video";
const apiKey = process.env.WAVESPEED_API_KEY;
if (!apiKey) throw new Error('Set WAVESPEED_API_KEY');
async function requestJson(url, options = {}) {
const response = await fetch(url, options);
if (!response.ok) throw new Error(await response.text());
return response.json();
}
// 1. Submit the prediction.
const body = await requestJson(submitUrl, {
method: "POST",
headers: {
"Authorization": `Bearer ${apiKey}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"prompt": "A cinematic shot of a city at sunset, soft golden light",
"size": "1280*720",
"duration": 5,
"enable_prompt_expansion": false
}),
});
const task = body.data ?? body;
const resultUrl = `https://api.wavespeed.ai/api/v3/predictions/${task.id}/result`;
// 2. Poll until the prediction finishes.
while (true) {
const resultBody = await requestJson(resultUrl, {
headers: { "Authorization": `Bearer ${apiKey}` },
});
const result = resultBody.data ?? resultBody;
if (result.status === "completed") {
console.log(result.outputs);
break;
}
if (["failed", "cancelled", "timeout", "deleted"].includes(result.status)) throw new Error(JSON.stringify(result));
await new Promise(resolve => setTimeout(resolve, 2000));
}import json
import os
import time
from urllib.request import Request, urlopen
api_key = os.environ["WAVESPEED_API_KEY"]
headers = {"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"}
payload = {
"prompt": "A cinematic shot of a city at sunset, soft golden light",
"size": "1280*720",
"duration": 5,
"enable_prompt_expansion": False
}
def request_json(url, data=None):
request = Request(url, data=data, headers=headers, method="POST" if data else "GET")
with urlopen(request) as response:
return json.load(response)
# 1. Submit the prediction.
body = request_json("https://api.wavespeed.ai/api/v3/alibaba/wan-2.5/text-to-video", json.dumps(payload).encode())
task = body.get("data", body)
result_url = f"https://api.wavespeed.ai/api/v3/predictions/{task['id']}/result"
# 2. Poll until the prediction finishes.
while True:
result_body = request_json(result_url)
result = result_body.get("data", result_body)
status = result.get("status")
if status == "completed":
print(result.get("outputs", []))
break
if status in {"failed", "cancelled", "timeout", "deleted"}:
raise RuntimeError(result)
time.sleep(2)比較
Wan 2.5 與其他選擇比較
在 WaveSpeedAI 上,何時該選擇 Wan 2.5 而非類似的模型。
Wan 2.5 vs Wan 2.7
Wan 2.7 是較新的世代,更多端點支援 reference-to-video、video-edit 與 1080p 輸出。Wan 2.5 仍是具 Fast 版本與同步音訊的選擇。
Wan 2.5 vs Veo 3.1
目錄將 Wan 2.5 定位為比 Google Veo 3 更快、更實惠,支援音訊引導生成與 video-extend。Veo 3.1 在 1080p 下提供 Standard、Fast 與 Lite 等級。
Wan 2.5 vs Kling 2.6
Kling 2.6 多了動作控制端點與 create-voice 端點。Wan 2.5 在同一系列中涵蓋 480p 到 1080p 的同步音訊影片、video-extend、image-edit 與 text-to-image。
常見問題
Wan 2.5 API — 常見問題
定價、授權、整合 — 關於在 WaveSpeedAI 上執行 Wan 2.5 的常見問題。
Wan 2.5 支援哪些解析度?
影片端點輸出 480p、720p 與 1080p,依端點而定。文字轉影片另提供直式尺寸,圖片轉影片 Fast 輸出 720p 或 1080p。
Wan 2.5 會生成音訊嗎?
會。影片端點生成與畫面同步的音訊,您也可以選擇傳送音訊檔來引導結果。
Wan 2.5 Fast 是什麼?
文字轉影片、圖片轉影片與 video-extend 的 Fast 版本,定位為比標準版本更快、更實惠的生成。
可以用 Wan 2.5 延長既有影片嗎?
可以。video-extend 端點會將一段短片接續成更長的影片,以保留或新生成的同步音訊接續,並且有 Fast 版本。
什麼是 Wan 2.5 API?
Wan 2.5 是 Alibaba 的影片生成模型,在 WaveSpeedAI 上以 REST API 提供。Alibaba Wan 2.5:最高 1080p 的文字轉影片與圖片轉影片,具同步音訊,同系列還有 video-extend、image-edit 與 text-to-image,影片端點皆有 Fast 版本。您可以透過程式呼叫,也可以在上方連結的 Playground 試用。
如何呼叫 Wan 2.5 API?
註冊 WaveSpeedAI 帳號,從 /accesskey 複製您的 API 金鑰,然後將您的輸入以 JSON 格式 POST 到 https://api.wavespeed.ai/api/v3/alibaba/wan-2.5/text-to-video。端點會回傳 prediction id。請從約每 2 秒輪詢一次結果端點開始,長時間任務可拉長間隔,並在任何終止狀態時停止。上方提供適用於生產環境的 Python / Node.js / cURL 範例。
Wan 2.5 API 的費用是多少?
Wan 2.5 每次執行 $0.03 起。實際費用會依您設定的參數(解析度、時長、輸出數量、參考素材)而調整。Playground 中「生成」按鈕旁的即時費用預覽會顯示您目前輸入的確切價格。
有哪些 Wan 2.5 變體可用?
WaveSpeedAI 提供 8 個已上線的 Wan 2.5 端點:alibaba/wan-2.5/image-edit, alibaba/wan-2.5/text-to-image, alibaba/wan-2.5/video-extend-fast, alibaba/wan-2.5/video-extend, alibaba/wan-2.5/text-to-video, alibaba/wan-2.5/text-to-video-fast, alibaba/wan-2.5/image-to-video-fast, alibaba/wan-2.5/image-to-video。每個變體都有各自的 Playground 頁面與定價。
Wan 2.5 的輸出可以商用嗎?
商業使用權依 Alibaba 的模型授權而定。多數 Alibaba 模型允許商用輸出;請參閱各模型 Playground 頁面中的授權摘要,以及 WaveSpeedAI 的服務條款了解平台層級的條件。
為什麼要在 WaveSpeedAI 上使用 Wan 2.5,而不是直接使用?
一組 API 金鑰、一個帳單帳戶,即可使用 Wan 2.5 以及來自其他供應商的 1,000+ 個 AI 模型。無需設定各家 SDK、無需處理各自獨立的速率限制、無需為每個供應商重寫整合程式碼。價格通常與 Alibaba 的直接 API 相當或更低。
提供者
關於 Alibaba
Wan 2.5 背後的團隊,以及 Alibaba 在 WaveSpeedAI 上的完整模型陣容。
Alibaba 通義實驗室打造了 Wan 影片模型系列與 Qwen 大型語言模型系列。Wan 的特色在於以開放權重釋出、版本涵蓋廣泛(文字轉影片、圖片轉影片、參考轉影片、video-edit、video-extend、image-edit、文字轉圖片),並在多語言提示詞下持續展現出色的動態穩定性與提示詞遵循度。
在 WaveSpeedAI 上開始使用 Wan 2.5 打造應用
註冊即贈免費入門點數。一組 API 金鑰,涵蓋來自 Alibaba 與所有其他供應商的 1,000+ 個 AI 模型。