Stable Video Diffusion
Takes image as input and returns a video.
~29.75s
~$0.167
1import requests
2import json
3
4url = "https://api.segmind.com/v1/svd"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "image": "https://segmind-sd-models.s3.amazonaws.com/outputs/svd_input.png",
12 "fps": 7,
13 "motion": 127,
14 "seed": 452361789,
15 "cond_aug": 0.1,
16 "frames": "14",
17 "resize_method": "maintain_aspect_ratio",
18 "base64": false
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/svd"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "image": "https://segmind-sd-models.s3.amazonaws.com/outputs/svd_input.png",
12 "fps": 7,
13 "motion": 127,
14 "seed": 452361789,
15 "cond_aug": 0.1,
16 "frames": "14",
17 "resize_method": "maintain_aspect_ratio",
18 "base64": false
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
POST
https://api.segmind.com/v1/svd
Parameters
image
requiredstring (uri)
Input Image.
base64
optionalboolean
Base64 encoding of the output video.
Default:
false
cond_aug
optionalnumber
noise added to the conditioning image
Default:
0.2
Range: 0 - 1fps
optionalinteger
Number of frames per second
Default:
7
Range: 1 - 60frames
optionalinteger
No of frames in output video
Default:
14
Allowed values :
14
25
motion
optionalinteger
to control the motion of the generated video
Default:
127
Range: 1 - 180resize_method
optionalstring
Decides the output video dimensions
Default:
"maintain_aspect_ratio"
Allowed values :
"maintain_aspect_ratio"
"crop_to_16_9"
seed
optionalinteger
Seed for video generation.
Default:
-1
Range: -1 - 999999999999999Response 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