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.

~62.74s
~$0.089
 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

POSThttps://api.segmind.com/v1/motionctrl-svd

Parameters

cond_augrequired
number

Conditional augmentation

Default: 0.02Range: 0 - 1
fpsrequired
integer

Frames per second for the video

Default: 7Range: 5 - 30
input_imagerequired
string (uri)

Input image

Default: "https://segmind-sd-models.s3.amazonaws.com/display_images/motion-control-svd/motionctrl_ip.png"
motionrequired
string

Motion type

Default: "CW"
Allowed values :
"Pan Up""Pan Down""Pan Right""Pan Left""Zoom In""Zoom Out""CW""ACW"
motion_bucket_idrequired
integer

Motion bucket ID

Default: 127Range: 127 - 255
base64optional
boolean

Base64 encoding of the output image.

Default: false
decoding_toptional
integer

Decoding time

Default: 1
maintain_aspect_ratiooptional
boolean

Maintain aspect ratio

Default: true
motion_speedoptional
number

Speed of the motion

Default: 1Range: 0 - 10
seedoptional
integer

Seed for random number generation

Default: 985445

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