Ray 2 overview
Ray 2 specs
- Model ID
luma/ray-2- Developer
- Luma AI
- Input
- Image, Text
- Output
- Video
- Endpoint
POST https://api.aimlapi.com/v2/video/generations
What is Luma Dream Machine Ray-2 API?
Luma Ray-2 generates high-quality videos from text prompts or images with advanced AI techniques.
Luma Dream Machine Ray-2 API Pricing
- Pricing on request
Where to Use Luma Dream Machine Ray-2
Use cases
- Content Creation: Marketing videos, promo clips, storytelling, brand engagement
- Film & Animation: Concept art animation, pre-visualization, scene prototyping
- Interactive Media: Generating dynamic backgrounds, UI animations, and immersive experiences
- Education & Training: Visual storytelling for learning modules and tutorials
- Creative Arts: Experimental video art and narrative exploration
- Product Visualization: Simulated product demos and virtual displays without physical shoots.
Ray 2 API pricing
| Usage | Price | Unit |
|---|---|---|
| Video generation | $0.0796 | per 1M pixels |
Prices from the AI/ML API price list, checked on Nov 4, 2026.
Ray 2 vs other video models: prices
AI/ML API rates for 3 models, per 1M pixels.
| Model | Per 1M pixels |
|---|---|
| $0.0796 | |
| $0.0274 | |
| $0.06 |
How to use the Ray 2 API
View docsBuild with your agent
Give your agent the model details, code and documentation.
1Get your API key
Create API keyexport AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"2Make your first request
curl 'https://api.aimlapi.com/v2/video/generations' \
-H "Authorization: Bearer $AIMLAPI_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "luma/ray-2",
"prompt": "A slow dolly shot through a sunlit greenhouse full of ferns, light dust in the air, natural camera motion"
}'import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['AIMLAPI_KEY']}",
"Content-Type": "application/json",
}
payload = {
"model": "luma/ray-2",
"prompt": "A slow dolly shot through a sunlit greenhouse full of ferns, light dust in the air, natural camera motion"
}
response = requests.post("https://api.aimlapi.com/v2/video/generations", headers=headers, json=payload, timeout=120)
response.raise_for_status()
print(response.json())const response = await fetch("https://api.aimlapi.com/v2/video/generations", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "luma/ray-2",
"prompt": "A slow dolly shot through a sunlit greenhouse full of ferns, light dust in the air, natural camera motion"
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());The request returns a generation id. Poll GET https://api.aimlapi.com/v2/video/generations?generation_id=<id> until the status is completed.
Related articles
Ray 2 FAQ
What inputs and outputs does Ray 2 support?
Ray 2 takes image, text as input and returns video.
When was Ray 2 released?
Ray 2 became available on December 2, 2025.
How much does Ray 2 cost?
Ray 2 costs $0.0796 per 1M pixels on AI/ML API, billed as you go with no subscription.
How is Ray 2 billed?
Ray 2 is billed per generation, a fixed charge per output rather than by prompt length.
Can Ray 2 take an existing image as input?
Yes, Ray 2 accepts image input as well as a text prompt.
Who created Ray 2?
Ray 2 was built by Luma AI.
How do I call Ray 2 on AI/ML API?
Send a request to v2/video/generations with luma/ray-2 as the model id.
Is Ray 2 available through a single API key?
Yes. Ray 2 is served through AI/ML API, so the same key and endpoint format used for other models applies.
What is the Ray 2 model ID?
Use luma/ray-2 as the model parameter. Requests go to https://api.aimlapi.com/v2/video/generations with your AI/ML API key.

