在 Hermes Agent 中使用 Runway。
Runway Gen-4 可從文字提示或首幀圖片生成 5 秒或 10 秒的 720p 或 1080p 影片。Hermes Agent 透過 RunAPI custom 端點呼叫 — 設定 custom:runapi 一次,送出 text_to_video 並指定時長與解析度,輪詢後即可取得完成的影片。透過 extend_video 延伸片段,或使用 Runway Aleph 進行影片對影片編輯。
Use RunAPI to generate a video with Runway Gen-4.
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/runway/text_to_video
- Set model to "runway".
- Set prompt to describe the video content.
- Set duration_seconds to 5 or 10.
- Set output_resolution to "720p" or "1080p".
- Optionally set first_frame_image_url to guide the opening frame.
- The task 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/runway/text_to_video \
-H "Authorization: Bearer $RUNAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "runway",
"prompt": "A drone shot rising over a misty mountain lake at sunrise, cinematic lighting",
"duration_seconds": 10,
"output_resolution": "1080p",
"aspect_ratio": "16:9"
}'
{
"task_id": "tsk_abc123",
"status": "pending",
"model": "runway"
}
三步驟在 Hermes Agent 中使用 Runway
設定 RunAPI
在 Hermes Agent 運行的環境中設定 RUNAPI_API_KEY。如果你已將 RunAPI 新增為 custom:runapi provider,同一把 key 即可處理 Runway 影片請求 — 無需額外 provider 設定。
export RUNAPI_API_KEY=runapi_xxx
呼叫 Runway text_to_video
向 text_to_video 端點發送 POST 請求,將 model 設為 runway、附上 prompt、duration_seconds(5 或 10)與 output_resolution(720p 或 1080p)。Hermes Agent 可透過 custom:runapi provider 建構此請求。加入 first_frame_image_url 可錨定開場幀。
POST /api/v1/runway/text_to_video
輪詢結果
端點會立即回傳 task_id。輪詢任務狀態端點,直到狀態為 completed,再從回應中讀取輸出影片 URL。若要延伸片段,使用 source_task_id 呼叫 extend_video。
GET /api/v1/runway/text_to_video/tsk_abc123
Runway text_to_video API 參數
| 參數 | 類型 | 說明 |
|---|---|---|
model |
string |
必填。Gen-4 使用 runway,Aleph edit_video 使用 runway-aleph。 |
prompt |
string |
必填。影片內容的文字描述 — 鏡頭運動、場景、燈光。 |
duration_seconds |
integer |
必填。影片長度:5 或 10 秒。 |
output_resolution |
string |
必填。輸出解析度:720p 或 1080p。影響價格。 |
first_frame_image_url |
string |
選填。作為影片第一幀的圖片 URL。 |
aspect_ratio |
string |
選填。輸出寬高比:16:9、9:16、1:1、4:3 或 3:4。 |
callback_url |
string |
選填。任務完成時接收 POST 通知的 Webhook URL。 |
Hermes Agent 上的 Runway 是什麼?
Runway Gen-4 以電影感構圖和流暢運動效果提供製作級影片。通過 Hermes Agent 的 custom:runapi provider,可生成 5 秒或 10 秒、720p 或 1080p 的影片,帶有世界一致性和跨鏡頭角色一致性。Runway Aleph 為現有素材重新設定風格提供了影片轉影片編輯功能。
Runway 使用場景
帶一致角色的敍事內容
構建角色在各片段間保持外觀的多鏡頭影片序列。使用參考圖像鎖定角色細節,由 Hermes Agent 負責串聯各個鏡頭。
廣告與社交內容製作
大批量生成 Instagram Reels、TikTok 短片和微廣告。Hermes Agent 可並行分發多個 Runway 任務,使用不同提示詞並收集所有結果。
用 Aleph 進行影片風格重置
使用 Runway Aleph 改造現有素材——在保留原始運動的同時改變視覺風格、光效或環境。傳入 source_video_url 和風格提示詞即可重置素材風格。
Runway + Hermes Agent 常見問題
可以。Hermes Agent 可透過 custom:runapi provider 呼叫 RunAPI Runway 端點。在環境中設定 RUNAPI_API_KEY,然後向 /api/v1/runway/text_to_video 發送 POST 請求,將 model 設為 runway,並附上 prompt、時長與解析度。
Runway Gen-4(model: runway)處理 text_to_video 與 extend_video — 從文字或圖片生成新片段。Runway Aleph(model: runway-aleph)處理 edit_video — 使用文字提示與 source_video_url 重新風格化現有素材。兩者都透過同一把 RunAPI key 運行。
Runway 採用基於 duration_seconds 與 output_resolution 的矩陣計費。5 秒 720p 片段的費用低於 10 秒 1080p 片段。請查看 RunAPI 定價頁面以了解最新費率。按秒計費,無需訂閱。
可以。將 first_frame_image_url 設為參考圖片 URL,搭配你的文字 prompt 一起使用。Runway Gen-4 會以該圖片作為開場幀,並根據你的 prompt 進行動畫化。這讓你可以精確控制起始構圖。
非同步。建立端點會立即回傳 task_id。影片生成通常需要 30–120 秒,取決於時長與解析度。輪詢任務狀態端點或提供 callback_url 以在影片就緒時接收 Webhook 通知。
立即在 Hermes Agent 中試用 Runway。
取得免費 RunAPI key,設定 custom:runapi provider,即可使用 Runway Gen-4 以 720p 或 1080p 生成電影級影片。