Kling O3 Video To Video Reference
Transform any video with AI — swap characters, change styles, and edit scenes using reference images and natural language prompts.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/kling-o3-video2video-reference"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "Transform the scene into a magical winter wonderland with snow falling, frosted trees, and a dreamy cinematic atmosphere",
12 "video_url": "https://segmind-resources.s3.amazonaws.com/input/kling-o3-v2v-input-video.mp4",
13 "mode": "pro",
14 "duration": "5",
15 "aspect_ratio": "16:9",
16 "keep_audio": false,
17 "shot_type": "customize"
18}
19
20response = requests.post(url, headers=headers, json=data)
21
22if response.status_code == 200:
23 result = response.json()
24 print(json.dumps(result, indent=2))
25else:
26 print(f"Error: {response.status_code}")
27 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/kling-o3-video2video-reference"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "Transform the scene into a magical winter wonderland with snow falling, frosted trees, and a dreamy cinematic atmosphere",
12 "video_url": "https://segmind-resources.s3.amazonaws.com/input/kling-o3-v2v-input-video.mp4",
13 "mode": "pro",
14 "duration": "5",
15 "aspect_ratio": "16:9",
16 "keep_audio": false,
17 "shot_type": "customize"
18}
19
20response = requests.post(url, headers=headers, json=data)
21
22if response.status_code == 200:
23 result = response.json()
24 print(json.dumps(result, indent=2))
25else:
26 print(f"Error: {response.status_code}")
27 print(response.text)API Endpoint
https://api.segmind.com/v1/kling-o3-video2video-referenceParameters
promptrequiredstringDescribe the transformation. Use @Element1, @Element2 for elements and @Image1, @Image2 for reference images.
video_urlrequiredstring (uri)Input video to transform. Width must be 720-2160px.
aspect_ratiooptionalstringSet the aspect ratio for the output video.
"16:9""16:9""9:16""1:1"durationoptionalstringLength of the output video in seconds.
"5""3""4""5""6""7""8""9""10""11""12"+3 moreelementsoptionalobject[]Character/object elements to include. Reference in prompt with parentheses like (element1). Max 10 elements.
frontal_image_urloptionalstring (uri)Frontal view image of the character or object.
reference_image_urlsoptionalstring[]Up to 3 reference images for this element.
image_urlsoptionalstring[]Reference image URLs for style or scene guidance. Reference in prompt as @Image1, @Image2.
keep_audiooptionalbooleanKeep original audio from the input video.
truemodeoptionalstringSelect quality mode. Standard for faster generation, Pro for higher quality.
"pro""std""pro"shot_typeoptionalstringCamera shot type for the video.
"customize"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