Luma Ray 3.2 Video to Video
整合
模型 id
luma/agent/ray/v3.2/video-to-video
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/v1/run/luma/agent/ray/v3.2/video-to-video?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"video": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4"
}'
# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.ru/v1/requests/REQUEST_ID?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY"
const API = "https://api.doitong.ru/v1";
const headers = {
"Authorization": "Bearer " + process.env.DOITONG_API_KEY,
"Content-Type": "application/json",
};
// Run the model; wait up to 20 s for the finished result in the same call
let res = await fetch(API + "/run/luma/agent/ray/v3.2/video-to-video?wait=20", {
method: "POST",
headers,
body: JSON.stringify({
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"video": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4"
}),
});
let request = await res.json();
if (!res.ok) throw new Error(request.error.code + ": " + request.error.message);
// Not finished yet: long-poll until it is
while (request.status === "queued" || request.status === "running") {
res = await fetch(API + "/requests/" + request.id + "?wait=20", { headers });
request = await res.json();
}
if (request.status !== "succeeded") throw new Error(JSON.stringify(request.error));
console.log(request.outputs.map((o) => o.url), request.cost.credits + " API credits ($" + request.cost.usd + ")");
import os
import requests
API = "https://api.doitong.ru/v1"
headers = {"Authorization": "Bearer " + os.environ["DOITONG_API_KEY"]}
payload = {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"video": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4",
}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/luma/agent/ray/v3.2/video-to-video", params={"wait": 20}, json=payload, headers=headers)
request = r.json()
if not r.ok:
raise RuntimeError(request["error"]["code"] + ": " + request["error"]["message"])
# Not finished yet: long-poll until it is
while request["status"] in ("queued", "running"):
request = requests.get(API + "/requests/" + request["id"], params={"wait": 20}, headers=headers).json()
if request["status"] != "succeeded":
raise RuntimeError(request["error"])
print([o["url"] for o in request["outputs"]], request["cost"]["credits"], "API credits", "$" + request["cost"]["usd"])
# 1. Connect once (Claude Code; Cursor, VS Code, Claude Desktop: https://doitong.com/zh-TW/developers/docs/mcp)
claude mcp add --transport http doitong-models https://api.doitong.ru/v1/mcp \
--header "Authorization: Bearer $DOITONG_API_KEY"
# 2. Your agent calls the "run" tool with:
{
"model_id": "luma/agent/ray/v3.2/video-to-video",
"input": {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"video": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4"
}
}
透過 Doitong API 呼叫 Luma Ray 3.2 Video to Video 模型(luma/agent/ray/v3.2/video-to-video)。代理程式文件:https://doitong.com/zh-TW/developers/models/luma/agent/ray/v3.2/video-to-video.md
POST https://api.doitong.ru/v1/run/luma/agent/ray/v3.2/video-to-video?wait=20
Authorization: Bearer $DOITONG_API_KEY
Content-Type: application/json
{
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"video": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4"
}
如果回應狀態為 "queued" 或 "running",請輪詢 GET https://api.doitong.ru/v1/requests/REQUEST_ID?wait=20,直到狀態變為 "succeeded";檔案位於 outputs[].url。使用相同主體傳送 POST https://api.doitong.ru/v1/quote/luma/agent/ray/v3.2/video-to-video,可在執行前取得確切價格。
此請求: $0.72 720 API 點數 · ≈ ₽77.37 在此頁面執行
您的新 API 金鑰。 僅會在此時顯示,且已填入下方的程式碼與 API 金鑰欄位。請妥善保密:切勿將其放入在瀏覽器中執行的程式碼。
建立請求
控制項是根據模型結構描述生成的。變更設定時,程式碼和價格會同步更新。
POST
/run/luma/agent/ray/v3.2/video-to-video?wait=20
報價 → $0.72
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/v1/run/luma/agent/ray/v3.2/video-to-video?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"video": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4"
}'
# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.ru/v1/requests/REQUEST_ID?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY"
const API = "https://api.doitong.ru/v1";
const headers = {
"Authorization": "Bearer " + process.env.DOITONG_API_KEY,
"Content-Type": "application/json",
};
// Run the model; wait up to 20 s for the finished result in the same call
let res = await fetch(API + "/run/luma/agent/ray/v3.2/video-to-video?wait=20", {
method: "POST",
headers,
body: JSON.stringify({
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"video": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4"
}),
});
let request = await res.json();
if (!res.ok) throw new Error(request.error.code + ": " + request.error.message);
// Not finished yet: long-poll until it is
while (request.status === "queued" || request.status === "running") {
res = await fetch(API + "/requests/" + request.id + "?wait=20", { headers });
request = await res.json();
}
if (request.status !== "succeeded") throw new Error(JSON.stringify(request.error));
console.log(request.outputs.map((o) => o.url), request.cost.credits + " API credits ($" + request.cost.usd + ")");
import os
import requests
API = "https://api.doitong.ru/v1"
headers = {"Authorization": "Bearer " + os.environ["DOITONG_API_KEY"]}
payload = {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"video": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4",
}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/luma/agent/ray/v3.2/video-to-video", params={"wait": 20}, json=payload, headers=headers)
request = r.json()
if not r.ok:
raise RuntimeError(request["error"]["code"] + ": " + request["error"]["message"])
# Not finished yet: long-poll until it is
while request["status"] in ("queued", "running"):
request = requests.get(API + "/requests/" + request["id"], params={"wait": 20}, headers=headers).json()
if request["status"] != "succeeded":
raise RuntimeError(request["error"])
print([o["url"] for o in request["outputs"]], request["cost"]["credits"], "API credits", "$" + request["cost"]["usd"])
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "run",
"arguments": {
"model_id": "luma/agent/ray/v3.2/video-to-video",
"input": {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"video": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4"
},
"wait_seconds": 20
}
}
}
關於 Luma Ray 3.2 Video to Video
依據 `prompt` 編輯 `video_url`,也可選擇使用 `start_image_url` 引導第一幀。`edit_strength` 提供 adhere、flex 與 reimagine 三種 1 到 3 級強度;`auto_controls` 或 `controls` 物件則提供替代條件設定。最多可使用 64 個 `keyframes`,並以 `keyframe_indexes` 錨定。輸出為 540p 到 1080p、5s 或 10s,並可選擇加入 `hdr` 與 `exr_export`。
參數
請傳送標準名稱或原生名稱其中之一,不要同時傳送兩者。 標準名稱
名稱類型
預設值允許值
說明
prompt必填
類型string
≤ 6,000 個字元
編輯來源影片的文字指示。
video_url必填
video
類型url · video
待編輯影片的 URL。
user選填
類型string | null
提交請求之最終使用者的選填不透明 ID。
start_image_url選填
image
類型url · image
編輯影片的第一影格覆寫值,以選填的圖像 URL 提供;省略時,模型會從來源影片推導該影格。例如,提供來源影片經重新設計風格的開場圖像,可引導編輯後的外觀。
resolution選填
類型enum
預設值540p
540p720p1080p
編輯後的輸出解析度。
duration選填
類型enum
預設值5s
5s10s
編輯後影片的長度。
edit_strength選填
類型enum
adhere_1adhere_2adhere_3flex_1flex_2flex_3reimagine_1reimagine_2reimagine_3
編輯的來源保留設定,僅在未使用 auto_controls 時可用;省略會選擇模型的預設值。從偏離最大到遵循最接近,選項依序為 'reimagine_*'、代表平衡結果的 'flex_*',以及 'adhere_*'。
auto_controls選填
類型boolean
預設值false
自動編輯條件控制:模型使用來源影片決定排程,而不是在此選項旁接受 edit_strength。
hdr選填
類型boolean
預設值false
720p 或 1080p MP4 輸出的 HDR 編碼,僅具備 HDR 存取權限的帳戶可用。
exr_export選填
類型boolean
預設值false
隨 MP4 附帶的額外 EXR 匯出檔,僅在同時具備 HDR 存取權限和 hdr=true 時可用。
controls選填
類型object
edit_strength 的細緻替代方案,可分別設定姿勢、深度、法線、軌跡和臉部的條件控制。使用這些控制項後便不能使用 auto_controls。
controls.pose選填
類型object
基於姿勢或骨架的條件控制。
controls.pose.enabled選填
類型boolean
預設值true
編輯期間姿勢或骨架條件控制的切換開關。
controls.pose.strength選填
類型enum
precisecoarse
姿勢條件控制精度選擇:省略以保留預設值,選擇 'coarse' 以獲得更大自由度,或使用 'precise' 緊密追蹤來源姿勢。
controls.depth選填
類型object
基於深度或場景幾何的條件控制。
controls.depth.enabled選填
類型boolean
預設值true
編輯期間深度或場景幾何條件控制的切換開關。
controls.depth.blur選填
類型number | null
0 – 1
深度模糊設定;省略以保留預設值,提高可讓幾何形狀擁有更大自由度。
controls.normals選填
類型object
基於表面法線的條件控制。
controls.normals.enabled選填
類型boolean
預設值true
編輯期間表面法線條件控制的切換開關。
controls.normals.augmentation選填
類型number | null
0 – 1
表面法線增強設定;省略以保留預設值,提高可允許更大幅度地重新詮釋表面幾何。
controls.trajectory選填
類型object
基於運動軌跡的條件控制。
controls.trajectory.enabled選填
類型boolean
預設值true
編輯期間運動軌跡條件控制的切換開關。
controls.trajectory.sparsity選填
類型number | null
0 – 1
運動軌跡稀疏度設定;省略以保留預設值,提高可減少使用的運動錨點數量。
controls.face選填
類型object
基於臉部身分的條件控制。
controls.face.enabled選填
類型boolean
預設值true
編輯期間臉部身分條件控制的切換開關。
keyframes選填
類型string[]
≤ 64 個項目
以圖像 URL 而非 start_image_url 提供的多關鍵影格編輯引導。提供 keyframes 及等長的 keyframe_indexes 陣列,將每張圖像固定至其在來源影片中的影格位置;最多允許 64 個 URL。
keyframe_indexes選填
類型integer[]
≤ 64 個項目
與 keyframes 一對一配對的來源影格映射:項目 [i] 指定 keyframes[i] 的錨點位置。兩個陣列長度必須相同,且位置必須互異且為非負值。
enable_safety_checker選填
類型boolean
預設值true
在呼叫端獲得授權的情況下,將此值設為 false 可放寬審核。
必填
標準名稱,也可使用
檔案參數接受公開的 https:// URL、最大 10 MB 的 data: URI,或上傳檔案的 file_url。 檔案
輸出
GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
"id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
"object": "request",
"model": "luma/agent/ray/v3.2/video-to-video",
"status": "succeeded",
"created_at": "2026-10-20T12:00:00Z",
"started_at": "2026-10-20T12:00:02Z",
"completed_at": "2026-10-20T12:00:09Z",
"queue_position": null,
"cost": {
"credits": 720,
"usd": "0.72",
"charged": 720,
"refunded": 0
},
"input": {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"video_url": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4"
},
"output": {
"video": {
"url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp4",
"content_type": "video/mp4",
"file_name": "0-output.mp4",
"file_size": 1843200
},
"exr_file": {
"url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp4",
"content_type": "video/mp4",
"file_name": "0-output.mp4",
"file_size": 1843200
}
},
"outputs": [
{
"type": "video",
"url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp4",
"content_type": "video/mp4",
"file_size": 1843200,
"width": 1280,
"height": 720,
"duration": 5,
"stored": true
}
],
"error": null,
"metrics": {
"inference_seconds": 6.8
},
"urls": {
"self": "https://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
"cancel": "https://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
}
}
您的檔案,由您選擇每個 outputs[].url 都是儲存空間中的副本:可永久保留(按 GB-月計費),或免費保留 7 天;可透過帳戶設定或 ?storage= 設定。
所有模型使用相同結構圖片、影片和音訊皆包含 type、url、content_type、width、height 和 duration。output 是模型自己的結果物件。
輸出欄位
- video
- object {url, content_type, file_name, file_size}模型產生的影片。
- exr_file
- object {url, content_type, file_name, file_size} | nullLuma 匯出格式的 EXR 輔助檔:單一 EXR 檔案或 ZIP 封存檔。exr_export 為 true 時會生成。
其他 Luma Ray 3.2 變體
更多模型:影片轉影片
給 AI 代理程式:此頁面的 Markdown 位於 https://doitong.com/zh-TW/developers/models/luma/agent/ray/v3.2/video-to-video.md. 所有模型與指南: https://doitong.com/developers/llms.txt