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.
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) 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
https://api.segmind.com/v1/ray-flash-2-720pParameters
promptrequiredstringText prompt for video generation
"a young boy riding a red bicycle in grand canyon valleys"aspect_ratiooptionalstringAspect ratio of the video.
"16:9""1:1""3:4""4:3""9:16""16:9""9:21""21:9"durationoptionalintegerDuration of the output.
559end_image_urloptionalstring (uri)URL of an image to use as the ending frame
nullloopoptionalbooleanWhether the video should loop, with the last frame matching the first frame for smooth, continuous playback.
falsestart_image_urloptionalstring (uri)URL of an image to use as the starting frame
nullResponse Type
Returns: Video
Common Error Codes
The API returns standard HTTP status codes. Detailed error messages are provided in the response body.
Bad Request
Invalid parameters or request format
Unauthorized
Missing or invalid API key
Forbidden
Insufficient permissions
Not Found
Model or endpoint not found
Insufficient Credits
Not enough credits to process request
Rate Limited
Too many requests
Server Error
Internal server error
Bad Gateway
Service temporarily unavailable
Timeout
Request timed out