Ray Flash 2 API

luma/ray-flash-2
Ray Flash 2 offers a perfect blend of speed and quality, making ultra-realistic video content creation accessible and efficient.
Output
$0.002 / 1M px
Released
Dec 2, 2025

Overview

Ray Flash 2 API Overview

Ray Flash 2 is a cutting-edge video generation model built on Luma’s multi-modal architecture. The model offers accelerated workflows with rapid iterations, real-time previews, and high-fidelity output, making it ideal for professional content creators and developers seeking fast, detailed, and realistic video synthesis.

Technical Specifications

  • Output Resolution: Supports up to 720p  with high detail preservation.​
  • Supported Lengths: Generates videos of 5 or 9 seconds duration, suitable for short clips and social media content.​
  • Input Mode: Text prompts combined with optional start frames or sketches for guided generation.​
  • Processing Speed: Significantly optimized for rapid iterations, enabling faster preview cycles and production workflows.​
  • Architecture: Built on a scaled-up multi-modal architecture, with a focus on motion coherence and visual quality.

Performance Benchmarks

  • Compute Scale: 10x increase in computational capacity over previous versions, ensuring high-quality outputs in reduced times.​
  • Generation Speed: Rapid synthesis with multiple frames per second, supporting quick iteration cycles for professional workflows.​
  • Visual Quality: Near-photorealistic results with advanced motion coherence and scene understanding, surpassing many industry-standard models.

Key Features

  • Fast Iterations & Previews: Designed for accelerated workflows, allowing users to generate previews swiftly during the creative process.​
  • Realistic, Coherent Motion: Maintains logical and natural motion sequences with physics-based simulations and camera techniques.​
  • High Fidelity Detailing: Produces photorealistic and visually rich videos with accurate lighting, shadows, and textures.​
  • Multi-Modal Input: Supports text prompts, start frames, and sketches for flexible content control.​
  • Scene Complexity Handling: Capable of rendering complex scenes with multiple interacting objects, dynamic environments, and atmospheric effects.

Ray Flash 2 API Pricing

  • $0.00286 / 1 million pixels

‍

Code Sample

Comparison with Other Models

vs Luma Ray 2: Ray Flash 2 is a distilled, faster variant of Luma Ray 2, offering up to three times faster video generation and costing less while retaining strong video realism. Ray 2 provides higher fidelity and supports more complex animations, but at slower speeds and higher resource usage.

vs Luma Ray 1.6: Compared to Luma Ray 1.6, Ray Flash 2 offers improved speed, much higher resolution (up to 720p), and better motion coherence. Ray 1.6 produces shorter, lower-resolution videos with less natural motion.

vs Synthesia: Ray Flash 2 excels in photorealistic video content creation with coherent scene dynamics, while Synthesia focuses on real-time avatar animations and lip-sync for interactive video content. Ray Flash 2 is more suitable for cinematic and complex video generation.

‍

Use cases

  • Film & Video Production: Rapid prototyping of cinematic scenes, environmental simulations, and character animation.​
  • Advertising & Marketing: Creation of short, engaging promotional videos with realistic motion effects.​
  • Visual Effects (VFX): Integration of realistic visual effects and surrealist sequences.​
  • Educational Content: Generating illustrative videos with complex dynamics and physics simulations.

‍

How to use Ray Flash 2 API

Install any OpenAI-compatible SDK, point it at api.aimlapi.com/v1, and set the model to luma/ray-flash-2.
import requests, time

headers = {"Authorization": "Bearer " + AIMLAPI_KEY}
job = requests.post(
    "https://api.aimlapi.com/v2/video/generations",
    headers=headers,
    json={
      "model": "luma/ray-flash-2",
      "prompt": "A serene timelapse of clouds over a mountain range"
    },
).json()
gid = job["id"]

while True:
    res = requests.get(f"https://api.aimlapi.com/v2/video/generations?generation_id={gid}", headers=headers).json()
    if res.get("status") in ("completed", "error"):
        break
    time.sleep(5)
print(res["video"]["url"])
const headers = {
  Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
  "Content-Type": "application/json",
};
const job = await (await fetch("https://api.aimlapi.com/v2/video/generations", {
  method: "POST",
  headers,
  body: JSON.stringify({
    "model": "luma/ray-flash-2",
    "prompt": "A serene timelapse of clouds over a mountain range"
  }),
})).json();

let res;
do {
  await new Promise((r) => setTimeout(r, 5000));
  res = await (await fetch(`https://api.aimlapi.com/v2/video/generations?generation_id=${job.id}`, { headers })).json();
} while (!["completed", "error"].includes(res.status));
console.log(res.video.url);
# submit the generation — the response contains the job "id"
curl -X POST https://api.aimlapi.com/v2/video/generations \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"luma/ray-flash-2","prompt":"A serene timelapse of clouds over a mountain range"}'

# then poll until status is "completed" — video.url holds the result
curl "https://api.aimlapi.com/v2/video/generations?generation_id={id}" -H "Authorization: Bearer $AIMLAPI_KEY"

OpenAI-compatible — swap the base URL and it works with your existing SDK.

Ray Flash 2 API Pricing

TypePrice
Output
$0.002 / 1M px

Ray Flash 2 vs other models

ModelInputOutputContextBest for
Ray Flash 2
This page
$0.002 / 1M px
Video generation
$0.26 / sec (variable)
Video generation
$1.95 / 1M tokens
$22.75 / 1M tokens
Video generation
$0.09243–$1.014 / sec (by resolution)
Cinematic video + native audio

Frequently asked questions

Ray Flash 2 takes image, text as input and returns video.

Ray Flash 2 became available on December 2, 2025.

Ray Flash 2 is priced at $0.002 / 1M px.

Ray Flash 2 is billed per generation — a fixed charge per output rather than by prompt length.

Yes, Ray Flash 2 accepts image input as well as a text prompt.

Ray Flash 2 was built by Luma AI.

Send a request to v2/video/generations with luma/ray-flash-2 as the model id.

Yes. Ray Flash 2 is served through AI/ML API, so the same key and endpoint format used for other models applies.

Ray Flash 2 is a video generation model from Luma AI, designed to be faster and more cost-effective than other Luma models.

Start building with Ray Flash 2

Get API Key
1000+ models, one API.