跳至內容

Wan-2.2 Animate Replace

整合

模型 id wan/v2.2-14b/animate/replace
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/wan/v2.2-14b/animate/replace?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "video": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4",
    "image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

像範例一樣的檔案: $0.75 750 API 點數 您的檔案會在執行前計量 在此頁面執行

取得 API 金鑰
Alibaba 影片轉影片 最高 720p #video-to-video#motion

以參考圖片中的角色取代影片中的人物,同時保留原始場景

在 Doitong 上製作

Doitong 社群使用 Wan-2.2 Animate 製作的公開作品。一鍵重複使用提示詞。

顯示的公開作品:2
Create a realistic cinematic UGC-style commercial video, exactly 30 seconds long. The entire scen... 影片

Create a realistic cinematic UGC-style commercial video, exactly 30 seconds long. The entire scene takes place inside a modern passenger airplane during a daytime flight. Natural smartphone-like cinematography, realistic airplane cabin, authentic passengers, natural lighting, realistic skin...

Реалистичная бытовая сцена в советской одесской квартире зимним вечером. Женщина находится на кух... 影片

Реалистичная бытовая сцена в советской одесской квартире зимним вечером. Женщина находится на кухне, мужчина — в комнате и прихожей. Атмосфера обычной советской семьи перед приходом гостей. Голоса: все персонажи говорят по-русски с естественным, выразительным одесским говором. Характерная...

建立請求

控制項是根據模型結構描述生成的。變更設定時,程式碼和價格會同步更新。

•必填 video_url
拖放檔案,或

輸入影片的 URL。

•必填 image_url
拖放檔案,或

來源圖像 URL;選取的長寬比會決定是否需要預處理:不一致時會先調整大小,再進行中心裁切。

resolution 預設 480p

輸出影片解析度:480p、580p 或 720p。

進階 video_quality · video_write_mode · guidance_scale · num_inference_steps · shift · seed · enable_safety_checker · enable_output_safety_checker · return_frames_zip · use_turbo
video_quality 預設 high

輸出影片品質設定;設定值越高,會以較大的檔案換取更佳的視覺效果。

video_write_mode 預設 balanced

影片寫入模式,balanced 在速度與品質之間取得平衡。選擇 small 可產生最小檔案並以最慢速度寫入;較快的寫入會更早回傳結果,但會建立較大的檔案。

預設 1

無分類器引導強度;比例越高,越貼近提示詞,但可能造成品質損失。

預設 20

取樣步數;步數越多,處理時間越長但品質越好。

預設 5

影片位移設定,允許範圍為 1.0–10.0。

使生成結果可重現的種子。設為 None 會隨機選擇種子。

POST /run/wan/v2.2-14b/animate/replace?wait=20 報價 → $0.75
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/wan/v2.2-14b/animate/replace?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "video": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4",
    "image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

執行此請求

您的金鑰會保留在此瀏覽器中:只會傳送至 Doitong API,且只有在勾選「記住」時才會儲存至 localStorage。 取得 API 金鑰

關於 Wan-2.2 Animate Replace

接收輸入 `video_url` 與角色 `image_url`,以圖片中的角色取代影片主體,同時保留場景其餘部分。`resolution` 可選擇 480p、580p 或 720p。圖片不符合長寬比時會調整大小並從中心裁切。`use_turbo` 與 `return_frames_zip` 為選用項目。

參數

請傳送標準名稱或原生名稱其中之一,不要同時傳送兩者。 標準名稱

名稱類型 預設值允許值 說明
video_url必填 video
類型url · video
輸入影片的 URL。
image_url必填 image
類型url · image
來源圖像 URL;選取的長寬比會決定是否需要預處理:不一致時會先調整大小,再進行中心裁切。
guidance_scale選填
類型number
預設值1
1 – 10
無分類器引導強度;比例越高,越貼近提示詞,但可能造成品質損失。
resolution選填
類型enum
預設值480p
480p580p720p
輸出影片解析度:480p、580p 或 720p。
seed選填
類型integer | null
使生成結果可重現的種子。設為 None 會隨機選擇種子。
num_inference_steps選填
類型integer
預設值20
2 – 40
取樣步數;步數越多,處理時間越長但品質越好。
enable_safety_checker選填
類型boolean
預設值false
處理前的輸入安全篩選,只有獲授權的帳戶可以關閉。未獲授權的請求一律會篩選;其他情況下,true 會啟用篩選。
enable_output_safety_checker選填
類型boolean
預設值false
控制生成影片的安全篩選;設為 true 會在生成後執行檢查。
shift選填
類型number
預設值5
1 – 10
影片位移設定,允許範圍為 1.0–10.0。
video_quality選填
類型enum
預設值high
lowmediumhighmaximum
輸出影片品質設定;設定值越高,會以較大的檔案換取更佳的視覺效果。
video_write_mode選填
類型enum
預設值balanced
fastbalancedsmall
影片寫入模式,balanced 在速度與品質之間取得平衡。選擇 small 可產生最小檔案並以最慢速度寫入;較快的寫入會更早回傳結果,但會建立較大的檔案。
return_frames_zip選填
類型boolean
預設值false
設為 true 可額外匯出無損影格圖像。圖像會在 GPU 上生成,並封裝至 ZIP 封存檔。
use_turbo選填
類型boolean
預設值false
品質增強開關;設為 true 時會自動最佳化參數,以取得最佳結果,兼顧更快的生成速度與更佳品質。
必填 標準名稱,也可使用

檔案參數接受公開的 https:// URL、最大 10 MB 的 data: URI,或上傳檔案的 file_url。 檔案

輸出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "wan/v2.2-14b/animate/replace",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 750,
    "usd": "0.75",
    "charged": 750,
    "refunded": 0
  },
  "input": {
    "video_url": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4",
    "image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  },
  "output": {
    "video": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp4",
      "content_type": "video/mp4",
      "file_name": "0-output.mp4",
      "file_size": 1843200
    },
    "frames_zip": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp4",
      "content_type": "video/mp4",
      "file_name": "0-output.mp4",
      "file_size": 1843200
    },
    "prompt": "",
    "seed": 42
  },
  "outputs": [
    {
      "type": "video",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp4",
      "content_type": "video/mp4",
      "file_size": 1843200,
      "width": 1280,
      "height": 720,
      "duration": 5,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
您的檔案,由您選擇每個 outputs[].url 都是儲存空間中的副本:可永久保留(按 GB-月計費),或免費保留 7 天;可透過帳戶設定或 ?storage= 設定。
所有模型使用相同結構圖片、影片和音訊皆包含 type、url、content_type、width、height 和 duration。output 是模型自己的結果物件。
輸出欄位
video
object {url, content_type, file_name, file_size}生成產生的影片檔案。
frames_zip
object {url, content_type, file_name, file_size} | null包含生成影格的 ZIP 檔案,在請求時提供。
prompt
string模型建立並用於生成結果的提示詞。
seed
integer生成期間使用的種子值。

更多模型:影片轉影片

給 AI 代理程式:此頁面的 Markdown 位於 https://doitong.com/zh-TW/developers/models/wan/v2.2-14b/animate/replace.md. 所有模型與指南: https://doitong.com/developers/llms.txt