POST
javascript
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 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-1.6-image2video"; const data = { "image": "toB64('https://segmind-sd-models.s3.us-east-1.amazonaws.com/display_images/kling-1.6-i2v-ip.png')", "prompt": "group of people talking to each other in an office setting", "negative_prompt": "No sudden movements, no fast zooms.", "cfg_scale": 0.5, "mode": "pro", "duration": 5 }; (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); } })();
RESPONSE
image/jpeg
HTTP Response Codes
200 - OKImage Generated
401 - UnauthorizedUser authentication failed
404 - Not FoundThe requested URL does not exist
405 - Method Not AllowedThe requested HTTP method is not allowed
406 - Not AcceptableNot enough credits
500 - Server ErrorServer had some issue with processing

Attributes


imageimage *

URL of the input image to be animated


promptstr ( default: group of people talking to each other in an office setting )

Text prompt to describe the desired animation effect


negative_promptstr ( default: No sudden movements, no fast zooms. )

Description of unwanted animation effects


cfg_scalefloat ( default: 0.5 )

CFG scale to control how closely the animation matches the prompt (range 0-1)

min : 0,

max : 1


modeenum:str ( default: pro )

Mode of generation

Allowed values:


durationenum:str ( default: 5 )

Duration of the animation in seconds

Allowed values:

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 1.6 Image to Video

Kling 1.6 Image-to-Video significantly enhances its image-to-video generation capabilities. This new version boasts remarkable enhancements over its predecessor, Kling 1.5, making it a standout tool for content creators looking to transform static images into dynamic video content.

Key Features Kling 1.6 Image to Video

Enhanced Prompt Adherence

Kling AI 1.6 introduces improved understanding and translation of user prompts into video outputs. This means that whether users provide complex narratives or simple visual concepts, the model can render them with greater precision and detail compared to version 1.5. The upgrade ensures that the generated videos are more consistent and vibrant, enhancing the overall visual appeal.

Dual Operating Modes

The new model features two distinct modes: Standard Mode for beginners and Professional Mode for advanced users. This dual approach caters to a wider audience, allowing novices to easily create high-quality videos while offering experienced users advanced customization options for more control over their projects

Improved Visual Aesthetics

Kling AI 1.6 significantly enhances the visual quality of generated videos. Users can expect sharper details, enhanced color palettes, and more natural scenes, resulting in captivating visuals that stand out in any context35. This improvement not only makes the videos more attractive but also boosts their overall quality.

Semantic Understanding and Scene Comprehension

Kling 1.6 demonstrates a refined ability to comprehend intricate scenes and continuous actions, making it a powerful tool for creators looking to produce detailed video content that accurately reflects their vision.

Faster Rendering Speeds

With significantly faster rendering times compared to Kling 1.5, users can generate high-quality videos more efficiently. This speed is crucial for content creators who need to produce large volumes of work quickly without compromising on quality.

Use cases of Kling 1.6 Image to Video

  1. Content Creation for Social Media:Kling 1.6 can be utilized by content creators to transform static images into engaging videos for platforms like Instagram, TikTok, and YouTube. With its enhanced prompt adherence and superior visual quality, users can create eye-catching promotional videos or storytelling clips that resonate with their audience. The model's ability to generate videos up to two minutes long allows for detailed narratives, making it ideal for tutorials, product showcases, or artistic presentations.

  2. Marketing and Advertising Campaigns: Kling 1.6 empowers businesses to create high-quality promotional videos tailored to their marketing strategies. With its cinematic video output and customizable features, marketers can design eye-catching advertisements that grab attention and boost engagement. The model's capacity for dynamic animations and realistic movements allows brands to communicate their messages more effectively, significantly enhancing the impact of their campaigns.

  3. Educational Content Development: Educators can harness Kling 1.6 to produce engaging educational videos that improve the learning experience. By transforming images related to various subjects into animated content, instructors can simplify complex ideas for better understanding. The model’s ability to replicate realistic movements and physics makes the resulting videos both informative and captivating, ideal for online courses, workshops, and other instructional formats.