Kling O3 Image To Video

Kling O3 transforms static images into cinematic videos with precise motion control, multi-segment prompts, and optional synchronized audio.

~251.86s
$0.630 - $5.25 per generation
 1import requests
 2import json
 3
 4url = "https://api.segmind.com/v1/kling-o3-image2video"
 5headers = {
 6    "x-api-key": "YOUR_API_KEY",
 7    "Content-Type": "application/json"
 8}
 9
10data = {
11    "prompt": "The mountain slowly comes alive as clouds drift past the summit, gentle wind blows through the peaks, cinematic motion, breathtaking",
12    "image_url": "https://segmind-resources.s3.amazonaws.com/input/kling-o3-i2v-input.png",
13    "duration": "5",
14    "mode": "pro",
15    "generate_audio": false,
16    "shot_type": "customize"
17}
18
19response = requests.post(url, headers=headers, json=data)
20
21if response.status_code == 200:
22    result = response.json()
23    print(json.dumps(result, indent=2))
24else:
25    print(f"Error: {response.status_code}")
26    print(response.text)

API Endpoint

POSThttps://api.segmind.com/v1/kling-o3-image2video

Parameters

image_urlrequired
string (uri)

The starting image to animate. This will be the first frame.

promptrequired
string

Describe the motion and animation to create from the image.

durationoptional
string

Length of the output video in seconds.

Default: "5"
Allowed values (13 total):
"3""4""5""6""7""8""9""10""11""12"+3 more
end_image_urloptional
string (uri)

The ending image. Animation will transition from start to end.

generate_audiooptional
boolean

Enable to generate synchronized audio with the video.

Default: false
modeoptional
string

Select quality mode. Standard for faster generation, Pro for higher quality.

Default: "pro"
Allowed values :
Standard"std"
Pro"pro"
multi_promptoptional
object[]

Array of prompts with durations for multi-segment video.

Array items:
promptoptional
string

Prompt for this segment.

durationoptional
string

Duration for this segment in seconds.

shot_typeoptional
string

Camera shot type for the video.

Default: "customize"

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