Wan 2.7 API
Alibaba WAN 2.7 生成連貫的電影感影片,細節清晰、動態穩定,且指令遵循度高。文字轉影片、圖片轉影片、參考轉影片、video-edit、video-extend 各有獨立端點,同系列另有圖片編輯與文字轉圖片版本。
影片輸出為 720p(預設)或 1080p。圖片編輯可使用基礎 Edit 版本或 Pro 版本(最高 2K 輸出)。文字轉圖片可使用基礎版本或 Pro 版本(開啟思考模式後最高 4K)。圖片轉影片支援首尾幀控制;video-extend 支援尾幀與音訊。
概覽
關於 Wan 2.7 API
Wan 2.7 的功能、它在 Alibaba 模型陣容中的定位,以及團隊選用它的原因。
Wan 2.7 是來自 Alibaba 的影片生成模型,可透過 WaveSpeedAI REST API 使用。Alibaba WAN 2.7 生成連貫的電影感影片,細節清晰、動態穩定,且指令遵循度高。文字轉影片、圖片轉影片、參考轉影片、video-edit、video-extend 各有獨立端點,同系列另有圖片編輯與文字轉圖片版本。
影片輸出為 720p(預設)或 1080p。圖片編輯可使用基礎 Edit 版本或 Pro 版本(最高 2K 輸出)。文字轉圖片可使用基礎版本或 Pro 版本(開啟思考模式後最高 4K)。圖片轉影片支援首尾幀控制;video-extend 支援尾幀與音訊。
WaveSpeedAI 上的 Wan 2.7 系列提供 10 個 REST 端點,涵蓋 Text-To-Image, Video-Extend, Reference-To-Video, Text-To-Video, Video-To-Video, Image-To-Image, Image-To-Video 等工作流程。每個變體都有各自的定價、參數選項與範例輸出 — 請挑選符合您輸入模態與生產限制的版本,或使用同一組 API 金鑰呼叫多個變體,組合成多步驟的處理流程。
使用您呼叫其他 1,000+ 個 WaveSpeedAI AI 模型時相同的 API 金鑰、帳單帳戶與速率限制額度來執行 Wan 2.7。無需另外設定供應商、無需各家 SDK、無需處理各家不同的速率限制 — 一次整合,涵蓋從文字轉圖片、文字轉影片,到音訊合成、3D 生成、放大與編輯的所有功能。
端點
所有 Wan 2.7 API 端點
WaveSpeedAI 目前提供 10 個 Wan 2.7 端點 — 請選擇符合您工作流程的變體。
/filters:quality(82)/media/images/20260408104400_gquo9ixf.webp)
Wan 2.7 Text To Image
WAN 2.7 Text-to-Image generates high-quality images from text prompts with thinking mode for enhanced image quality. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408104356_turpamao.webp)
Wan 2.7 Text To Image Pro
WAN 2.7 Text-to-Image Pro generates high-quality images up to 4K from text prompts with thinking mode for enhanced image quality. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408104334_n09m1gpi.webp)
Wan 2.7 Video Extend
WAN 2.7 Video Extend extends existing videos with optional last frame control and audio support, supporting 720p/1080p output. Ready-to-use REST inference API, best performance, no cold starts, affordable pricing.
/filters:quality(82)/media/images/20260408104342_ej302cia.webp)
Wan 2.7 Reference To Video
WAN 2.7 Reference-to-Video turns character, prop, or scene references from images or videos into new video shots with preserved identity, style, and layout plus smooth, coherent motion. Ready-to-use REST inference API, best performance, no cold starts, affordable pricing.
/filters:quality(82)/media/images/20260408104404_mqejvdc5.webp)
Wan 2.7 Text To Video
WAN 2.7 Text-to-Video turns plain prompts into coherent, cinematic clips with crisp detail, stable motion, and strong instruction-following—great for ads, explainers, and social posts. Ready-to-use REST inference API, best performance, no cold starts, affordable pricing.
/filters:quality(82)/media/images/20260408104408_wr1r10h3.webp)
Wan 2.7 Video Edit
WAN 2.7 Video Edit performs prompt-driven video editing with multi-image reference support, supporting 720p/1080p output. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408104411_n33dp5gc.webp)
Wan 2.7 Image Edit
WAN 2.7 Image Edit performs prompt-driven image editing with support for multiple-image references. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408104338_4kdl2itm.webp)
Wan 2.7 Image To Video
WAN 2.7 converts images into videos (720p/1080p) with optional audio, supporting first and last frame control. Ready-to-use REST inference API, best performance, no cold starts, affordable pricing.
/filters:quality(82)/media/images/1780805363960584973_J6AfozIS.webp)
Wan 2.7 Image To Video Pro
Wan 2.7 Image to Video Pro is a fast AI image-to-video generation model that converts images into premium-quality videos with superior motion dynamics, enhanced visual fidelity, and professional cinematic output. Ready-to-use REST inference API for product videos, advertising creatives, cinematic clips, social media content, character animation, visual storytelling, and professional image-to-video workflows with simple integration, no coldstarts, and affordable pricing.
/filters:quality(82)/media/images/20260408104351_icjk73ba.webp)
Wan 2.7 Image Edit Pro
WAN 2.7 Image Edit Pro performs prompt-driven image editing with multi-image reference support and up to 2K output. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
範例
看看 Wan 2.7 的實際效果
由 Wan 2.7 API 生成的真實輸出。將滑鼠移到任一影片上即可預覽,點擊可開啟完整尺寸檢視器。
使用方式
如何使用 Wan 2.7 API
從註冊到完成生成,只要四個步驟。完整的 Python、Node.js 與 cURL 範例請見下方的 API 區段。
- 01
取得 API 金鑰
註冊 WaveSpeedAI 帳號,並從控制台複製您的 API 金鑰。新帳號會獲贈免費入門點數 — 足以在開始計費前執行數十次 Playground。
- 02
提交 prediction
將您的輸入以 JSON 格式 POST 到 https://api.wavespeed.ai/api/v3/alibaba/wan-2.7/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.7 變體,可能是圖片、影片、音訊或 3D 檔案。
應用情境
您可以用 Wan 2.7 打造什麼
開發者與創作者使用 Wan 2.7 API 的常見工作流程。
指令遵循度高的文字轉影片
alibaba/wan-2.7/text-to-video 可將一般提示詞轉為連貫的電影感影片。目錄定位:「適合廣告、解說影片與社群貼文」。預設 720p,可選 1080p。
支援畫格控制的圖片轉影片
alibaba/wan-2.7/image-to-video 支援首尾幀控制並可選配音訊,適合需要讓生成內容從特定靜態圖開始、並在特定靜態圖結束的影片。
以參考轉影片維持身分
alibaba/wan-2.7/reference-to-video 使用角色、道具或場景參考(來自圖片或影片),生成保留身分、風格與版面的新鏡頭,整段生成的動態流暢連貫。
支援多圖參考的影片編輯
alibaba/wan-2.7/video-edit 可對輸入影片進行由提示詞驅動的編輯,支援多圖參考,輸出 720p/1080p。適用於風格上的重新編輯,以及對現有素材的局部修改。
同系列的圖片編輯
alibaba/wan-2.7/image-edit 與 image-edit-pro(最高 2K 輸出)可依提示詞搭配多圖參考進行圖片編輯,與影片工具屬於同一系列,適合靜態圖轉影片的管線。
具思考模式的文字轉圖片
alibaba/wan-2.7/text-to-image-pro 可生成最高 4K 的圖片,並提供「思考模式」以提升品質。適合在與影片生成相同的 Wan 2.7 系列中處理靜態圖像。
技巧
Wan 2.7 提示詞技巧
讓 Wan 2.7 產出更好結果的實用建議 — 整理自在實際生產流程中,影片模型通用的有效做法。
- 01
依任務選擇版本
Wan 2.7 為文字轉影片、圖片轉影片、參考轉影片、video-edit、video-extend、image-edit(及 image-edit-pro)、文字轉圖片(及 text-to-image-pro)提供各自獨立的端點。請選擇符合您輸入的端點,效果明顯優於要求單一版本包辦所有事。
- 02
參考轉影片可保留身分
alibaba/wan-2.7/reference-to-video 使用角色、道具或場景參考(來自圖片或影片),生成保留身分、風格與版面的新鏡頭。當來源素材中有必須保持可辨識的特定主體時,這是正確的選擇。
- 03
圖片轉影片支援首尾幀控制
alibaba/wan-2.7/image-to-video 可指定生成影片的首幀與尾幀,並可選配音訊。適合起始與結束狀態已鎖定、需要模型填補中間動態的情境。
- 04
具尾幀與音訊控制的 video-extend
alibaba/wan-2.7/video-extend 可延伸現有影片,並提供選用的尾幀控制與音訊支援,輸出 720p/1080p。適合拼接延伸片段,且需要明確控制延伸結束位置的情況。
- 05
在 text-to-image-pro 使用「思考模式」
alibaba/wan-2.7/text-to-image-pro 可生成最高 4K 的圖片,並提供「思考模式」以提升圖像品質。當靜態圖作業與影片生成同屬 Wan 2.7 系列,且希望靜態圖與動態保持一致風格時相當實用。
- 06
有意識地選擇 720p 或 1080p
Wan 2.7 在多數版本中支援 720p 與 1080p 輸出。720p 是預設且較便宜的選項;當交付解析度很重要,且額外細節值得多付成本時,再選擇 1080p。
定價
Wan 2.7 API 定價
依輸出計費。最終費用會依您在各變體 Playground 中設定的參數(解析度、時長、輸出數量、參考素材)而調整。
| 端點 | 類型 | 起始價格 |
|---|---|---|
| alibaba/ | text-to-image | $0.03 |
| alibaba/ | text-to-image | $0.075 |
| alibaba/ | video-extend | $0.50 |
| alibaba/ | reference-to-video | $0.50 |
| alibaba/ | text-to-video | $0.50 |
| alibaba/ | video-to-video | $0.50 |
| alibaba/ | image-to-image | $0.03 |
| alibaba/ | image-to-video | $0.50 |
| alibaba/ | image-to-video | $0.60 |
| alibaba/ | image-to-image | $0.075 |
API
呼叫 Wan 2.7 API
請到 wavespeed.ai/accesskey 註冊取得 API 金鑰,然後透過 REST 提交 prediction。Playground 會為任何輸入組合產生可直接貼上的範例。
POSThttps://api.wavespeed.ai/api/v3/alibaba/wan-2.7/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.7/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",
"resolution": "720p",
"aspect_ratio": "16:9",
"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.7/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",
"resolution": "720p",
"aspect_ratio": "16:9",
"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",
"resolution": "720p",
"aspect_ratio": "16:9",
"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.7/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.7 與其他選擇比較
在 WaveSpeedAI 上,何時該選擇 Wan 2.7 而非類似的模型。
Wan 2.7 vs Seedance 2.0
Seedance 2.0 在所有版本皆具原生音訊(Wan 2.7 僅在圖片轉影片與 video-extend 提供選用音訊),並有快速的 Turbo 等級。Wan 2.7 則在跨模態的廣度上勝出:同系列有圖片編輯與文字轉圖片版本。
Wan 2.7 vs Kling 3.0
Kling 3.0 提供 Pro 與 4K 等級以及動作控制端點。Wan 2.7 新增 Kling 沒有的參考轉影片、image-edit、image-edit-pro 與文字轉圖片版本。
Wan 2.7 vs Wan 2.2
Wan 2.7 是較新的架構。Wan 2.2(WaveSpeedAI 版本)則提供 2.7 所沒有的專用端點:Animate(120 秒角色動畫)、Speech-to-Video(10 分鐘音訊驅動)、Fun-Control(Apache 2.0)以及 LoRA 訓練器。
常見問題
Wan 2.7 API — 常見問題
定價、授權、整合 — 關於在 WaveSpeedAI 上執行 Wan 2.7 的常見問題。
什麼是 Wan 2.7 API?
Wan 2.7 是 Alibaba 的影片生成模型,在 WaveSpeedAI 上以 REST API 提供。Alibaba WAN 2.7 生成連貫的電影感影片,細節清晰、動態穩定,且指令遵循度高。文字轉影片、圖片轉影片、參考轉影片、video-edit、video-extend 各有獨立端點,同系列另有圖片編輯與文字轉圖片版本。您可以透過程式呼叫,也可以在上方連結的 Playground 試用。
如何呼叫 Wan 2.7 API?
註冊 WaveSpeedAI 帳號,從 /accesskey 複製您的 API 金鑰,然後將您的輸入以 JSON 格式 POST 到 https://api.wavespeed.ai/api/v3/alibaba/wan-2.7/text-to-video。端點會回傳 prediction id。請從約每 2 秒輪詢一次結果端點開始,長時間任務可拉長間隔,並在任何終止狀態時停止。上方提供適用於生產環境的 Python / Node.js / cURL 範例。
Wan 2.7 API 的費用是多少?
Wan 2.7 每次執行 $0.03 起。實際費用會依您設定的參數(解析度、時長、輸出數量、參考素材)而調整。Playground 中「生成」按鈕旁的即時費用預覽會顯示您目前輸入的確切價格。
有哪些 Wan 2.7 變體可用?
WaveSpeedAI 提供 10 個已上線的 Wan 2.7 端點:alibaba/wan-2.7/text-to-image, alibaba/wan-2.7/text-to-image-pro, alibaba/wan-2.7/video-extend, alibaba/wan-2.7/reference-to-video, alibaba/wan-2.7/text-to-video, alibaba/wan-2.7/video-edit, alibaba/wan-2.7/image-edit, alibaba/wan-2.7/image-to-video等。每個變體都有各自的 Playground 頁面與定價。
Wan 2.7 的輸出可以商用嗎?
商業使用權依 Alibaba 的模型授權而定。多數 Alibaba 模型允許商用輸出;請參閱各模型 Playground 頁面中的授權摘要,以及 WaveSpeedAI 的服務條款了解平台層級的條件。
為什麼要在 WaveSpeedAI 上使用 Wan 2.7,而不是直接使用?
一組 API 金鑰、一個帳單帳戶,即可使用 Wan 2.7 以及來自其他供應商的 1,000+ 個 AI 模型。無需設定各家 SDK、無需處理各自獨立的速率限制、無需為每個供應商重寫整合程式碼。價格通常與 Alibaba 的直接 API 相當或更低。
提供者
關於 Alibaba
Wan 2.7 背後的團隊,以及 Alibaba 在 WaveSpeedAI 上的完整模型陣容。
Alibaba 通義實驗室打造了 Wan 影片模型系列與 Qwen 大型語言模型系列。Wan 的特色在於以開放權重釋出、版本涵蓋廣泛(文字轉影片、圖片轉影片、參考轉影片、video-edit、video-extend、image-edit、文字轉圖片),並在多語言提示詞下持續展現出色的動態穩定性與提示詞遵循度。
在 WaveSpeedAI 上開始使用 Wan 2.7 打造應用
註冊即贈免費入門點數。一組 API 金鑰,涵蓋來自 Alibaba 與所有其他供應商的 1,000+ 個 AI 模型。