Veo 3.1 Serverless API
Static images into high-quality videos with synchronized audio.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/veo-3.1"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "A woman is giving a keynote presentation at a tech conference, wearing a sleek white blazer with the Veo 3.1 logo subtly embroidered, highlighted by ambient blue stage lighting. She is on a modern conference stage with geometric patterns and LED screens behind her, discussing how Veo 3.1 can integrate reference images to enhance AI-generated video content. The Veo 3.1 logo is also displayed prominently on a large digital screen behind her",
12 "duration": 8,
13 "resolution": "1080p",
14 "aspect_ratio": "16:9",
15 "generate_audio": true,
16 "negative_prompt": "no black and white, no sharp angles"
17}
18
19response = requests.post(url, headers=headers, json=data)
20
21if response.status_code == 200:
22 result = response.json()
23 print(json.dumps(result, indent=2))
24else:
25 print(f"Error: {response.status_code}")
26 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/veo-3.1"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "A woman is giving a keynote presentation at a tech conference, wearing a sleek white blazer with the Veo 3.1 logo subtly embroidered, highlighted by ambient blue stage lighting. She is on a modern conference stage with geometric patterns and LED screens behind her, discussing how Veo 3.1 can integrate reference images to enhance AI-generated video content. The Veo 3.1 logo is also displayed prominently on a large digital screen behind her",
12 "duration": 8,
13 "resolution": "1080p",
14 "aspect_ratio": "16:9",
15 "generate_audio": true,
16 "negative_prompt": "no black and white, no sharp angles"
17}
18
19response = requests.post(url, headers=headers, json=data)
20
21if response.status_code == 200:
22 result = response.json()
23 print(json.dumps(result, indent=2))
24else:
25 print(f"Error: {response.status_code}")
26 print(response.text)API Endpoint
https://api.segmind.com/v1/veo-3.1Parameters
promptrequiredstringDescribe the video content. Use clear, concise language for best results.
"A woman is giving a keynote presentation at a tech conference, wearing a sleek white blazer with the Veo 3.1 logo subtly embroidered, highlighted by ambient blue stage lighting. She is on a modern conference stage with geometric patterns and LED screens behind her, discussing how Veo 3.1 can integrate reference images to enhance AI-generated video content. The Veo 3.1 logo is also displayed prominently on a large digital screen behind her"aspect_ratiooptionalstringChoose aspect ratio: 16:9 for landscape, 9:16 for portrait mode.
"16:9""16:9""9:16"durationoptionalintegerChoose the video length: short is 4s, medium 6s, long 8s.
8468generate_audiooptionalbooleanEnable audio generation. Recommended for videos requiring sound.
trueimageoptionalstring (uri)Start generation from this image. Ideal for specific starting visuals.
nulllast_frameoptionalstring (uri)End video with this image. Useful for specific concluding visuals.
nullnegative_promptoptionalstringExclude elements from video. Useful for refining details.
"no black and white, no sharp angles"reference_imagesoptionalstring[]Use reference images for consistency. Essential for maintaining subject style.
resolutionoptionalstringSet video quality: 720p for standard, 1080p for high resolution.
"1080p""720p""1080p"seedoptionalintegerSets a random seed for consistency. Useful for repeated generations.
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