Veo 3.1 Fast Serverless API
Transforms static images into dynamic 1080p videos with synchronized audio and natural motion.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/veo-3.1-fast"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "seed": 42,
12 "image": "https://segmind-resources.s3.amazonaws.com/input/b130a60c-8ee2-4962-b5be-b8b87ece92b7-691b7010-c304-4c07-a9b8-5e03f5e5435a.jpeg",
13 "prompt": "A hands-on workshop where participants are learning about Veo 3.1 Fast, presenter guiding them on laptops and tablets, modern classroom setup with projectors displaying reference images transforming into videos",
14 "duration": 8,
15 "last_frame": "https://segmind-resources.s3.amazonaws.com/input/0c6e38bc-ac47-4573-ace4-cf51c427962a-5af85fc2-bbbf-43ea-83b6-88cfd1e09374.jpeg",
16 "resolution": "1080p",
17 "aspect_ratio": "16:9",
18 "generate_audio": true
19}
20
21response = requests.post(url, headers=headers, json=data)
22
23if response.status_code == 200:
24 result = response.json()
25 print(json.dumps(result, indent=2))
26else:
27 print(f"Error: {response.status_code}")
28 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/veo-3.1-fast"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "seed": 42,
12 "image": "https://segmind-resources.s3.amazonaws.com/input/b130a60c-8ee2-4962-b5be-b8b87ece92b7-691b7010-c304-4c07-a9b8-5e03f5e5435a.jpeg",
13 "prompt": "A hands-on workshop where participants are learning about Veo 3.1 Fast, presenter guiding them on laptops and tablets, modern classroom setup with projectors displaying reference images transforming into videos",
14 "duration": 8,
15 "last_frame": "https://segmind-resources.s3.amazonaws.com/input/0c6e38bc-ac47-4573-ace4-cf51c427962a-5af85fc2-bbbf-43ea-83b6-88cfd1e09374.jpeg",
16 "resolution": "1080p",
17 "aspect_ratio": "16:9",
18 "generate_audio": true
19}
20
21response = requests.post(url, headers=headers, json=data)
22
23if response.status_code == 200:
24 result = response.json()
25 print(json.dumps(result, indent=2))
26else:
27 print(f"Error: {response.status_code}")
28 print(response.text)API Endpoint
https://api.segmind.com/v1/veo-3.1-fastParameters
promptrequiredstringDescribe the video content. For abstract visuals, use 'Hypnotic fractal patterns'.
"A hands-on workshop where participants are learning about Veo 3.1 Fast, presenter guiding them on laptops and tablets, modern classroom setup with projectors displaying reference images transforming into videos"aspect_ratiooptionalstringVideo's frame shape. Use '9:16' for vertical content.
"16:9""16:9""9:16"durationoptionalintegerLength of video in seconds. Choose 4 for short intros.
8468generate_audiooptionalbooleanAdd sound to video. Set false for silent clips.
trueimageoptionalstring (uri)Starting image for the video. For new designs, leave it empty.
"https://segmind-resources.s3.amazonaws.com/input/b130a60c-8ee2-4962-b5be-b8b87ece92b7-691b7010-c304-4c07-a9b8-5e03f5e5435a.jpeg"last_frameoptionalstring (uri)Ending image for smooth transitions. Leave empty for standalone videos.
"https://segmind-resources.s3.amazonaws.com/input/0c6e38bc-ac47-4573-ace4-cf51c427962a-5af85fc2-bbbf-43ea-83b6-88cfd1e09374.jpeg"negative_promptoptionalstringExclude specific elements in video. Leave blank for freeform.
nullresolutionoptionalstringVideo clarity setting. Use '720p' for faster processing.
"1080p""720p""1080p"seedoptionalintegerSets randomness for generations. Use fixed seed for consistency.
42Response 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