Motion Control SVD Serverless API
Motion Control SVD is an innovative deep learning framework that breathes life into static images. By intelligently managing both camera and object motion, it empowers creators to achieve precise animation effects.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/motionctrl-svd"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "input_image": "https://segmind-sd-models.s3.amazonaws.com/display_images/motion-control-svd/motionctrl_ip.png",
12 "fps": 7,
13 "motion": "CW",
14 "motion_bucket_id": 127,
15 "cond_aug": 0.02,
16 "seed": 985445,
17 "decoding_t": 1,
18 "maintain_aspect_ratio": true,
19 "motion_speed": 1,
20 "base64": false
21}
22
23response = requests.post(url, headers=headers, json=data)
24
25if response.status_code == 200:
26 result = response.json()
27 print(json.dumps(result, indent=2))
28else:
29 print(f"Error: {response.status_code}")
30 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/motionctrl-svd"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "input_image": "https://segmind-sd-models.s3.amazonaws.com/display_images/motion-control-svd/motionctrl_ip.png",
12 "fps": 7,
13 "motion": "CW",
14 "motion_bucket_id": 127,
15 "cond_aug": 0.02,
16 "seed": 985445,
17 "decoding_t": 1,
18 "maintain_aspect_ratio": true,
19 "motion_speed": 1,
20 "base64": false
21}
22
23response = requests.post(url, headers=headers, json=data)
24
25if response.status_code == 200:
26 result = response.json()
27 print(json.dumps(result, indent=2))
28else:
29 print(f"Error: {response.status_code}")
30 print(response.text)API Endpoint
https://api.segmind.com/v1/motionctrl-svdParameters
cond_augrequirednumberConditional augmentation
0.02Range: 0 - 1fpsrequiredintegerFrames per second for the video
7Range: 5 - 30input_imagerequiredstring (uri)Input image
"https://segmind-sd-models.s3.amazonaws.com/display_images/motion-control-svd/motionctrl_ip.png"motionrequiredstringMotion type
"CW""Pan Up""Pan Down""Pan Right""Pan Left""Zoom In""Zoom Out""CW""ACW"motion_bucket_idrequiredintegerMotion bucket ID
127Range: 127 - 255base64optionalbooleanBase64 encoding of the output image.
falsedecoding_toptionalintegerDecoding time
1maintain_aspect_ratiooptionalbooleanMaintain aspect ratio
truemotion_speedoptionalnumberSpeed of the motion
1Range: 0 - 10seedoptionalintegerSeed for random number generation
985445Response 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