Kling 2.6 Pro Motion Control Serverless API

Transform static images into lifelike animations by extracting motion from videos with precision and ease.

~596.73s
~$1.74
 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

POSThttps://api.segmind.com/v1/kling-2.6-pro-motion-control

Parameters

promptrequired
string

Specify desired video effects. Try 'dramatic time-lapse' for unique visuals.

character_orientationoptional
string

Set the character's facing direction. Use 'video' for dynamic scenes and 'image' for static ones.

Default: "video"
Allowed values :
"video""image"
image_urloptional
string (uri)

Provide an image for visual elements. Use a high-quality character image for best results.

keep_original_soundoptional
boolean

Decide to retain the original video sound. Choose true for authentic ambiance.

Default: true
video_urloptional
string (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.

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