Kling 2.6 Pro Motion Control Serverless API
Transform static images into lifelike animations by extracting motion from videos with precision and ease.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/kling-2.6-pro-motion-control"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "image_url": "https://segmind-resources.s3.amazonaws.com/output/2338b9ec-1a31-4128-887a-90766c04e26d-STYLE2.png",
12 "video_url": "https://segmind-resources.s3.amazonaws.com/output/3547991b-5ae0-4d45-8476-490451e84480-kling-motion-transfer-ip.mp4",
13 "prompt": "woman dancing.",
14 "keep_original_sound": true,
15 "character_orientation": "video"
16}
17
18response = requests.post(url, headers=headers, json=data)
19
20if response.status_code == 200:
21 result = response.json()
22 print(json.dumps(result, indent=2))
23else:
24 print(f"Error: {response.status_code}")
25 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/kling-2.6-pro-motion-control"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "image_url": "https://segmind-resources.s3.amazonaws.com/output/2338b9ec-1a31-4128-887a-90766c04e26d-STYLE2.png",
12 "video_url": "https://segmind-resources.s3.amazonaws.com/output/3547991b-5ae0-4d45-8476-490451e84480-kling-motion-transfer-ip.mp4",
13 "prompt": "woman dancing.",
14 "keep_original_sound": true,
15 "character_orientation": "video"
16}
17
18response = requests.post(url, headers=headers, json=data)
19
20if response.status_code == 200:
21 result = response.json()
22 print(json.dumps(result, indent=2))
23else:
24 print(f"Error: {response.status_code}")
25 print(response.text)API Endpoint
https://api.segmind.com/v1/kling-2.6-pro-motion-controlParameters
promptrequiredstringSpecify desired video effects. Try 'dramatic time-lapse' for unique visuals.
character_orientationoptionalstringSet the character's facing direction. Use 'video' for dynamic scenes and 'image' for static ones.
"video""video""image"image_urloptionalstring (uri)Provide an image for visual elements. Use a high-quality character image for best results.
keep_original_soundoptionalbooleanDecide to retain the original video sound. Choose true for authentic ambiance.
truevideo_urloptionalstring (uri)Provide a video to guide character actions. Opt for an action-filled video for dynamic scenes.
Response 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