在 Hermes Agent 中使用 Veo 3。
Veo 3 是 Google DeepMind 的影片生成模型,可產出最長 8 秒的 1080p 影片並帶有原生音訊 — 同步對白、環境音效和音樂隨影片一起生成。Hermes Agent 透過 RunAPI custom provider 端點呼叫,沿用與聊天相同的 API key。
Generate a cinematic video clip with native audio using Google Veo 3 through RunAPI.
Requirements:
- Read the API key from RUNAPI_API_KEY. Do not hardcode the key.
- Use the custom:runapi provider with base_url https://runapi.ai/v1.
- Send a POST request to https://runapi.ai/api/v1/veo_3_1/text_to_video
- Set model to "veo-3.1".
- Write a descriptive prompt including scene, camera movement, and audio cues.
- Set duration_seconds to 4, 6, or 8.
- Set aspect_ratio to "16:9", "9:16", or "auto".
- 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/veo_3_1/text_to_video \
-H "Authorization: Bearer $RUNAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "veo-3.1",
"prompt": "A woman walks through a bustling Tokyo street at night, neon signs reflecting on wet pavement. She speaks into her phone: I just arrived. Ambient city noise, distant car horns, light rain.",
"duration_seconds": 8,
"aspect_ratio": "16:9"
}'
{
"task_id": "tsk_abc123",
"status": "pending",
"model": "veo-3.1"
}
三步驟在 Hermes Agent 中使用 Veo 3
設定 RunAPI
在 Hermes Agent 運行的環境中設定 RUNAPI_API_KEY。如果你已將 RunAPI 新增為 custom:runapi provider 用於聊天,同一把 key 和 base_url 即可處理影片生成 — 不需要獨立的 Google Cloud 憑證。
export RUNAPI_API_KEY=runapi_xxx
呼叫 Veo 3 text_to_video
發送 POST 請求至 text_to_video 端點,將 model 設為 veo-3.1。在 prompt 中加入場景描述和音訊提示(對白、環境音效)。將 duration_seconds 設為 4、6 或 8,aspect_ratio 設為 16:9 或 9:16。Hermes Agent 透過 custom:runapi provider 路由請求。
POST /api/v1/veo_3_1/text_to_video
輪詢取得結果
端點會立即回傳 task_id。輪詢任務狀態端點,直到 status 變為 completed,然後取得輸出影片 URL。影片包含根據你的 prompt 生成的同步音訊。
GET /api/v1/veo_3_1/text_to_video/tsk_abc123
Veo 3 text_to_video 參數
| 參數 | 類型 | 說明 |
|---|---|---|
model |
string |
必填。veo-3.1(標準品質)或 veo-3.1-fast(較低成本、較快生成)。 |
prompt |
string |
必填。場景描述,包含視覺動作、攝影機運動和音訊提示(對白或環境音效)。 |
duration_seconds |
integer |
選填。影片長度(秒)。可接受的值:4、6、8。預設為 8。 |
aspect_ratio |
string |
選填。輸出長寬比。可接受的值:16:9、9:16、auto。 |
input_mode |
string |
選填。生成模式。text(預設)、first_and_last_frames(關鍵影格引導)或 reference(風格參考)。 |
first_frame_image_url |
string |
選填。第一幀圖片的 URL。在 input_mode 為 first_and_last_frames 時使用。 |
last_frame_image_url |
string |
選填。最後一幀圖片的 URL。在 input_mode 為 first_and_last_frames 時使用。 |
reference_image_urls |
array |
選填。風格參考圖片的 URL。在 input_mode 為 reference 時使用。 |
callback_url |
string |
選填。任務完成時接收 POST 通知的 Webhook URL。 |
Hermes Agent 上的 Veo 3 是什麼?
Google DeepMind 的 Veo 3 創作出栩栩如生的影片——電影畫面與同步對話、環境音效和音樂在單次生成中同步完成。透過 Hermes Agent 的 custom:runapi provider,可獲得最長 8 秒、附帶原生音訊的 1080p 片段,無需獨立的 TTS 或音效編輯步驟。
Veo 3 使用情境
動漫與風格化序列
生成附帶匹配音訊提示的動漫風格或風格化影片片段。在提示詞中描述視覺風格和音效方向,Veo 3 會同時渲染兩者。
音樂與演唱內容
創建短篇音樂影片或演唱二重唱場景。在提示詞中加入歌詞或音樂方向,即可獲得同步的音視覺輸出。
附帶音效的社群媒體內容
製作附帶環境音訊、旁白或對話的即時發佈影片片段。無需音頻編輯——輸出內容已完整包含影片和音軌。
Veo 3 + Hermes Agent 常見問題
可以。Hermes Agent 透過 custom:runapi provider 呼叫 RunAPI 的 Veo 3 text_to_video 端點。將 model 設為 veo-3.1,使用與聊天相同的 RUNAPI_API_KEY 發送請求。不需要 Google Cloud 帳號或獨立的影片 API 憑證。
RunAPI 在初始 POST 時立即回傳 task_id。你的 Hermes Agent 工作流輪詢任務狀態端點,直到 status 為 completed,然後讀取輸出影片 URL。你也可以設定 callback_url 接收 webhook 通知,而非輪詢。
兩者都能生成最高 1080p 的帶有原生音訊影片。veo-3.1 使用完整品質流程,費用較高。veo-3.1-fast 以些許視覺品質換取更低成本和更快速度 — 適合草稿和迭代。
可以。在 prompt 中描述攝影機運動(推軌、跟拍、空拍搖鏡),Veo 3 會以物理感知模擬來詮釋。音訊方面,用引號標示對白並描述環境音效 — 模型會原生生成同步音訊,不需要獨立的 TTS 或音效庫。
可以。RunAPI 為 Veo 3 提供 extend_video 和 upscale_video 端點。傳入原始生成的 source_task_id 即可延伸影片,或升級至 1080p 或 4K 解析度。兩者都是非同步的,分別計費。
立即在 Hermes Agent 中試用 Veo 3。
取得免費 RunAPI key,設定 custom:runapi provider,即可使用 Google Veo 3 生成帶有原生音訊的電影級影片。