在 Hermes Agent 中使用 Hailuo。
Hailuo 是 MiniMax 的影片生成模型,可產出原生 1080p 畫面並精準模擬物理效果,共有 6 種變體 — Hailuo 02 與 2.3,各具備文生影片與圖生影片端點,分 pro 與 standard 兩個方案。Hermes Agent 透過 RunAPI 的 custom:runapi provider 呼叫 — 與你設定聊天時相同的 key 和 base URL。
Use RunAPI to generate a video with MiniMax Hailuo 02 Pro through Hermes Agent.
Requirements:
- Use the custom:runapi provider already configured in Hermes Agent
- Call the RunAPI text_to_video endpoint at https://runapi.ai/api/v1/hailuo/text_to_video
- Set model to "hailuo-02-text-to-video-pro"
- The RUNAPI_API_KEY environment variable provides authorization
- Include a detailed prompt describing camera movement and scene
- The response is async — poll the task status endpoint until the task completes, then retrieve the video URL
curl -X POST https://runapi.ai/api/v1/hailuo/text_to_video \
-H "Authorization: Bearer $RUNAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "hailuo-02-text-to-video-pro",
"prompt": "A glass marble rolls across a wooden desk, catches the edge, and falls in slow motion. Camera follows the marble. Soft window light, shallow depth of field."
}'
{
"task_id": "tsk_abc123",
"status": "pending",
"model": "hailuo-02-text-to-video-pro"
}
三步驟在 Hermes Agent 中使用 Hailuo
設定 RunAPI
設定 RUNAPI_API_KEY 環境變數。如果你已在 Hermes Agent 中將 RunAPI 新增為 custom:runapi provider 用於聊天,同一把 key 和 base_url 即可用於影片生成 — 無需額外設定。
export RUNAPI_API_KEY=runapi_xxx
呼叫 Hailuo text_to_video 或 image_to_video
向 /api/v1/hailuo/text_to_video 發送 POST 請求,將 model 設為 hailuo-02-text-to-video-pro 並附上描述場景的 prompt。若要以圖片為錨點生成影片,使用 image_to_video 端點並傳入 first_frame_image_url 以保留來源主體。
POST /api/v1/hailuo/text_to_video
輪詢結果
端點會立即回傳 task_id。輪詢任務狀態端點,直到狀態變為 completed,再從回應中取得生成的影片 URL。pro 方案的典型處理時間在兩分鐘以內。
GET /api/v1/hailuo/text_to_video/tsk_abc123
Hailuo API 參數
| 參數 | 類型 | 說明 |
|---|---|---|
model |
string |
必填。可選值:hailuo-02-text-to-video-pro、hailuo-02-text-to-video-standard、hailuo-02-image-to-video-pro、hailuo-02-image-to-video-standard、hailuo-2.3-image-to-video-pro、hailuo-2.3-image-to-video-standard。 |
prompt |
string |
必填。影片場景、鏡頭運動與燈光的文字描述。 |
first_frame_image_url |
string |
image_to_video 端點必填。作為第一幀的來源圖片 URL。 |
last_frame_image_url |
string |
選填。作為最後一幀的圖片 URL。僅適用於 Hailuo 02 image-to-video。 |
duration_seconds |
integer |
選填。影片長度(秒)。可選值:6 或 10。standard 預設為 10,pro 固定。 |
output_resolution |
string |
選填。輸出解析度。02 standard 可選 512p 或 768p;2.3 變體可選 768p 或 1080p。 |
callback_url |
string |
選填。任務完成時接收 POST 通知的 Webhook URL。 |
Hermes Agent 上的 Hailuo 是什麼?
MiniMax 的 Hailuo 以同類最快的生成速度、流暢的運動連貫性和出色的細節保留著稱。通過 Hermes Agent 的 custom:runapi provider,可從文本或圖像生成原生 1080p 素材,Hailuo 2.3 還新增了專用的動漫和插畫渲染風格。
Hailuo 使用場景
無臉 YouTube 頻道內容
為無臉 YouTube 頻道生成空鏡和視覺序列。Hailuo 的高速交付和穩定的輸出質量使其適合常規內容生產。
產品與電商短片
創作帶寫實物理效果的產品展示影片——液體傾倒、面料垂落、物體旋轉——用於商品詳情頁和社交廣告。
空鏡與 B-roll 素材
為長影片項目生成背景素材和轉場片段。Hailuo 在環境渲染、大氣效果和鏡頭運動方面表現穩定可靠。
Hailuo + Hermes Agent 常見問題
可以。在 Hermes Agent 中將 RunAPI 設定為 custom:runapi provider,然後用 Hailuo model slug 呼叫 text_to_video 或 image_to_video 端點。你用於聊天的同一把 RUNAPI_API_KEY 也能處理影片生成。
Hailuo 02 同時支援文生影片與圖生影片,具備首幀與末幀控制。Hailuo 2.3 僅支援圖生影片,但新增了改進的身體動態、微表情,以及動漫與插畫專用渲染風格。
Standard 方案的價格隨 duration_seconds 而變。文生影片 standard 6 秒片段 30 美分、10 秒片段 50 美分。圖生影片 standard 的價格還受 output_resolution 影響 — 6 秒 512p 片段起價 12 美分。
不會。Hailuo 是非同步的 — API 會立即回傳 task_id。你的 Hermes Agent 工作流程需要自行輪詢任務狀態端點或提供 callback_url。典型生成時間為 60-120 秒。
僅限 Hailuo 02 image-to-video 端點。同時傳入 first_frame_image_url 與 last_frame_image_url 以定義起始與結束幀。Hailuo 2.3 image-to-video 僅接受 first_frame_image_url。
立即在 Hermes Agent 中試用 Hailuo。
取得免費 RunAPI key,設定 custom:runapi provider,即可使用 MiniMax Hailuo 開始生成影片。