Wan 2.7 API
阿里巴巴 WAN 2.7——连贯的电影感视频,细节清晰、运动稳定、指令遵循能力强。文生视频、图生视频、参考生视频、视频编辑、视频延长均有独立端点,同系列中还有图像编辑和文生图变体。
视频输出 720p(默认)或 1080p。图像编辑可使用基础 Edit 变体或 Pro 变体(最高 2K 输出)。文生图可使用基础变体或 Pro 变体(最高 4K,带思考模式)。图生视频支持首/尾帧控制;视频延长支持尾帧和音频。
概览
关于 Wan 2.7 API
Wan 2.7 能做什么、它在 Alibaba 模型阵容中的定位,以及团队选择它的原因。
Wan 2.7 是 Alibaba 推出的视频生成模型,可通过 WaveSpeedAI REST API 使用。阿里巴巴 WAN 2.7——连贯的电影感视频,细节清晰、运动稳定、指令遵循能力强。文生视频、图生视频、参考生视频、视频编辑、视频延长均有独立端点,同系列中还有图像编辑和文生图变体。
视频输出 720p(默认)或 1080p。图像编辑可使用基础 Edit 变体或 Pro 变体(最高 2K 输出)。文生图可使用基础变体或 Pro 变体(最高 4K,带思考模式)。图生视频支持首/尾帧控制;视频延长支持尾帧和音频。
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 密钥调用多个变体,组合成多步骤流水线。
使用与 WaveSpeedAI 上其他 1,000 多个 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
提交预测
把你的输入以 JSON 形式 POST 到 https://api.wavespeed.ai/api/v3/alibaba/wan-2.7/text-to-video。端点会立即返回预测 ID——生成是异步的,因此推理期间你无需保持连接。
- 03
轮询完成状态
GET https://api.wavespeed.ai/api/v3/predictions/{request_id}/result。状态为 completed 时返回输出;状态为 failed、cancelled、timeout 或 deleted 时以错误终止;其他任何状态都继续轮询。
- 04
读取输出 URL
状态变为 "completed" 后,从 data.outputs[0] 读取 URL。该 URL 指向 WaveSpeedAI CDN 上你生成的媒体——具体是图片、视频、音频还是 3D 文件,取决于你调用的 Wan 2.7 变体。
应用场景
用 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 为文生视频、图生视频、参考生视频、视频编辑、视频延长、image-edit(及 image-edit-pro)、text-to-image(及 text-to-image-pro)提供独立的端点。请选择与输入相匹配的端点——效果远好于让一个变体包办一切。
- 02
参考生视频保持身份一致
alibaba/wan-2.7/reference-to-video 使用角色、道具或场景参考(来自图像或视频)生成新镜头,保留身份、风格和布局。当素材中有必须保持可辨识的特定主体时,这是合适的选择。
- 03
图生视频支持首/尾帧控制
alibaba/wan-2.7/image-to-video 允许为生成的片段指定首帧和尾帧,并可选配音频。当起止状态已锁定、只需模型补全中间的运动时很有用。
- 04
带尾帧和音频控制的视频延长
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 提交预测。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 对比 Seedance 2.0
Seedance 2.0 每个变体都带原生音频(Wan 2.7 仅在图生视频和视频延长中提供可选音频),并有快速的 Turbo 档位。Wan 2.7 的优势在于跨模态的广度——同系列中有图像编辑和文生图变体。
Wan 2.7 对比 Kling 3.0
Kling 3.0 有 Pro 和 4K 档位及运动控制端点。Wan 2.7 新增了 Kling 没有的参考生视频、image-edit、image-edit-pro 和文生图变体。
Wan 2.7 对比 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 形式提供。阿里巴巴 WAN 2.7——连贯的电影感视频,细节清晰、运动稳定、指令遵循能力强。文生视频、图生视频、参考生视频、视频编辑、视频延长均有独立端点,同系列中还有图像编辑和文生图变体。你可以通过编程方式调用它,也可以在上方链接的 Playground 中试用。
如何调用 Wan 2.7 API?
注册 WaveSpeedAI 账号,从 /accesskey 复制你的 API 密钥,然后把输入以 JSON 形式 POST 到 https://api.wavespeed.ai/api/v3/alibaba/wan-2.7/text-to-video。端点会返回预测 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 及 WaveSpeedAI 上 Alibaba 更多模型背后的团队。
阿里巴巴通义实验室推出了 Wan 系列视频模型和 Qwen 系列大语言模型。Wan 以开放权重发布、变体覆盖广泛(文生视频、图生视频、参考生视频、视频编辑、视频延长、图像编辑、文生图)而著称,并在运动稳定性和跨多语言提示词的提示词遵循方面表现稳定。
在 WaveSpeedAI 上用 Wan 2.7 开始构建
注册即送免费体验额度。一个 API 密钥,即可使用来自 Alibaba 及其他所有提供方的 1,000 多个 AI 模型。