1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
const axios = require('axios');
const fs = require('fs');
const path = require('path');
async function toB64(imgPath) {
const data = fs.readFileSync(path.resolve(imgPath));
return Buffer.from(data).toString('base64');
}
const api_key = "YOUR API-KEY";
const url = "https://api.segmind.com/v1/kling-3-standard-image2video";
const data = {
"start_image_url": "toB64('https://segmind-resources.s3.amazonaws.com/input/65a44af9-de76-474e-898f-57e83b0ff3b3-a-photograph-of-a-giant-panda-swimming-i_k_2X05UAQYWIOoZJLuVpyg_eFEiq19KSYO9FzXR4tdibQ.jpeg')",
"prompt": "A vivid scene of a panda gliding through clear waters surrounded by vibrant greenery.",
"negative_prompt": "blur, distort, low quality",
"end_image_url": "toB64('')",
"duration": 5,
"aspect_ratio": "16:9",
"cfg_scale": 0.5,
"generate_audio": false
};
(async function() {
try {
const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } });
console.log(response.data);
} catch (error) {
console.error('Error:', error.response.data);
}
})();Initial frame for video rendering. 50MB Max.
Describes video motion. Use dramatic language for action scenes.
Excludes unwanted elements. Common choices are low quality and distort.
Defines the final scene. Use for controlled transitions.
Sets video length. Longer videos for narratives.
Allowed values:
Defines video shape. Widescreen for landscapes, square for social media.
Allowed values:
Controls adherence to prompt. Use 0.7 for moderate adherence.
min : 0,
max : 1
Enables synchronized audio. Useful for immersive content.
To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.
Kling 3.0 is a generative AI video model that turns a starting image into a cinematic 1080p video with controllable motion and optional native, synchronized audio. It’s designed for creators and developers who want reliable image-to-video results—smooth camera movement, consistent subjects, and polished, film-like output—exposed through a developer-friendly API workflow.
On Segmind, this endpoint focuses on image-conditioned video generation: you provide a start_image_url (required), optionally guide motion and scene dynamics with a prompt, and fine-tune adherence, duration, aspect ratio, and audio generation.
start_image_urlgenerate_audio for immersive clipsend_image_url for directed transitions (advanced)cfg_scale (advanced)start_image_url to reduce flicker.duration (3–15s) for pacing: shorter for loops, longer for narrative movement.aspect_ratio (16:9, 9:16, 1:1).cfg_scale (0–1). Mid values often balance realism and control.negative_prompt like “blur, distort, low quality” to avoid common artifacts.end_image_url to steer the ending frame and produce cleaner transitions.Does Kling 3.0 support text-to-video?
Kling 3.0 supports multiple modes broadly, but this Segmind interface is image-to-video with a required start_image_url.
How do I generate video with audio?
Set generate_audio: true to request synchronized audio.
What parameters matter most for quality?
Start with a strong start_image_url, then tune prompt, duration, cfg_scale, and negative_prompt.
How is Kling 3.0 different from other AI video models?
It’s optimized for cinematic motion, visual consistency, and native audio, with practical controls for structured outputs.
How do I control the final scene?
Provide an end_image_url to guide the last frame and improve transition stability.