ApiframeApiframe Docs
Video GenerationLuma

Luma Ray Flash 2

Generate videos quickly using the Luma Ray Flash 2 model — a faster, more cost-effective variant of Ray 2.

Use in Apiframe Studio

POST /v2/videos/generatemodel: "luma-ray-flash-2"

A speed-optimized variant of Luma Ray 2 that generates 720p videos faster at lower cost. Supports the same parameter set including keyframes, looping, aspect ratio, and camera concepts.

See Video Generation overview for common request fields, response format, and error codes.

Model-specific parameters

ParameterTypeRequiredDefaultDescription
lumaParams.durationnumberNo5Video duration in seconds: 5 or 9
lumaParams.aspect_ratiostringNoAspect ratio: "16:9", "9:16", "1:1", "4:3", "3:4", "21:9"
lumaParams.start_imagestringNoImage URL for the first frame
lumaParams.end_imagestringNoImage URL for the last frame
lumaParams.loopbooleanNoWhether the video should loop seamlessly
lumaParams.conceptsstring[]NoCamera motion concepts (see Luma Ray 2 for the full list)

Credit cost

VariantCredits
5s5
9s10

Code examples

curl -X POST https://api.apiframe.ai/v2/videos/generate \
  -H "X-API-Key: afk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "a butterfly emerging from a cocoon in a sunlit garden",
    "model": "luma-ray-flash-2",
    "lumaParams": {
      "duration": 5,
      "aspect_ratio": "16:9"
    }
  }'
import requests

response = requests.post(
    "https://api.apiframe.ai/v2/videos/generate",
    headers={
        "X-API-Key": "afk_your_api_key_here",
        "Content-Type": "application/json",
    },
    json={
        "prompt": "a butterfly emerging from a cocoon in a sunlit garden",
        "model": "luma-ray-flash-2",
        "lumaParams": {
            "duration": 5,
            "aspect_ratio": "16:9",
        },
    },
)
print(response.json())
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 butterfly emerging from a cocoon in a sunlit garden",
    model: "luma-ray-flash-2",
    lumaParams: {
      duration: 5,
      aspect_ratio: "16:9",
    },
  }),
});
console.log(await response.json());
body := `{
  "prompt": "a butterfly emerging from a cocoon in a sunlit garden",
  "model": "luma-ray-flash-2",
  "lumaParams": {
    "duration": 5,
    "aspect_ratio": "16:9"
  }
}`
req, _ := http.NewRequest("POST", "https://api.apiframe.ai/v2/videos/generate",
    strings.NewReader(body))
req.Header.Set("X-API-Key", "afk_your_api_key_here")
req.Header.Set("Content-Type", "application/json")

resp, err := http.DefaultClient.Do(req)

Try it

POST/v2/videos/generateTry it

On this page