Veo 3.1 Fast Serverless API

Transforms static images into dynamic 1080p videos with synchronized audio and natural motion.

~99.15s
$0.400 - $1.20 per generation
 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

POSThttps://api.segmind.com/v1/veo-3.1-fast

Parameters

promptrequired
string

Describe the video content. For abstract visuals, use 'Hypnotic fractal patterns'.

Default: "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_ratiooptional
string

Video's frame shape. Use '9:16' for vertical content.

Default: "16:9"
Allowed values :
"16:9""9:16"
durationoptional
integer

Length of video in seconds. Choose 4 for short intros.

Default: 8
Allowed values :
468
generate_audiooptional
boolean

Add sound to video. Set false for silent clips.

Default: true
imageoptional
string (uri)

Starting image for the video. For new designs, leave it empty.

Default: "https://segmind-resources.s3.amazonaws.com/input/b130a60c-8ee2-4962-b5be-b8b87ece92b7-691b7010-c304-4c07-a9b8-5e03f5e5435a.jpeg"
last_frameoptional
string (uri)

Ending image for smooth transitions. Leave empty for standalone videos.

Default: "https://segmind-resources.s3.amazonaws.com/input/0c6e38bc-ac47-4573-ace4-cf51c427962a-5af85fc2-bbbf-43ea-83b6-88cfd1e09374.jpeg"
negative_promptoptional
string

Exclude specific elements in video. Leave blank for freeform.

Default: null
resolutionoptional
string

Video clarity setting. Use '720p' for faster processing.

Default: "1080p"
Allowed values :
"720p""1080p"
seedoptional
integer

Sets randomness for generations. Use fixed seed for consistency.

Default: 42

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