video
kling-4k-i2v
background_tasks

Kling 4K I2V - Generate video from image

Generate AI video in 4K resolution from an image using Kling 4K Image-to-Video.

Features:

  • Image-to-video: Use a reference image to guide 4K video generation
  • End frame control: Optionally specify an end frame image
  • Motion brush: Use static and dynamic masks for precise motion control

Duration: 3-15 seconds Resolution: 4K output quality.

post/v1/ai/video/kling-4k-i2v

Request

  • Base URL: https://api.magnific.com
  • URL: https://api.magnific.com/v1/ai/video/kling-4k-i2v
  • Auth: API key in header x-magnific-api-key

Request body

webhook_urlstring uri

Optional callback URL that receives asynchronous notifications when the task changes status. The payload includes the task status and result URL when completed.

imagestring required

Reference image for video generation. Supports Base64 encoding or URL (ensure accessibility). For URL, must be publicly accessible.

Image requirements:

  • Minimum: 300x300 pixels
  • Maximum: 10MB file size
  • Aspect ratio: 1:2.5 to 2.5:1
  • Formats: JPG, JPEG, PNG
image_tailstring

Optional end frame control image. Supports Base64 encoding or URL. For URL, must be publicly accessible. Must follow the same format requirements as the image field.

Image requirements:

  • Same as image field
promptstring

Text prompt describing the desired video content. Maximum 2500 characters.

Tips for better results:

  • Be specific about motion, camera angles, and actions
  • Describe the scene, characters, and atmosphere
negative_promptstring

Undesired elements to avoid in the generated video. Maximum 2500 characters.

cfg_scalenumber float

Guidance scale controlling prompt adherence versus creative freedom. Range: 0 to 1.

  • 0: Maximum creative freedom, loosest interpretation of the prompt
  • 0.5 (default): Balanced between prompt adherence and creativity
  • 1: Strongest adherence to the prompt, least creative variation
duration'3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '13' | '14' | '15'

Duration of the generated video in seconds.

Range: 3-15 seconds

static_maskstring

Static mask image for defining motion brush application areas.

● Supports both Base64 encoding and image URLs (ensure URLs are publicly accessible and follow the same format requirements as the image field). ● Supported image formats include .jpg / .jpeg / .png. ● The aspect ratio of the mask image MUST match the input image (image field); otherwise, the task will fail. ● The resolutions of the static_mask image and the dynamic_masks.mask images must be identical; otherwise, the task will fail. ● The static brush feature allows you to define areas where motion will be applied in the generated video.

Response

OK - Task created successfully

unknown required

Changes

No recorded changes to this operation across all 1 revision of this API.