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.
Ringkasan
Tentang Luma API
Apa yang dilakukan Luma, posisinya dalam jajaran model Luma AI, dan mengapa banyak tim memilihnya.
Luma adalah model pembuatan video dari Luma AI, tersedia melalui REST API WaveSpeedAI. 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.
Keluarga Luma di WaveSpeedAI menyediakan 6 endpoint REST yang mencakup alur kerja Video-To-Video, Image-To-Video, Text-To-Video, Image-To-Image, Text-To-Image. Setiap varian memiliki harga, parameter, dan contoh output sendiri — pilih yang sesuai dengan modalitas input dan kebutuhan produksi Anda, atau panggil beberapa sekaligus dengan satu API key untuk menyusun pipeline multi-langkah.
Jalankan Luma dengan API key, akun penagihan, dan batas laju yang sama dengan yang Anda pakai untuk 1.000+ model AI lainnya di WaveSpeedAI. Tanpa penyiapan vendor terpisah, tanpa SDK per penyedia, tanpa batas laju per vendor — satu integrasi mencakup semuanya, dari text-to-image dan text-to-video hingga sintesis audio, pembuatan 3D, upscaling, dan pengeditan.
Endpoint
Semua endpoint API Luma
6 endpoint Luma tersedia sekarang di WaveSpeedAI — pilih varian yang sesuai dengan alur kerja Anda.
/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.
Contoh
Lihat Luma beraksi
Output nyata yang dihasilkan oleh API Luma. Arahkan kursor ke video mana pun untuk pratinjau, klik untuk membuka penampil ukuran penuh.
Cara pakai
Cara menggunakan API Luma
Empat langkah dari pendaftaran hingga hasil jadi. Contoh lengkap Python, Node.js, dan cURL ada di bagian API di bawah.
- 01
Dapatkan API key
Daftar akun WaveSpeedAI dan salin API key Anda dari dasbor. Akun baru mendapat kredit awal gratis — cukup untuk menjalankan playground beberapa puluh kali sebelum penagihan dimulai.
- 02
Kirim prediksi
POST input Anda sebagai JSON ke https://api.wavespeed.ai/api/v3/luma/ray-3.2/text-to-video. Endpoint langsung mengembalikan id prediksi — proses generasi bersifat asinkron sehingga Anda tidak perlu menahan koneksi terbuka selama inferensi.
- 03
Polling hingga selesai
GET https://api.wavespeed.ai/api/v3/predictions/{request_id}/result. Ambil output saat completed; hentikan dengan error saat failed, cancelled, timeout, atau deleted; lanjutkan polling untuk status lainnya.
- 04
Baca URL output
Setelah status "completed", baca URL dari data.outputs[0]. URL tersebut mengarah ke media hasil generasi Anda di CDN WaveSpeedAI — file gambar, video, audio, atau 3D tergantung varian Luma yang Anda panggil.
Kasus penggunaan
Apa yang bisa Anda bangun dengan Luma
Alur kerja umum yang dipakai pengembang dan kreator dengan API Luma.
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.
Tips
Tips menulis prompt untuk Luma
Saran praktis untuk mendapatkan output yang lebih baik dari Luma — diambil dari pola yang berhasil pada model video di pipeline produksi.
- 01
Jelaskan gerakan kamera secara spesifik
Sebutkan kosakata sinematografi yang konkret — orbit, dolly-in, push-in, pan-left, crane shot, handheld follow. Prompt generik menghasilkan pilihan kamera yang statis atau acak; gerakan kamera yang disebut namanya langsung terpetakan ke maksud gerakan dalam data pelatihan model dan sangat meningkatkan kualitas shot.
- 02
Kunci identitas karakter dengan gambar referensi
Jika prompt Anda bergantung pada orang, karakter, atau produk tertentu, unggah gambar referensi bersama prompt. Tanpa referensi, identitas bergeser antar bingkai dan antar shot — karakter yang sama tampak seperti orang yang sedikit berbeda di setiap pembuatan.
- 03
Deskripsikan pencahayaan dan waktu
Petunjuk pencahayaan seperti 'golden hour, soft warm directional light' atau 'overcast diffused light, slate-grey sky' meningkatkan kualitas dan konsistensi jauh lebih baik daripada pengubah kualitas yang samar. Pencahayaan adalah salah satu prior terkuat yang dipakai model.
- 04
Gunakan negative prompt untuk menekan kegagalan umum
Negative prompt yang berguna untuk video: 'frame flicker, motion blur, watermark, text artifacts, distorted hands, low resolution, jpeg compression'. Negative prompt tidak berbiaya dan secara nyata mengurangi hasil yang harus Anda ulang.
- 05
Pilih durasi terpendek yang menangkap momen Anda
Sebagian besar prompt bekerja terbaik pada 5-8 detik. Klip yang lebih panjang memperbesar inkonsistensi temporal (subjek berubah bentuk, lingkungan bergeser). Jika Anda butuh urutan 20 detik, buat tiga klip 6-8 detik dan sunting menjadi satu — kualitas tetap lebih tinggi daripada satu pembuatan panjang.
- 06
Sesuaikan rasio aspek dengan platform sejak awal
9:16 untuk TikTok / Reels / Shorts, 16:9 untuk feed lanskap dan YouTube, 1:1 untuk grid postingan. Model dilatih sedikit berbeda untuk tiap rasio aspek — memotong 16:9 menjadi 9:16 setelahnya mengorbankan fidelitas sekaligus komposisi yang dimaksudkan model.
Harga
Harga API Luma
Harga dihitung per output. Biaya akhir menyesuaikan parameter yang Anda atur di playground setiap varian (resolusi, durasi, jumlah output, referensi).
| Endpoint | Jenis | Harga mulai dari |
|---|---|---|
| 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
Panggil API Luma
Daftar untuk mendapatkan API key di wavespeed.ai/accesskey, lalu kirim prediksi melalui REST. Playground menghasilkan contoh siap tempel untuk kombinasi input apa pun.
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)Perbandingan
Luma vs alternatif
Kapan memilih Luma dibanding model serupa di WaveSpeedAI.
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 — Pertanyaan yang sering diajukan
Harga, lisensi, integrasi — pertanyaan umum tentang menjalankan Luma di WaveSpeedAI.
Apa itu API Luma?
Luma adalah model pembuatan video dari Luma AI yang tersedia sebagai REST API di WaveSpeedAI. 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. Anda dapat memanggilnya secara terprogram atau mencobanya dari playground yang ditautkan di atas.
Bagaimana cara memanggil API Luma?
Daftar akun WaveSpeedAI, salin API key Anda dari /accesskey, lalu POST ke https://api.wavespeed.ai/api/v3/luma/ray-3.2/text-to-video dengan input Anda sebagai JSON. Endpoint mengembalikan id prediksi. Lakukan polling pada endpoint hasil dengan interval sekitar 2 detik, perpanjang interval untuk tugas yang berjalan lama, dan berhenti pada status akhir apa pun. Contoh Python / Node.js / cURL untuk produksi ada di atas.
Berapa biaya API Luma?
Luma mulai dari $0.042. Biaya pastinya menyesuaikan parameter yang Anda atur (resolusi, durasi, jumlah output, referensi). Pratinjau biaya langsung di samping tombol Generate di playground menampilkan harga pasti untuk input Anda saat ini.
Varian Luma apa saja yang tersedia?
WaveSpeedAI menyediakan 6 endpoint Luma aktif: 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. Setiap varian memiliki halaman playground dan harga sendiri.
Bisakah output Luma dipakai secara komersial?
Hak penggunaan komersial mengikuti lisensi model Luma AI. Sebagian besar model Luma AI mengizinkan penggunaan output secara komersial; lihat halaman playground tiap model untuk ringkasan lisensinya, dan Ketentuan Layanan WaveSpeedAI untuk ketentuan tingkat platform.
Mengapa memakai Luma di WaveSpeedAI dan bukan langsung?
Satu API key + satu akun penagihan untuk Luma DAN 1.000+ model AI lain dari penyedia lain. Tanpa penyiapan SDK per vendor, tanpa batas laju terpisah, tanpa menulis ulang kode integrasi untuk tiap vendor. Harganya umumnya setara atau di bawah API langsung dari Luma AI.
Mulai membangun dengan Luma di WaveSpeedAI
Kredit awal gratis saat mendaftar. Satu API key untuk 1.000+ model AI dari Luma AI dan semua penyedia lainnya.
/filters:quality(82)/examples/7090bb21305b0b99db644a0756b3a4ca/1783684141735187042_eUGQZ8ir.webp)