luma/ray-flash-2/image-to-video
Ray Flash 2 by Luma - animate still images into dynamic videos with AI. Transform photos into cinematic clips with natural motion, camera movement, and optional audio generation.
PNG, JPEG, WebP, or GIF · 20 MiB maximum
PNG, JPEG, WebP, or GIF · 20 MiB maximum
Example output — click Run to generate your own
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
https://api.sandbase.ai/v1/runluma/ray-flash-2/image-to-videoInput Schema
6 parameters · 2 required · 4 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
image | string | Required | Initial image to start the video from. Can be used together with end_image_url. |
prompt | string | Required | Min length: 3 · Max length: 5000 |
duration | string | Optional | The duration of the generated video · Options: 5s, 9s · Default: "5s" 5s9s |
end_image | string | Optional | Final image to end the video with. Can be used together with image_url. |
resolution | string | Optional | The resolution of the generated video (720p costs 2x more, 1080p costs 4x more) · Options: 540p, 720p, 1080p · Default: "540p" 540p720p1080p |
aspect_ratio | string | Optional | The aspect ratio of the generated image. · Options: 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16 21:916:93:24:35:41:14:53:42:39:16 |
Output Schema
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the generation task |
status | string | Task status: pending, running, completed, failed, timeout |
model | string | Model used for the generation |
outputs | array | Array of output items |
outputs[].url | string | URL of the generated artifact |
outputs[].content_type | string | MIME type (e.g. image/png, video/mp4) |
error | object | null | Error details if failed, null on success |
error.type | string | Machine-readable error type code |
error.message | string | Human-readable error description |
Async Workflow
This model uses asynchronous execution. Submit a request and poll for the result.
- Submit — POST to /v1/run, receive an
id - Poll — GET /v1/run/{id} until status is
completed,failed, ortimeout - Retrieve — Read
outputsfrom the completed response
Code Examples
Ready-to-run snippets
# Step 1: Submit
curl -X POST https://api.sandbase.ai/v1/run \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "luma/ray-flash-2/image-to-video",
"image": "https://static.sandbase.ai/examples/luma/ray-flash-2/image-to-video/input_image_0.jpeg",
"prompt": "A stylish woman walks down a Tokyo street filled with warm glowing neon and animated city signage.",
"duration": "5s",
"resolution": "540p"
}'
# Step 2: Poll result (replace <id>)
curl https://api.sandbase.ai/v1/run/<id> \
-H "Authorization: Bearer YOUR_API_KEY"API README
Luma Ray Flash 2 Image to Video
Luma Ray Flash 2 Image to Video is a Luma route built for image-to-video generation. It turns a source image and motion direction into a moving sequence that develops the supplied frame, giving creators a focused endpoint instead of forcing one generic workflow across materially different production tasks. The route belongs to a family known for natural motion, strong prompt interpretation, and cinematic camera behavior, so it is best evaluated as a creative system for intentional shots and assets rather than as a one-click novelty generator.
Use this endpoint when the input contract and deliverable match that job exactly. Its documented controls include duration choices (5s, 9s); end_image (Final image to end the video with. Can be used together with image_url); resolution choices (540p, 720p, 1080p); aspect_ratio choices (21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16). Together, these controls help teams plan predictable iterations, compare outputs under stable settings, and connect generation to concept films, campaign visuals, and rapid shot exploration without hiding the operational choices that shape the result.
Highlights
- Luma Ray Flash 2 Image to Video: dedicated reference-frame animation. This exact route centers on reference-frame animation; it uses
prompt,imageto separate its job from neighboring endpoints in the same family. imagecontrol. Initial image to start the video from. Can be used together with end_image_url; this setting provides a concrete lever for route-specific output planning.durationcontrol. options5s,9s; use it to build controlled comparisons without changing the rest of the request.end_imagecontrol. Final image to end the video with. Can be used together with image_url; together with the other documented fields, it supports repeatable review of this model path.
Pricing
| Configuration | Price |
|---|---|
| Standard request | $0.200000 |
When to Use
| Scenario | Why this model fits |
|---|---|
| Create the exact route output | Choose it when you need image-to-video generation and already have a source image and motion direction. |
| Develop controlled variations | Keep the main brief fixed while changing one documented setting at a time to compare motion, framing, quality, or asset behavior. |
| Build repeatable batches | Use a consistent request shape for catalog, campaign, storyboard, game-asset, or social-content production. |
| Preserve source intent | Prefer this route when the supplied reference material must remain the foundation of a moving sequence that develops the supplied frame. |
| Connect a media pipeline | Use asynchronous results in an automated review, approval, post-production, or asset-management workflow. |
Prompt Guide
Start with the desired result, then describe the source relationship, subject action, composition or camera behavior, lighting, style, and timing. For image-to-video generation, state what must remain stable as clearly as what should change. Use only fields exposed by the schema; the example below is structurally valid for this route.
{
"prompt": "A stylish woman walks down a Tokyo street filled with warm glowing neon and animated city signage.",
"image": "https://static.sandbase.ai/examples/luma/ray-flash-2/image-to-video/input_image_0.jpeg",
"duration": "5s",
"end_image": "https://example.com/reference.jpg",
"resolution": "540p"
}
Technical Specs
| Specification | Value |
|---|---|
| Model ID | luma/ray-flash-2/image-to-video |
| Workflow | Image-to-video generation |
| Required inputs | prompt, image |
image | string |
prompt | string |
duration | string; options: 5s, 9s |
end_image | string |
resolution | string; options: 540p, 720p, 1080p |
aspect_ratio | string; options: 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16 |

