Ray 2 API

Luma Ray-2 generates high-quality videos from text prompts or images with advanced AI techniques.

Modalities
Image, TextVideo
Price
$0.0796per 1M pixels
Clip length
5 to 9 s
Released
Dec 2, 2025

Ray 2 overview

Duration
Resolution
Aspect ratio

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

Ray 2 pricing in US dollars
UsagePriceUnit
Video generation$0.0796per 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.

AI/ML API prices in USD per 1M pixels
ModelPer 1M pixels
Ray 2$0.0796
Ray Flash 2$0.0274
Ray 3.2$0.06

How to use the Ray 2 API

View docs

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export 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"
}'

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

All posts

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.

Start building with Ray 2

Ray 2 API

luma/ray-2

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export 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"
}'