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 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); } })();
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


start_image_urlimage *

Initial frame for video rendering. 50MB Max.


promptstr ( default: A vivid scene of a panda gliding through clear waters surrounded by vibrant greenery. )

Describes video motion. Use dramatic language for action scenes.


negative_promptstr ( default: blur, distort, low quality )

Excludes unwanted elements. Common choices are low quality and distort.


end_image_urlimage ( default: 1 )

Defines the final scene. Use for controlled transitions.


durationenum:str ( default: 5 )

Sets video length. Longer videos for narratives.

Allowed values:


aspect_ratioenum:str ( default: 16:9 )

Defines video shape. Widescreen for landscapes, square for social media.

Allowed values:


cfg_scalefloat ( default: 0.5 )

Controls adherence to prompt. Use 0.7 for moderate adherence.

min : 0,

max : 1


generate_audiobool ( default: 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: Image-to-Video Model

What is Kling 3.0?

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.

Key Features

  • Image-to-video generation anchored to a required start_image_url
  • Cinematic motion control via natural-language prompting (camera moves, pacing, action)
  • 1080p-style output optimized for realistic movement and visual coherence
  • Optional synchronized audio with generate_audio for immersive clips
  • Shot control primitives using end_image_url for directed transitions (advanced)
  • Prompt adherence tuning with cfg_scale (advanced)

Best Use Cases

  • Social and marketing content: product reveals, lifestyle loops, campaign creatives (9:16, 1:1, 16:9)
  • Previsualization & story beats: quick motion studies from concept frames
  • Brand storytelling: consistent hero shots starting from a keyframe
  • Cinematic b-roll generation: nature, city, travel, and atmospheric scenes
  • App features: “animate my photo,” avatar moments, and image-based reels

Prompt Tips and Output Quality

  • Start with a high-quality, stable keyframe. Use a sharp, well-lit start_image_url to reduce flicker.
  • Write prompts as motion direction, not static description: “slow dolly-in,” “handheld shake,” “wind gusts,” “splashing water.”
  • Use duration (3–15s) for pacing: shorter for loops, longer for narrative movement.
  • Match composition to platform with aspect_ratio (16:9, 9:16, 1:1).
  • If the model drifts from your intent, increase adherence with cfg_scale (0–1). Mid values often balance realism and control.
  • Add a negative_prompt like “blur, distort, low quality” to avoid common artifacts.
  • Use end_image_url to steer the ending frame and produce cleaner transitions.

FAQs

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.