Luma Ray 2 API
by Luma
Dream Machine cinematography, with keyframes and loops.
Luma's Ray 2 Dream Machine model through one unified API. Cinematic clips with natural motion and physics, first-and-last-frame keyframe control, and seamless looping.
- 9s
- Max duration
- 6
- Aspect ratios
- Loop
- Seamless clips
- 153 credits
- From
luma-ray-2
Video model
Playground
Try Luma Ray 2 right here.
Your output lands here. Hit generate to run this request in Studio.
Capabilities
What's new in Luma Ray 2.
Cinematic motion coherence
Ray 2 is known for natural motion and physics accuracy, movement that flows believably instead of morphing between frames.
Keyframe control
Set a start image, an end image, or both. Defining where the shot begins and ends gives you narrative control most video models lack.
Seamless loops
A dedicated loop option renders clips that cycle perfectly, ambient backgrounds, hero-section video, and living posters.
Image-to-video that stays faithful
Animate a still and Ray 2 preserves its identity while adding dynamic, natural movement.
Six aspect ratios
From 1:1 to ultrawide 21:9, with vertical formats for social, the widest ratio coverage in its class.
Draft fast on Ray Flash 2
The same family includes Ray Flash 2, about a third of the price and twice the speed, for iterating before a final Ray 2 render.
Pricing
Simple per-generation pricing.
153–276 credits per generation ≈ $1.53–$2.76
The rate depends on the resolution and options you pick.
- You only pay for successful generations. Failed jobs are refunded automatically.
- One credit balance across every model on Apiframe, no per-model plans.
- Start with free credits. No subscription required.
- Volume discounts on larger plans.
Specs
At a glance.
Comparison
Luma Ray 2 vs Luma Ray Flash 2 vs Kling 3.0
Luma Ray 2 against its speed tier and the Kuaishou flagship.
| Feature | Luma Ray 2 | Luma Ray Flash 2 | Kling 3.0 |
|---|---|---|---|
| Max duration | 9 seconds | 9 seconds | 15 seconds |
| Keyframe control | Start + end frame | Start + end frame | Start + end frame |
| Avg. generation | ~2 min | ~1 min | ~2.5 min |
| Price per clip | 153–276 credits (≈$1.53–$2.76) | 51–92 credits (≈$0.51–$0.92) | 29–72 credits/s (per-second) |
| Best for | Cinematic motion, loops, ultrawide | Cheap iteration on the same look | Multi-shot narrative with native audio |
Specs reflect what each model supports on Apiframe today, from the live catalog.
Quickstart
How to call the Luma Ray 2 API.
Send one POST /v2/videos/generate request with your API key. The call returns a jobId you can poll, or pass a webhook_url and the result is pushed to you the moment it's ready.
Swap luma-ray-2 for any other model and nothing else changes.
const response = await fetch("https://api.apiframe.ai/v2/videos/generate", {
method: "POST",
headers: {
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
"prompt": "a cinematic sunrise over a futuristic cityscape, smooth camera push-in",
"model": "luma-ray-2",
"lumaParams": {
"start_image": "https://example.com/input.jpg",
"end_image": "https://example.com/input.jpg",
"loop": false
}
}),
});
const { jobId } = await response.json();
console.log(jobId); Input schema
Every field Luma Ray 2 accepts, with types and defaults. The full reference lives in the docs.
| Field | Type | Description |
|---|---|---|
| prompt required | string | Text description of what to generate. |
| model required | string | The model identifier for this endpoint. Default:"luma-ray-2" · "luma-ray-2" |
| lumaParams.start_image | string (URL) | Use a still as the first frame of the clip. |
| lumaParams.end_image | string (URL) | Optional last frame to control the ending. |
| lumaParams.loop | boolean | Make the clip loop seamlessly. Default:false |
Luma versions
Every Luma video model on Apiframe. Switch with one parameter.
Use cases
What teams build with Luma Ray 2.
Cinematic b-roll
Ray 2's motion coherence and physics accuracy suit establishing shots and atmosphere pieces where unnatural movement breaks the spell.
Keyframed shots
Provide the first frame, the last frame, or both, and the model generates the motion between, storyboard-level control over a generated shot.
Perfect loops
The loop option renders clips that cycle seamlessly: website heroes, ambient screens, and social posts that never visibly restart.
Draft on Flash, finish on Ray 2
Iterate at a third of the price on Ray Flash 2, then re-run the winning prompt here, same request shape, one model id apart.
Reviews
9,800+ developers. One API.
Real Apiframe reviews from Trustpilot and G2.
Seamless experience, excellent support
Just created 6 videos and the experience has been seamless. Wanted to write a review for appreciation — the customer support has also been excellent. They helped me in some process I was stuck in.
Stable, easy image & video generation
I like that I can generate images and videos without complicated setup. It works stable and is easy to use even if you are not a big developer. It saves me time and makes the whole process much simpler.
Honestly the best AI API
They got every engine possible and it's great to have them all in one place.
Luma Ray 2 questions
What teams ask before shipping with Luma Ray 2. Everything else lives in the docs.
What is Luma Ray 2?
Luma AI's Dream Machine video model, known for cinematic quality, natural motion, and physics accuracy. It generates 5 or 9-second clips from text or images.
How does keyframe control work?
You can provide a start image, an end image, or both, and Ray 2 generates the motion between them, precise control over how a shot begins and ends.
How is Ray Flash 2 different?
Flash is the speed tier: the same controls at roughly a third of the cost and about half the generation time. Draft on Flash, finish on Ray 2.
How much does it cost?
From 153 to 276 credits (≈$1.53–$2.76) per clip depending on duration and options. Ray Flash 2 runs 51–92 credits for iteration.
How long does generation take?
Around two minutes for Ray 2, about one minute for Ray Flash 2. Jobs are async, poll the jobId or get the finished clip on a webhook.
Related models
All video modelsFlux 3
by Black Forest Labs
Black Forest Labs' multimodal model — up to 20s of video with synchronized audio from text, images, or a clip.
View modelVeo 3.1
by Google
Google's flagship cinematic video model with audio.
View modelSora 2 Pro
by OpenAI
Highest-quality Sora 2 tier with HD option.
View modelKling 3.0
by Kuaishou
Latest Kling — per-second pricing, optional audio.
View model9,800+
developers & companies
Official partner of
Power your next AI product with Apiframe.
Instant access to 70+ media models through a single API. Start free and scale when you're ready.