POST
javascript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 const axios = require('axios'); const fs = require('fs'); const path = require('path'); async function toB64(imgPath) { const data = fs.readFileSync(path.resolve(imgPath)); return Buffer.from(data).toString('base64'); } const api_key = "YOUR API-KEY"; const url = "https://api.segmind.com/v1/luma-ray-3-2"; const data = { "prompt": "The woman's flowing red dress and long hair billow dramatically in the strong sea breeze, turquoise ocean waves surge and crash into white foam against the rocks below, seabirds glide gracefully across the glowing golden-hour sky, soft clouds drift slowly, gentle cinematic camera push-in, smooth fluid natural motion, photorealistic, ultra detailed", "start_frame": "toB64('https://segmind-resources.s3.amazonaws.com/input/luma-ray-3-2-img-2-video-start-frame.jpg')", "end_frame": "toB64('undefined')", "resolution": "720p", "duration": "5s", "aspect_ratio": "16:9" }; (async function() { try { const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } }); console.log(response.data); } catch (error) { console.error('Error:', error.response.data); } })();
RESPONSE
image/jpeg
HTTP Response Codes
200 - OKImage Generated
401 - UnauthorizedUser authentication failed
404 - Not FoundThe requested URL does not exist
405 - Method Not AllowedThe requested HTTP method is not allowed
406 - Not AcceptableNot enough credits
500 - Server ErrorServer had some issue with processing

Attributes


promptstr *

Required text describing scene, subject, motion and camera. Be specific about action and style.


start_frameimage ( default: https://segmind-resources.s3.amazonaws.com/input/luma-ray-3-2-img-2-video-start-frame.jpg )

Optional image URL used as the first frame for image-to-video. Omit for pure text-to-video.


end_frameimage ( default: 1 )

Optional image URL for the final keyframe. Pair with start_frame for guided transitions.


resolutionenum:str ( default: 720p ) Affects Pricing

Output resolution: 360p, 540p, 720p or 1080p. Use 720p for balance, 1080p for hero shots.

Allowed values:


durationenum:str ( default: 5s ) Affects Pricing

Clip length, either 5s or 10s. Use 5s for quick tests, 10s for storytelling.

Allowed values:


aspect_ratioenum:str ( default: 16:9 )

Frame shape such as 16:9, 9:16 or 1:1. Use 16:9 cinematic, 9:16 vertical social.

Allowed values:

To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.

Luma Ray 3.2 — AI Video Generation (Text-to-Video & Image-to-Video)

What is Luma Ray 3.2?

Luma Ray 3.2 is Luma AI's production-grade video generation model, available on Segmind as a single endpoint for both text-to-video and image-to-video. Provide a prompt to generate a clip from scratch, or supply a start frame to animate an existing image. Ray 3.2 builds on Luma's reasoning-driven Ray 3 line, which plans a scene and evaluates its own output to improve realism, physics, instruction following, and shot-to-shot consistency. The result is cinematic, high-fidelity motion that holds together across the clip rather than drifting frame to frame.

On Segmind you control the prompt, an optional start and end frame, resolution (360p, 540p, 720p, 1080p), duration (5s or 10s), and aspect ratio (16:9, 9:16, 1:1, 21:9, 4:3, 3:4). Output is a ready-to-use MP4.

Key Features

  • Unified text-to-video and image-to-video in one API call.
  • Start frame and end frame inputs for keyframe-guided motion and clean transitions.
  • Resolution up to 1080p and durations of 5 or 10 seconds.
  • Six aspect ratios covering cinematic widescreen and vertical social formats.
  • Reasoning-driven generation for strong prompt adherence, stable physics, and consistent subjects.

Best Use Cases

Ray 3.2 fits cinematic b-roll, product and brand spots, social reels, music-video moments, and animatics or previz. In our testing, an image-to-video run from a single coastal portrait produced a photorealistic clip with wind-blown hair and fabric, crashing surf, gliding seabirds, and a smooth camera push-in. That makes it well suited to bringing still concept art, photography, or product shots to life, and to generating establishing shots and mood pieces directly from a written brief.

Prompt Tips and Output Quality

Treat the prompt like a shot description: name the subject, the action, the lighting, and the camera move (push-in, pan, aerial). Explicit motion cues produce the most dynamic results. Use a start frame when you want to anchor composition and identity, and add an end frame to guide a specific transition. Choose 720p for fast, high-quality iterations and 1080p for hero shots; pick 10s when a scene needs room to breathe. Outputs are clean, artifact-free 24fps MP4 clips.

FAQs

Does Luma Ray 3.2 support image-to-video?

Yes. Add a start frame image URL to animate a still; omit it for pure text-to-video.

What resolutions and durations are available?

360p, 540p, 720p, and 1080p, at 5 or 10 seconds per clip.

What aspect ratios can I generate?

16:9, 9:16, 1:1, 21:9, 4:3, and 3:4, covering widescreen and vertical delivery.

How is Ray 3.2 different from earlier Ray models?

It adds reasoning-driven generation, stronger instruction following, sharper detail, and more stable motion and identity over the clip.

What format is the output?

A standard MP4 video you can drop straight into an editor or pipeline.

How do I get the best image-to-video results?

Use a clean, well-composed start frame and describe the motion you want explicitly in the prompt.