影片 Alibaba

Wan API

透過 RunAPI 使用 Wan API,包含 model skill、統一驗證與按用量計費。

runapi.ai
curl -X POST https://runapi.ai/api/v1/wan/image_to_video \
  -H "Authorization: Bearer $RUNAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "wan-2.7-text-to-video",
  "first_frame_image_url": "https://cdn.runapi.ai/public/samples/image.jpg",
  "prompt": "生成一段 5 秒影片:一隻貓跳上書架,自然室內光線,手持鏡頭感。"
}'
import { WanClient } from "@runapi.ai/wan";

const client = new WanClient();
const result = await client.imageToVideo.run({
    model: "wan-2.7-text-to-video",
    first_frame_image_url: "https://cdn.runapi.ai/public/samples/image.jpg",
    prompt: "生成一段 5 秒影片:一隻貓跳上書架,自然室內光線,手持鏡頭感。",
});
<?php

require __DIR__ . "/vendor/autoload.php";

use RunApi\Wan\WanClient;

$client = new WanClient();
$result = $client->imageToVideo->run([
        'model' => 'wan-2.7-text-to-video',
        'first_frame_image_url' => 'https://cdn.runapi.ai/public/samples/image.jpg',
        'prompt' => '生成一段 5 秒影片:一隻貓跳上書架,自然室內光線,手持鏡頭感。',
]);
require "runapi/wan"

client = RunApi::Wan::Client.new
result = client.image_to_video.run(
    model: "wan-2.7-text-to-video",
    first_frame_image_url: "https://cdn.runapi.ai/public/samples/image.jpg",
    prompt: "生成一段 5 秒影片:一隻貓跳上書架,自然室內光線,手持鏡頭感。"
)
npx skills add runapi-ai/wan -g
# Claude Code
claude mcp add runapi -s user -- npx -y @runapi.ai/mcp

# Codex
codex plugin install runapi-mcp@agents

# Cursor / Windsurf / VS Code
npx @runapi.ai/mcp init cursor
@runapi.ai/wan v1
OVERVIEW

關於 Wan

Wan 是 Alibaba 的全面影片及圖片生成套件,涵蓋文字生成影片、圖片生成影片、影片編輯、語音生成影片及分鏡生成。它包含多個模型版本,分別針對質素、速度及特定創作任務優化。

供應商
Alibaba
模式
影片

比較所有 API 變體

變體 計費 定價
wan-2.2-a14b-image-to-video-turbo 次請求 $0.30 查看 →
wan-2.2-a14b-speech-to-video-turbo 秒 $0.09 查看 →
wan-2.2-a14b-text-to-video-turbo 次請求 $0.30 查看 →
wan-2.2-animate-move 秒 $0.05 查看 →
wan-2.2-animate-replace 秒 $0.05 查看 →
wan-2.5-image-to-video 秒 $0.08 查看 →
wan-2.5-text-to-video 秒 $0.08 查看 →
wan-2.6-edit-video 秒 $0.11 查看 →
wan-2.6-flash-edit-video 次請求 $0.23 查看 →
wan-2.6-flash-image-to-video 次請求 $0.19 查看 →
wan-2.6-image-to-video 秒 $0.10 查看 →
wan-2.6-text-to-video 秒 $0.10 查看 →
wan-2.7-edit-video 秒 $0.12 查看 →
wan-2.7-image 次請求 $0.03 查看 →
wan-2.7-image-pro 次請求 $0.08 查看 →
wan-2.7-image-to-video 秒 $0.10 查看 →
wan-2.7-r2v 秒 $0.12 查看 →
wan-2.7-text-to-video 秒 $0.10 查看 →
PRICING

Wan 定價

Endpoint 解析度 時長 價格
image_to_video 480p, 720p — $0.30-$0.60 / 段影片

以下為 wan-2.2-a14b-image-to-video-turbo 的定價。其他變體保留各自的 endpoint 定價。

Agent 整合

透過 Agent 執行 Wan

運作方式

開始使用 Wan

  1. 選擇模型

    挑選符合輸出類型、品質門檻與延遲目標的模型與變體。

  2. 設定

    設定 RunAPI key,並在 coding workspace 安裝 model skill。

  3. 開發

    使用 skill 指引,在你的 app 內加入模型功能。

  4. 接收

    透過 task ID 查詢、在支援時串流,或處理 webhook callback。

CONTEXT

Wan API 是甚麼?

Wan 是 Alibaba 的全方位影片及圖片模型套件,是現有最完整的開放權重影片模型系列之一。透過 RunAPI,所有 Wan 版本共用同一個 key 及統一計費。

供應商
Alibaba
查看全部 →
模式
影片
瀏覽模型 →

為何透過 RunAPI 使用 Wan API

一個驗證,對應所有 provider

一組 RunAPI key 即可解鎖整個 catalog。無需分開帳戶,亦無需為每個整合輪換密鑰。

統一定價與計費

按次以 USD 收費,每月結算。失敗的生成不會收費。

內含 schema 的 skill

型別化 schema 與 setup 備註打包在 model skill 內,讓實作從正確契約開始。

Wan 常見問題

有多少個 Wan 版本可用?

版本 2.2、2.5、2.6 及 2.7,每個版本都新增功能。2.7 是最新版本,具備首尾幀控制及多參考影片生成。

甚麼是語音生成影片?

Wan 2.2 的語音生成影片端點接收音訊輸入,生成由語音內容驅動、對嘴同步的影片動態。

Wan 支援影片編輯嗎?

支援——Wan 2.6 及以上版本包含影片編輯,Wan 2.7 更新增專屬的影片編輯端點,具備主體及鏡頭控制。

Wan 是開源的嗎?

部分是——Wan 2.1 及 2.2 以 Apache 2.0 授權發佈開放權重。較後的版本(2.5、2.6 及 2.7)為閉源、只限 API 使用的模型。

甚麼是 R2V 端點?

Wan 2.7 R2V 使用文字生成影片端點,配合參考圖片、影片及音訊輸入,在多段片段中固定角色的外觀及聲音。

我應該先用邊個版本?

先選最平而且符合你質素要求的版本。大多數團隊會先用快速版本,之後再升級到 pro 用於正式生產。

相似模型

如果你鍾意 Wan API,可以試吓呢些

開始用 Wan API 開發。