Kling Avatar V2 Standard Serverless API
Transforms images and audio into lifelike video avatars with synchronized lip movement.
~536.59s
~$2.948
1import requests
2import json
3
4url = "https://api.segmind.com/v1/kling-v2-standard-avatar"
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/input/74bce37e-151d-4923-a56f-b5f9ce6e5134-601140c8-73e5-4490-8911-e6c7d3dc0e70-infinite_talk_ip.webp",
12 "audio_url": "https://segmind-resources.s3.amazonaws.com/input/ce1dcce7-c5b1-4cf6-a42f-65bed682a44a-news-reading-small.mp3",
13 "prompt": "news reporter speaking"
14}
15
16response = requests.post(url, headers=headers, json=data)
17
18if response.status_code == 200:
19 result = response.json()
20 print(json.dumps(result, indent=2))
21else:
22 print(f"Error: {response.status_code}")
23 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/kling-v2-standard-avatar"
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/input/74bce37e-151d-4923-a56f-b5f9ce6e5134-601140c8-73e5-4490-8911-e6c7d3dc0e70-infinite_talk_ip.webp",
12 "audio_url": "https://segmind-resources.s3.amazonaws.com/input/ce1dcce7-c5b1-4cf6-a42f-65bed682a44a-news-reading-small.mp3",
13 "prompt": "news reporter speaking"
14}
15
16response = requests.post(url, headers=headers, json=data)
17
18if response.status_code == 200:
19 result = response.json()
20 print(json.dumps(result, indent=2))
21else:
22 print(f"Error: {response.status_code}")
23 print(response.text)API Endpoint
POST
https://api.segmind.com/v1/kling-v2-standard-avatarParameters
audio_urlrequiredstring (uri)URL for audio background; choose clear audio. Great for instructional or narrative content.
image_urlrequiredstring (uri)URL for video background; use high-res for quality. Ideal for both formal and vibrant settings.
promptoptionalstringDirection for content creation; specify tone and style. Useful for marketing or storytelling tasks.
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