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

# 在 OpenClaw 中使用 Luma。

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

## 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** — 在環境中設定 RUNAPI_API_KEY。如果你已在 OpenClaw 中設定 RunAPI 用於聊天，同一組 key 即可用於 Luma 影片修改，無需額外的 provider 設定。
2. **呼叫 Luma modify_video** — 向 modify_video 端點發送 POST 請求，將 model 設為 luma-modify-video，source_video_url 指向你的輸入影片，並以 prompt 描述轉換效果。Luma 會保留原始場景幾何結構，同時套用所要求的變更。
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 透過提示詞驅動的變更重新渲染現有影片 — 氛圍轉換（霧、雨、黃金時刻）、風格轉移（電影感、動漫、黑色電影）、光影大改和環境轉換。它會保留原始的攝影機運動和場景空間佈局。

### Luma 與 RunAPI 上的其他影片模型有何不同？

Luma 專精於修改現有影片，而非從零生成。其 Ray 3.2 模型在轉換過程中維持 3D 空間一致性，使物件保持深度關係，攝影機運動保持物理一致。Kling 或 Hailuo 等模型則是從文字或圖片生成新影片。

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

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

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

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

### 我可以在一個 agent 工作流程中將 Luma 與其他 RunAPI 影片模型串接嗎？

可以。OpenClaw agent 可以先用 Kling 或 Hailuo 生成影片，再將輸出 URL 作為 source_video_url 傳給 Luma modify_video 進行後製 — 全部透過同一個 RUNAPI_API_KEY。每個步驟使用相同的非同步輪詢模式。


## Links

- [OpenClaw 設定指南 →](https://runapi.ai/zh-HK/openclaw)
- [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)
