HERMES + WAN

在 Hermes Agent 中使用 Wan。

Wan 是 Alibaba 的開源影片與圖片生成模型,採用 Apache 2.0 授權,在 Artificial Analysis 文生影片排行榜上排名第一。涵蓋 20+ 種變體,從 Wan 2.2 到 2.7 — 文生影片、圖生影片、帶唇形同步的語音生影片、透過 R2V 進行影片編輯,以及最高 4K 的圖片生成。Hermes Agent 透過與聊天相同的 RunAPI custom provider 和 API key 呼叫任何 Wan 端點。

一個 API key · 20+ 種 Wan 變體 · Apache 2.0 開源
Use RunAPI to generate a video with Alibaba Wan 2.7.

Requirements:
- Read the API key from RUNAPI_API_KEY.
- Use the custom:runapi provider with base_url https://runapi.ai/v1.
- Call POST https://runapi.ai/api/v1/task/text_to_video
- Set model to "wan-2.7-text-to-video".
- Set output_resolution to "1080p" for full HD output.
- Include a detailed prompt describing the scene, camera motion, and lighting.
- The response is async. Poll the returned task_id until status is "completed".
- When done, read the video URL from the response output.
curl -X POST https://runapi.ai/api/v1/task/text_to_video \
  -H "Authorization: Bearer $RUNAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "wan-2.7-text-to-video",
    "prompt": "A drone shot rising over terraced rice paddies at golden hour, mist rolling through the valleys, slow upward camera tilt",
    "output_resolution": "1080p"
  }'
{
  "task_id": "tsk_abc123",
  "status": "pending",
  "model": "wan-2.7-text-to-video"
}
複製 curl 指令進行測試 wan
運作原理

三步驟在 Hermes Agent 中使用 Wan

1

設定 RunAPI

在 Hermes Agent 運行的環境中設定 RUNAPI_API_KEY。如果你已將 RunAPI 新增為 custom:runapi provider,同一把 key 和 base_url 即可處理所有 Wan 端點 — 無需額外設定。

export RUNAPI_API_KEY=runapi_xxx
2

呼叫 Wan 端點

向 text_to_video 發送 POST 請求,將 model 設為 wan-2.7-text-to-video、output_resolution 設為 720p 或 1080p。若要圖生影片,使用 wan-2.7-image-to-video 並傳入 first_frame_image_url。若要語音驅動影片,使用 wan-2.2-a14b-speech-to-video-turbo 並傳入 source_audio_url 與 source_image_url。Hermes Agent 會透過 custom:runapi provider 路由所有請求。

POST /api/v1/task/text_to_video
3

輪詢結果

端點會立即回傳 task_id。輪詢任務狀態端點,直到狀態為 completed,再從回應中讀取輸出的影片或圖片 URL。RunAPI SDK 與 CLI 會自動處理輪詢。

GET /api/v1/task/text_to_video/tsk_abc123
參數

Wan text_to_video API 參數

參數 類型 說明
model string 必填。wan-2.7-text-to-video、wan-2.6-text-to-video、wan-2.5-text-to-video、wan-2.2-a14b-text-to-video-turbo 或 wan-2.7-r2v。
prompt string 必填。期望影片場景的文字描述,包含鏡頭運動、燈光與主體細節。
output_resolution string 選填。Wan 2.5+ 可選 720p 或 1080p。Wan 2.2 另外接受 480p 與 580p。預設為 720p。
aspect_ratio string 選填。僅適用於 wan-2.7-r2v。可選值:16:9、9:16、1:1、4:3、3:4。
duration_seconds integer 選填。僅適用於 wan-2.7-r2v。影片長度(秒),2 至 10。
seed integer 選填。用於確定性輸出的可重現種子值。
callback_url string 選填。任務完成時接收 POST 通知的 Webhook URL。

Hermes Agent 上的 Wan 是什麼?

阿里巴巴的 Wan 是在 Artificial Analysis 文生影片品質排行榜居首的 Apache 2.0 開源影片模型。透過 Hermes Agent 的 custom:runapi provider,可存取 20 多個變體——文生影片、圖生影片、附嘴型同步的語音轉影片,以及影片編輯。其開放權重意味著若工作流程需要資料隱私,也可自行部署,而 RunAPI 則為託管使用提供 GPU 基礎設施。

Wan 使用情境

大量品牌內容製作

利用 Wan 的角色一致性和不過期的點數大量生產品牌影片內容。Hermes Agent 可針對不同產品線並行分配生成任務。

附嘴型同步的對話密集內容

在單一 Hermes Agent 工作流程中,將 ElevenLabs TTS 與 Wan 的語音轉影片端點串接,無需手動步驟即可從腳本文字生成嘴型同步說話影片。

電影製作與廣告公司前期視覺化

以錨點式關鍵幀生成製作級前期視覺化片段。設定首幀和末幀圖像,精確控制場景轉換,供客戶審閱。

FAQ

Wan + Hermes Agent 常見問題

Hermes Agent 通用設定

尚未設定?請從 Hermes Agent 的 RunAPI 設定指南開始。

Hermes Agent 設定指南 →

Wan 模型目錄

查看所有 20+ 種 Wan 變體、價格方案與端點文件。

Wan on RunAPI →

立即在 Hermes Agent 中試用 Wan。

取得免費 RunAPI key,設定 custom:runapi provider,即可使用排名第一的開源模型生成影片 — 文生影片、圖生影片或語音生影片。