Luma Ray flash 2 (720p)

Generate stunning 720p videos from text with the Luma ray-flash-2-720p model. Faster & cheaper than Ray 2, offering realistic motion & detail.

~63.62s
$0.375 - $0.675 per generation
 1import requests
 2import json
 3
 4url = "https://api.segmind.com/v1/ray-flash-2-720p"
 5headers = {
 6    "x-api-key": "YOUR_API_KEY",
 7    "Content-Type": "application/json"
 8}
 9
10data = {
11    "loop": false,
12    "prompt": "a young boy riding a red bicycle in grand canyon valleys",
13    "duration": "5",
14    "aspect_ratio": "16:9"
15}
16
17response = requests.post(url, headers=headers, json=data)
18
19if response.status_code == 200:
20    result = response.json()
21    print(json.dumps(result, indent=2))
22else:
23    print(f"Error: {response.status_code}")
24    print(response.text)

API Endpoint

POSThttps://api.segmind.com/v1/ray-flash-2-720p

Parameters

promptrequired
string

Text prompt for video generation

Default: "a young boy riding a red bicycle in grand canyon valleys"
aspect_ratiooptional
string

Aspect ratio of the video.

Default: "16:9"
Allowed values :
"1:1""3:4""4:3""9:16""16:9""9:21""21:9"
durationoptional
integer

Duration of the output.

Default: 5
Allowed values :
59
end_image_urloptional
string (uri)

URL of an image to use as the ending frame

Default: null
loopoptional
boolean

Whether the video should loop, with the last frame matching the first frame for smooth, continuous playback.

Default: false
start_image_urloptional
string (uri)

URL of an image to use as the starting frame

Default: null

Response Type

Returns: Video

Common Error Codes

The API returns standard HTTP status codes. Detailed error messages are provided in the response body.

400

Bad Request

Invalid parameters or request format

401

Unauthorized

Missing or invalid API key

403

Forbidden

Insufficient permissions

404

Not Found

Model or endpoint not found

406

Insufficient Credits

Not enough credits to process request

429

Rate Limited

Too many requests

500

Server Error

Internal server error

502

Bad Gateway

Service temporarily unavailable

504

Timeout

Request timed out