Kling Hug
Create heartwarming videos instantly with Kling hug effect! Generate tender embracing animations.
~206.74s
$0.560 - $1.96 per generation
 1import requests
 2import json
 3
 4url = "https://api.segmind.com/v1/kling-hug"
 5headers = {
 6    "x-api-key": "YOUR_API_KEY",
 7    "Content-Type": "application/json"
 8}
 9
10data = {
11    "first_reference_image": "https://segmind-resources.s3.amazonaws.com/output/60bad6a3-c59a-4dce-a17e-f8dc92297708-ComfyUI_temp_itxei_00003_.png",
12    "second_reference_image": "https://segmind-resources.s3.amazonaws.com/output/2fdabc7d-24f6-4836-8a09-df3f99f15d1a-ComfyUI_temp_itxei_00002_.png",
13    "mode": "pro",
14    "duration": "5"
15}
16
17response = requests.post(url, headers=headers, json=data)
18
19if response.status_code == 200:
20    result = response.json()
21    print(json.dumps(result, indent=2))
22else:
23    print(f"Error: {response.status_code}")
24    print(response.text) 1import requests
 2import json
 3
 4url = "https://api.segmind.com/v1/kling-hug"
 5headers = {
 6    "x-api-key": "YOUR_API_KEY",
 7    "Content-Type": "application/json"
 8}
 9
10data = {
11    "first_reference_image": "https://segmind-resources.s3.amazonaws.com/output/60bad6a3-c59a-4dce-a17e-f8dc92297708-ComfyUI_temp_itxei_00003_.png",
12    "second_reference_image": "https://segmind-resources.s3.amazonaws.com/output/2fdabc7d-24f6-4836-8a09-df3f99f15d1a-ComfyUI_temp_itxei_00002_.png",
13    "mode": "pro",
14    "duration": "5"
15}
16
17response = requests.post(url, headers=headers, json=data)
18
19if response.status_code == 200:
20    result = response.json()
21    print(json.dumps(result, indent=2))
22else:
23    print(f"Error: {response.status_code}")
24    print(response.text)API Endpoint
POST
https://api.segmind.com/v1/kling-hugParameters
first_reference_imagerequiredstring (uri)First Reference Image
second_reference_imagerequiredstring (uri)Second Reference Image
durationoptionalintegerDuration of the animation in seconds
Default: 
5Allowed values :
510modeoptionalstringMode of generation
Default: 
"pro"Allowed values :
"std""pro"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