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.
Przegląd
O modelu Luma API
Co robi Luma, jakie miejsce zajmuje w linii modeli Luma AI i dlaczego zespoły po niego sięgają.
Luma to model generowania wideo od Luma AI, dostępny przez 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.
Rodzina Luma w WaveSpeedAI zawiera 6 endpointów REST obejmujące workflowy: Video-To-Video, Image-To-Video, Text-To-Video, Image-To-Image, Text-To-Image. Każdy wariant ma własny cennik, parametry i przykładowe wyniki — wybierz ten, który pasuje do Twoich danych wejściowych i wymagań produkcyjnych, albo wywołuj kilka z jednego klucza API, aby składać wieloetapowe pipeline'y.
Uruchamiaj Luma z tym samym kluczem API, kontem rozliczeniowym i limitami, których używasz dla ponad 1000 innych modeli AI w WaveSpeedAI. Bez osobnej konfiguracji u dostawcy, bez osobnych SDK, bez osobnych limitów — jedna integracja obejmuje wszystko: od tekstu na obraz i tekstu na wideo, przez syntezę dźwięku i generowanie 3D, po upscaling i edycję.
Endpointy
Wszystkie endpointy API Luma
6 endpointów Luma dostępnych teraz w WaveSpeedAI — wybierz wariant pasujący do Twojego workflow.
/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.
Przykłady
Luma w akcji
Prawdziwe wyniki wygenerowane przez API Luma. Najedź na wideo, aby zobaczyć podgląd, kliknij, aby otworzyć pełnowymiarowy podgląd.
Jak zacząć
Jak korzystać z API Luma
Cztery kroki od rejestracji do gotowego wyniku. Pełne przykłady w Pythonie, Node.js i cURL znajdziesz w sekcji API poniżej.
- 01
Uzyskaj klucz API
Załóż konto WaveSpeedAI i skopiuj klucz API z panelu. Nowe konta otrzymują darmowe kredyty na start — wystarczy na kilkadziesiąt uruchomień w playground, zanim zaczną się opłaty.
- 02
Wyślij predykcję
Wyślij dane wejściowe jako JSON metodą POST na https://api.wavespeed.ai/api/v3/luma/ray-3.2/text-to-video. Endpoint od razu zwraca identyfikator predykcji — generowanie jest asynchroniczne, więc nie trzymasz otwartego połączenia na czas inferencji.
- 03
Sprawdzaj ukończenie
Wywołaj GET https://api.wavespeed.ai/api/v3/predictions/{request_id}/result. Przy statusie completed odbierz wyniki; przy failed, cancelled, timeout lub deleted zakończ z błędem; przy każdym innym statusie odpytuj dalej.
- 04
Odczytaj adres wyniku
Gdy status to "completed", odczytaj adres URL z data.outputs[0]. Wskazuje on wygenerowane media w CDN WaveSpeedAI — obraz, wideo, dźwięk lub plik 3D, zależnie od wywołanego wariantu Luma.
Zastosowania
Co możesz zbudować z Luma
Typowe workflowy, do których deweloperzy i twórcy używają 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.
Wskazówki
Wskazówki do promptów dla Luma
Praktyczne rady, jak uzyskiwać lepsze wyniki z Luma — oparte na wzorcach, które sprawdzają się w produkcyjnych pipeline'ach dla modeli wideo.
- 01
Precyzyjnie opisuj ruchy kamery
Używaj konkretnego słownictwa filmowego — orbit, dolly-in, push-in, pan-left, ujęcie z dźwigu, śledzenie z ręki. Ogólne prompty dają statyczną lub przypadkową kamerę; nazwane ruchy kamery bezpośrednio odpowiadają intencji ruchu w danych treningowych modelu i znacząco poprawiają jakość ujęcia.
- 02
Zakotwicz tożsamość postaci obrazami referencyjnymi
Jeśli prompt zależy od konkretnej osoby, postaci lub produktu, wgraj obraz referencyjny razem z promptem. Bez referencji tożsamość dryfuje między klatkami i ujęciami — ta sama postać przy każdym generowaniu wygląda trochę jak inna osoba.
- 03
Opisuj oświetlenie i porę dnia
Wskazówki świetlne, takie jak „golden hour, soft warm directional light” lub „overcast diffused light, slate-grey sky”, poprawiają jakość i spójność znacznie bardziej niż niejasne modyfikatory jakości. Oświetlenie to jedna z najsilniejszych wskazówek, na których opiera się model.
- 04
Używaj negatywnych promptów, by tłumić typowe błędy
Przydatne negatywy dla wideo: „frame flicker, motion blur, watermark, text artifacts, distorted hands, low resolution, jpeg compression”. Negatywne prompty nic nie kosztują i zauważalnie zmniejszają liczbę generacji, które musiałbyś powtarzać.
- 05
Wybierz najkrótszą długość, która oddaje Twój moment
Większość promptów działa najlepiej przy 5–8 sekundach. Dłuższe klipy wzmacniają niespójności czasowe (zmiana kształtu bohatera, dryf otoczenia). Jeśli potrzebujesz sekwencji 20-sekundowej, wygeneruj trzy klipy po 6–8 sekund i zmontuj je — jakość pozostaje wyższa niż przy jednym długim generowaniu.
- 06
Od razu dopasuj proporcje obrazu do platformy
9:16 dla TikToka / Reels / Shorts, 16:9 dla poziomych feedów i YouTube, 1:1 dla siatek postów. Modele trenują nieco inaczej dla każdych proporcji — przycięcie 16:9 do 9:16 po fakcie traci zarówno wierność, jak i kompozycję zamierzoną przez model.
Cennik
Cennik API Luma
Cena jest naliczana za wynik. Końcowa opłata zależy od parametrów ustawionych w playground każdego wariantu (rozdzielczość, czas trwania, liczba wyników, referencje).
| Endpoint | Typ | Cena początkowa |
|---|---|---|
| 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
Wywołaj API Luma
Uzyskaj klucz API na wavespeed.ai/accesskey, a następnie wyślij predykcję przez REST. Playground generuje gotowe do wklejenia przykłady dla dowolnej kombinacji danych wejściowych.
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)Porównanie
Luma a alternatywy
Kiedy wybrać Luma zamiast podobnych modeli w WaveSpeedAI.
Luma a 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 a 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 — najczęściej zadawane pytania
Cennik, licencja, integracja — typowe pytania o uruchamianie Luma w WaveSpeedAI.
Czym jest API Luma?
Luma to model generowania wideo od Luma AI, udostępniony jako REST API w 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. Możesz wywoływać go programowo lub wypróbować w playground, do którego prowadzi link powyżej.
Jak wywołać API Luma?
Załóż konto WaveSpeedAI, skopiuj klucz API z /accesskey, a następnie wyślij POST na https://api.wavespeed.ai/api/v3/luma/ray-3.2/text-to-video z danymi wejściowymi w JSON. Endpoint zwraca identyfikator predykcji. Odpytuj endpoint wyniku mniej więcej co 2 sekundy, wydłużaj odstęp przy długich zadaniach i zatrzymaj się przy dowolnym statusie końcowym. Produkcyjne przykłady w Pythonie / Node.js / cURL znajdziesz powyżej.
Ile kosztuje API Luma?
Luma zaczyna się od $0.042. Dokładny koszt zależy od ustawionych parametrów (rozdzielczość, czas trwania, liczba wyników, referencje). Podgląd kosztu na żywo obok przycisku Generuj w playground pokazuje dokładną cenę dla bieżących danych.
Jakie warianty Luma są dostępne?
WaveSpeedAI udostępnia 6 aktywnych endpointów 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. Każdy wariant ma własną stronę playground i cennik.
Czy mogę używać wyników Luma komercyjnie?
Prawa do komercyjnego użycia wynikają z licencji modelu Luma AI. Większość modeli Luma AI zezwala na komercyjne wykorzystanie wyników; skrót licencji znajdziesz na stronie playground każdego modelu, a warunki na poziomie platformy w Warunkach świadczenia usług WaveSpeedAI.
Dlaczego korzystać z Luma w WaveSpeedAI zamiast bezpośrednio?
Jeden klucz API i jedno konto rozliczeniowe dla Luma ORAZ ponad 1000 innych modeli AI od innych dostawców. Bez osobnej konfiguracji SDK, bez osobnych limitów, bez przepisywania kodu integracji pod każdego dostawcę. Ceny są zazwyczaj na poziomie bezpośredniego API Luma AI lub niższe.
Zacznij budować z Luma w WaveSpeedAI
Darmowe kredyty na start po rejestracji. Jeden klucz API do ponad 1000 modeli AI od Luma AI i wszystkich innych dostawców.
/filters:quality(82)/examples/7090bb21305b0b99db644a0756b3a4ca/1783684141735187042_eUGQZ8ir.webp)