---
title: &quot;透過 RunAPI 在 Hermes Agent 中使用 Luma — 影片修改 API&quot;
url: &quot;https://runapi.ai/zh-HK/hermes-luma.md&quot;
canonical: &quot;https://runapi.ai/zh-HK/hermes-luma&quot;
locale: &quot;zh-HK&quot;
model: &quot;luma&quot;
---

# 在 Hermes Agent 中使用 Luma。

Luma Ray 3.2 透過提示詞驅動的轉換修改現有影片，保留空間一致性與 3D 場景結構。傳送來源影片 URL 和描述轉換效果的文字提示詞，Luma 會重新渲染畫面，帶有氛圍光影、環境細節和物理一致的攝影機運動。Hermes Agent 透過 RunAPI custom 端點來呼叫。

## API example

```bash
curl -X POST https://runapi.ai/api/v1/luma/modify_video \
  -H &quot;Authorization: Bearer $RUNAPI_API_KEY&quot; \
  -H &quot;Content-Type: application/json&quot; \
  -d &#39;{
    &quot;model&quot;: &quot;luma-modify-video&quot;,
    &quot;prompt&quot;: &quot;Transform the scene into a foggy autumn morning with golden light filtering through trees&quot;,
    &quot;source_video_url&quot;: &quot;https://example.com/park-walk.mp4&quot;
  }&#39;

```

### Response

```json
{
  &quot;task_id&quot;: &quot;tsk_abc123&quot;,
  &quot;status&quot;: &quot;pending&quot;,
  &quot;model&quot;: &quot;luma-modify-video&quot;
}

```

## How it works

1. **設定 RunAPI** — 在 Hermes Agent 執行環境中設定 RUNAPI_API_KEY。如果你已將 RunAPI 新增為 custom:runapi provider，同一組 key 即可處理 Luma 影片修改請求。
2. **呼叫 Luma modify_video** — 向 modify_video 端點發送 POST 請求，將 model 設為 luma-modify-video，source_video_url 指向你的輸入影片，並以 prompt 描述轉換效果。Hermes Agent 可透過 custom:runapi provider 建構並發送此請求。
3. **輪詢結果** — 端點會立即回傳 task_id。輪詢任務狀態端點，直到 status 為 completed，然後從回應中讀取輸出影片 URL。影片修改通常需要 30-120 秒，取決於複雜度。

## Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `model` | `string` | 必填。使用 luma-modify-video。 |
| `prompt` | `string` | 必填。描述所需影片轉換的文字說明 — 風格變化、光影、氛圍或場景編輯。 |
| `source_video_url` | `string` | 必填。要修改的來源影片 URL。必須是可公開存取的 MP4 或 MOV 檔案。 |
| `watermark` | `boolean` | 選填。是否在輸出影片上加入浮水印。 |
| `callback_url` | `string` | 選填。任務完成時接收 POST 通知的 Webhook URL。 |

## FAQ

### Luma modify_video 可以做什麼樣的轉換？

Luma modify_video 透過提示詞驅動的變更重新渲染現有影片 — 氛圍轉換（霧、雨、黃金時刻）、風格轉移（電影感、動漫、黑色電影）、光影大改和環境轉換。它會保留原始的攝影機運動和場景空間佈局。

### 如何在 Hermes Agent 中設定 custom:runapi provider 來使用 Luma？

在 Hermes Agent 設定中新增名為 runapi 的 custom provider，將 base_url 設為 https://runapi.ai/v1，key_env 設為 RUNAPI_API_KEY。設定完成後，同一個 provider 即可處理 Luma modify_video 呼叫以及聊天和其他 RunAPI 模型請求。

### Luma modify_video 是同步還是非同步的？

非同步。建立端點會立即回傳 task_id。輪詢任務狀態端點或提供 callback_url 以在修改後的影片準備就緒時接收 webhook。一般處理時間為 30-120 秒。

### 在 RunAPI 上使用 Luma 影片修改的費用是多少？

Luma 使用每任務固定計費 — 每次 modify_video 呼叫的費用固定，與影片長度無關。請查看 RunAPI 定價頁面了解目前費率。失敗的生成不會收費。

### Hermes Agent 可以在一個工作流程中將 Luma 與影片生成模型串接嗎？

可以。Hermes Agent 工作流程可以先用 Kling 或 Wan 生成影片，再將輸出 URL 作為 source_video_url 傳給 Luma modify_video 進行氛圍重新渲染 — 全部透過同一個 custom:runapi provider 和 RUNAPI_API_KEY。每個步驟使用相同的非同步輪詢模式。


## Links

- [Hermes Agent 設定指南 →](https://runapi.ai/zh-HK/hermes-agent)
- [Luma on RunAPI →](https://runapi.ai/zh-HK/models/luma)
- [Model catalog](https://runapi.ai/zh-HK/models)
- [API docs](https://runapi.ai/zh-HK/docs)
