Wan 影片生成 API

POST https://api.yxai-tech.top/wan/videos 同時支援現有 Wan 2.6 模型和 wan3.0-video。Wan 3 根據 media 自動識別文字、首尾影格或參考素材模式。

Wan 3 文字生成影片

curl -X POST 'https://api.yxai-tech.top/wan/videos' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "wan3.0-video",
    "prompt": "A paper boat drifting through a neon city at night",
    "duration": 5,
    "resolution": "720P",
    "ratio": "16:9",
    "audio": true,
    "async": true
  }'

Wan 3 支援 2–30 秒整數或 -1 智慧時長,解析度為 480P、720P、1080P。

多媒體參考

{
  "model": "wan3.0-video",
  "prompt": "Create a cinematic product reveal",
  "media": [
    {"type":"first_frame","url":"https://cdn.acedata.cloud/assets/examples/qwen-image/40d5c76b-2f84-4b04-9ea0-b706417ae622-bac6a9e9de22.png"},
    {"type":"last_frame","url":"https://cdn.acedata.cloud/assets/examples/qwen-image/7a5a490c-1d60-4498-a362-a9334148f460-a2a2c1afbf39.png"}
  ],
  "duration": 8,
  "resolution": "1080P",
  "ratio": "16:9",
  "async": true
}

media.type 支援:

  • first_frame / last_frame
  • reference_image
  • reference_video
  • reference_audio
  • file / link

首尾影格模式和參考素材模式不能混用。參考影片最終按實際輸入影片秒數加成功輸出影片秒數結算;文字、圖片和音訊輸入不增加影片秒數。

官方標準價格

解析度 價格
480P $0.05/秒
720P $0.10/秒
1080P $0.20/秒

Wan 2.6 相容

現有 wan2.6-t2v、wan2.6-i2v、wan2.6-r2v 與 flash 變體繼續使用 action、image_url、reference_video_urls 等參數,呼叫路徑不變。

非同步與結果

設定 async: true 後立即取得 task_id,透過 /wan/tasks 取得終態。成功影片會轉存至 AI 聚合 CDN,並在回應中返回實際 usage 與 cost。