Luma API
Luma API on WaveSpeedAI — Ray 3.2 text-to-video, image-to-video, video edit and video reframing, earlier Ray 2 and Ray 1.6 models, and Uni v1 and Photon image generation and editing, all through one REST API.
Use Luma's Ray 3.2 for cinematic text-to-video and image-to-video with controllable aspect ratio, resolution and duration, re-render or reframe existing footage with video edit and video reframing, and generate or edit images with Uni v1 and Photon. Ray 2 and Ray 1.6 stay available for earlier workflows.
概要
Luma APIについて
Lumaでできること、Luma AIのモデルラインナップにおける位置づけ、そして多くのチームに選ばれる理由。
LumaはLuma AIの動画生成モデルで、WaveSpeedAIのREST APIから利用できます。Luma API on WaveSpeedAI — Ray 3.2 text-to-video, image-to-video, video edit and video reframing, earlier Ray 2 and Ray 1.6 models, and Uni v1 and Photon image generation and editing, all through one REST API.
Use Luma's Ray 3.2 for cinematic text-to-video and image-to-video with controllable aspect ratio, resolution and duration, re-render or reframe existing footage with video edit and video reframing, and generate or edit images with Uni v1 and Photon. Ray 2 and Ray 1.6 stay available for earlier workflows.
WaveSpeedAIのLumaファミリーには、Video-To-Video, Image-To-Video, Text-To-Video, Image-To-Image, Text-To-Imageのワークフローをカバーする6個のRESTエンドポイントがあります。各バリアントには、それぞれ独自の料金、パラメーター、作例があります。入力の種類と本番環境の制約に合うものを選ぶか、同じAPIキーで複数を呼び出して、多段階のパイプラインを組み立ててください。
WaveSpeedAIの他の1,000以上のAIモデルと同じAPIキー、請求アカウント、レート制限の枠組みでLumaを実行できます。ベンダーごとの設定も、プロバイダーごとのSDKも、ベンダーごとのレート制限も不要です。1つの連携で、テキストから画像、テキストから動画から、音声合成、3D生成、高画質化、編集まで、すべてカバーできます。
エンドポイント
LumaのAPIエンドポイント一覧
WaveSpeedAIで現在利用可能なLumaのエンドポイントは6個です。ワークフローに合ったバリアントを選んでください。
/filters:quality(82)/media/images/1782717317688496873_qX6fpyHQ.webp)
Ray 3.2 Video Edit
Luma Ray 3.2 Video Edit is a fast AI video-to-video editing model that re-renders an existing source video from a text prompt while preserving the original motion and timing. Ready-to-use REST inference API for video restyling, creative edits, product videos, advertising creatives, social media clips, visual storytelling, and professional video editing workflows with simple integration, no coldstarts, and affordable pricing.
/filters:quality(82)/media/images/1782717390795771980_eQLU3clv.webp)
Ray 3.2 Video Reframing
Luma Ray 3.2 Video Reframing is a fast AI video reframing model that changes an existing video’s aspect ratio and fills the newly exposed canvas from a prompt while preserving the source footage. Ready-to-use REST inference API for aspect ratio conversion, social media resizing, cinematic reframing, video outpainting, creator content, advertising creatives, and professional video editing workflows with simple integration, no coldstarts, and affordable pricing.
/filters:quality(82)/media/images/1781079452793266676_0T2d6enx.webp)
Ray 3.2 Image To Video
Luma Ray 3.2 Image to Video is a fast AI image-to-video generation model that animates a source image into cinematic video guided by a text prompt, with controllable aspect ratio, resolution, and duration. Ready-to-use REST inference API for image animation, cinematic clips, product videos, social media content, advertising creatives, visual storytelling, and professional image-to-video workflows with simple integration, no coldstarts, and affordable pricing.
/filters:quality(82)/media/images/1781079292182866010_NdMW5fpz.webp)
Ray 3.2 Text To Video
Luma Ray 3.2 Text to Video is a fast AI video generation model that creates cinematic videos from text prompts with controllable aspect ratio, resolution, and duration. Ready-to-use REST inference API for cinematic clips, storytelling videos, social media content, advertising creatives, product visuals, concept videos, and professional text-to-video workflows with simple integration, no coldstarts, and affordable pricing.
/filters:quality(82)/media/images/1781079512370971296_kmKPCCyz.webp)
Uni v1 Edit
Luma Uni v1 Edit is a fast AI image editing model that reworks source images from text instructions while preserving composition and supporting optional reference images. Ready-to-use REST inference API for photo editing, product image updates, creative retouching, marketing assets, brand visuals, style changes, and professional image editing workflows with simple integration, no coldstarts, and affordable pricing.
/filters:quality(82)/media/images/1781079484942032323_VCwGPY8i.webp)
Uni v1 Text To Image
Luma Uni v1 Text to Image is a fast AI image generation model that creates high-fidelity images from prompts with flexible aspect ratios, visual style control, and optional reference-image guidance. Ready-to-use REST inference API for creative design, marketing visuals, product mockups, brand assets, social media content, concept art, and professional text-to-image workflows with simple integration, no coldstarts, and affordable pricing.
作例
Lumaの実力を見る
Luma APIで実際に生成された出力です。動画にカーソルを合わせるとプレビュー、クリックすると原寸のビューアで開きます。
使い方
Luma APIの使い方
登録から生成完了まで4ステップ。Python、Node.js、cURLの完全なサンプルは、下のAPIセクションにあります。
- 01
APIキーを取得
WaveSpeedAIのアカウントに登録し、ダッシュボードからAPIキーをコピーします。新規アカウントには無料のスタータークレジットが付くので、課金が始まる前にプレイグラウンドを数十回実行できます。
- 02
予測を送信
入力をJSONとしてhttps://api.wavespeed.ai/api/v3/luma/ray-3.2/text-to-videoにPOSTします。エンドポイントはすぐに予測IDを返します。生成は非同期なので、推論中に接続を開いたままにする必要はありません。
- 03
完了までポーリング
https://api.wavespeed.ai/api/v3/predictions/{request_id}/resultにGETします。completedなら出力を返し、failed、cancelled、timeout、deletedならエラーで停止し、それ以外のステータスの間はポーリングを続けます。
- 04
出力URLを読み取る
ステータスが"completed"になったら、data.outputs[0]からURLを読み取ります。URLは、WaveSpeedAIのCDN上にある生成されたメディアを指します。呼び出したLumaのバリアントに応じて、画像、動画、音声、3Dファイルのいずれかです。
活用例
Lumaで作れるもの
開発者やクリエイターがLuma APIでよく使うワークフロー。
Cinematic text-to-video
luma/ray-3.2/text-to-video generates cinematic videos from text prompts with controllable aspect ratio, resolution, duration and optional reference images.
Animate a still image
luma/ray-3.2/image-to-video animates a source image into video guided by a text prompt, with the same aspect ratio, resolution and duration controls.
Restyle footage and keep the motion
luma/ray-3.2/video-edit re-renders an existing source video from a text prompt while preserving the source motion and timing.
Reframe video to a new aspect ratio
luma/ray-3.2/video-reframing changes a video's aspect ratio and fills the newly exposed canvas from a prompt while preserving the source footage.
Image generation and editing
luma/uni-v1/text-to-image generates images with aspect ratio, style, format and reference-image guidance; luma/uni-v1/edit transforms an input image from a text instruction while preserving composition.
コツ
Lumaのプロンプトのコツ
Lumaからより良い出力を得るための実践的なアドバイス。本番のパイプラインで動画モデル全般に通用するパターンに基づいています。
- 01
カメラワークは具体的に
orbit、dolly-in、push-in、pan-left、crane shot、handheld follow といった、具体的な撮影用語を使ってください。一般的なプロンプトでは、静的な、あるいは任意のカメラ位置になります。名前のついたカメラワークは、モデルの学習データでモーションの意図に直接対応し、ショットの品質を大きく高めます。
- 02
参照画像でキャラクターのアイデンティティを固定する
プロンプトが特定の人物、キャラクター、商品に依存する場合は、プロンプトと一緒に参照画像をアップロードしてください。参照がないと、フレームやショットをまたいでアイデンティティがずれ、同じキャラクターが、生成のたびに少し違う人物になってしまいます。
- 03
ライティングと時間帯を記述する
「ゴールデンアワー、柔らかく暖かい指向性の光」や「曇りの拡散光、スレートグレーの空」のようなライティングの手がかりは、曖昧な品質修飾語よりはるかに、品質と一貫性を高めます。ライティングは、モデルが条件付けする最も強い事前知識の1つです。
- 04
ネガティブプロンプトで、よくある失敗を抑える
動画で役立つネガティブプロンプトは、「frame flicker, motion blur, watermark, text artifacts, distorted hands, low resolution, jpeg compression」です。ネガティブプロンプトにコストはかからず、引き直しが必要になる生成の割合を目に見えて減らせます。
- 05
見せ場を捉えられる最短の長さを選ぶ
ほとんどのプロンプトは、5〜8秒が最適です。長いクリップでは、時間的な不整合(被写体の変形、環境のずれ)が増幅されます。20秒のシーケンスが必要なら、6〜8秒のクリップを3本生成して編集でつなげるほうが、1回の長い生成より品質が高く保てます。
- 06
アスペクト比は最初にプラットフォームに合わせる
TikTok / Reels / Shorts には9:16、横長のフィードやYouTubeには16:9、投稿のグリッドには1:1です。モデルはアスペクト比ごとに学習が少しずつ異なります。16:9を後から9:16にトリミングすると、精細さと、モデルが意図した構図の両方が失われます。
料金
Luma APIの料金
料金は出力ごとです。最終的な請求額は、各バリアントのプレイグラウンドで設定するパラメーター(解像度、長さ、出力数、参照入力)に応じて変わります。
| エンドポイント | タイプ | 最低料金 |
|---|---|---|
| luma/ | video-to-video | $0.144 |
| luma/ | video-to-video | $0.06 |
| luma/ | image-to-video | $0.10 |
| luma/ | text-to-video | $0.10 |
| luma/ | image-to-image | $0.042 |
| luma/ | text-to-image | $0.042 |
API
Luma APIを呼び出す
wavespeed.ai/accesskeyでAPIキーに登録し、RESTで予測を送信します。プレイグラウンドでは、入力の組み合わせに応じて、そのまま貼り付けられるサンプルが生成されます。
POSThttps://api.wavespeed.ai/api/v3/luma/ray-3.2/text-to-video
# 1. Submit the prediction.
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
-X POST "https://api.wavespeed.ai/api/v3/luma/ray-3.2/text-to-video" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $WAVESPEED_API_KEY" \
-d '{
"prompt": "A cinematic shot of a city at sunset, soft golden light",
"size": "16:9",
"resolution": "540p",
"duration": 5
}')
TASK=$(printf '%s' "$SUBMIT_RESPONSE" | jq 'if has("data") then .data else . end')
PREDICTION_ID=$(printf '%s' "$TASK" | jq -r '.id')
if [ -z "$PREDICTION_ID" ] || [ "$PREDICTION_ID" = "null" ]; then
printf 'Submission response did not contain a prediction id
' >&2
exit 1
fi
RESULT_URL="https://api.wavespeed.ai/api/v3/predictions/$PREDICTION_ID/result"
# 2. Poll until the prediction finishes.
while true; do
RESPONSE=$(curl --silent --show-error --fail-with-body "$RESULT_URL" \
-H "Authorization: Bearer $WAVESPEED_API_KEY")
RESULT=$(printf '%s' "$RESPONSE" | jq 'if has("data") then .data else . end')
STATUS=$(printf '%s' "$RESULT" | jq -r '.status')
case "$STATUS" in
completed) printf '%s\n' "$RESULT" | jq '.outputs'; break ;;
failed|cancelled|timeout|deleted) printf '%s\n' "$RESULT" | jq . >&2; exit 1 ;;
*) sleep 2 ;;
esac
doneconst submitUrl = "https://api.wavespeed.ai/api/v3/luma/ray-3.2/text-to-video";
const apiKey = process.env.WAVESPEED_API_KEY;
if (!apiKey) throw new Error('Set WAVESPEED_API_KEY');
async function requestJson(url, options = {}) {
const response = await fetch(url, options);
if (!response.ok) throw new Error(await response.text());
return response.json();
}
// 1. Submit the prediction.
const body = await requestJson(submitUrl, {
method: "POST",
headers: {
"Authorization": `Bearer ${apiKey}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"prompt": "A cinematic shot of a city at sunset, soft golden light",
"size": "16:9",
"resolution": "540p",
"duration": 5
}),
});
const task = body.data ?? body;
const resultUrl = `https://api.wavespeed.ai/api/v3/predictions/${task.id}/result`;
// 2. Poll until the prediction finishes.
while (true) {
const resultBody = await requestJson(resultUrl, {
headers: { "Authorization": `Bearer ${apiKey}` },
});
const result = resultBody.data ?? resultBody;
if (result.status === "completed") {
console.log(result.outputs);
break;
}
if (["failed", "cancelled", "timeout", "deleted"].includes(result.status)) throw new Error(JSON.stringify(result));
await new Promise(resolve => setTimeout(resolve, 2000));
}import json
import os
import time
from urllib.request import Request, urlopen
api_key = os.environ["WAVESPEED_API_KEY"]
headers = {"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"}
payload = {
"prompt": "A cinematic shot of a city at sunset, soft golden light",
"size": "16:9",
"resolution": "540p",
"duration": 5
}
def request_json(url, data=None):
request = Request(url, data=data, headers=headers, method="POST" if data else "GET")
with urlopen(request) as response:
return json.load(response)
# 1. Submit the prediction.
body = request_json("https://api.wavespeed.ai/api/v3/luma/ray-3.2/text-to-video", json.dumps(payload).encode())
task = body.get("data", body)
result_url = f"https://api.wavespeed.ai/api/v3/predictions/{task['id']}/result"
# 2. Poll until the prediction finishes.
while True:
result_body = request_json(result_url)
result = result_body.get("data", result_body)
status = result.get("status")
if status == "completed":
print(result.get("outputs", []))
break
if status in {"failed", "cancelled", "timeout", "deleted"}:
raise RuntimeError(result)
time.sleep(2)比較
Lumaと他モデルの比較
WaveSpeedAI上の類似モデルではなくLumaを選ぶべきケース。
Luma vs Kling 3.0
Kling 3.0 offers Standard, Pro and 4K tiers with native audio. Luma Ray 3.2 adds video edit and video reframing endpoints for working on existing footage.
Luma vs Veo 3.1
Veo 3.1 is Google's video model with synchronized audio. Luma Ray 3.2 is a separate family with optional reference images and footage-level edit and reframing endpoints.
FAQ
Luma API — よくある質問
料金、ライセンス、連携など、WaveSpeedAIでLumaを実行する際のよくある質問。
Luma APIとは何ですか?
Lumaは、Luma AIの動画生成モデルで、WaveSpeedAI上でREST APIとして提供されています。Luma API on WaveSpeedAI — Ray 3.2 text-to-video, image-to-video, video edit and video reframing, earlier Ray 2 and Ray 1.6 models, and Uni v1 and Photon image generation and editing, all through one REST API.プログラムから呼び出すことも、上にリンクされたプレイグラウンドで試すこともできます。
Luma APIはどう呼び出しますか?
WaveSpeedAIのアカウントに登録し、/accesskeyからAPIキーをコピーして、入力をJSONとしてhttps://api.wavespeed.ai/api/v3/luma/ray-3.2/text-to-videoにPOSTします。エンドポイントは予測IDを返します。結果のエンドポイントを約2秒ごとにポーリングし、長時間かかるタスクでは間隔を広げ、終端ステータスになったら停止してください。本番運用向けのPython / Node.js / cURLのサンプルは上にあります。
Luma APIの料金はいくらですか?
Lumaは$0.042からです。実際の料金は、設定するパラメーター(解像度、長さ、出力数、参照入力)に応じて変わります。プレイグラウンドの「生成」ボタンの横に表示されるリアルタイムの料金プレビューで、現在の入力での正確な料金を確認できます。
Lumaにはどのバリアントがありますか?
WaveSpeedAIでは、6個のLumaエンドポイントが利用可能です:luma/ray-3.2/video-edit, luma/ray-3.2/video-reframing, luma/ray-3.2/image-to-video, luma/ray-3.2/text-to-video, luma/uni-v1/edit, luma/uni-v1/text-to-image。各バリアントには、専用のプレイグラウンドページと料金があります。
Lumaの出力を商用利用できますか?
商用利用の権利は、Luma AIのモデルライセンスに従います。Luma AIのほとんどのモデルは出力の商用利用を認めています。具体的なライセンスの概要は各モデルのプレイグラウンドページで、プラットフォーム全体の条件はWaveSpeedAIの利用規約でご確認ください。
なぜ直接ではなくWaveSpeedAIでLumaを使うのですか?
Lumaと、他のプロバイダーの1,000以上のAIモデルを、1つのAPIキー、1つの請求アカウントで利用できます。ベンダーごとのSDK設定も、個別のレート制限も、ベンダーごとの連携コードの書き直しも不要です。料金は、通常Luma AIの直接のAPIと同等かそれ以下です。
WaveSpeedAIでLumaを使った開発を始めよう
登録時に無料のスタータークレジットを進呈。Luma AIをはじめ、あらゆるプロバイダーの1,000以上のAIモデルを、1つのAPIキーで。
/filters:quality(82)/examples/7090bb21305b0b99db644a0756b3a4ca/1783684141735187042_eUGQZ8ir.webp)