Skip to main content
POST
/
v1
/
ai
/
video
/
kling-4k-i2v
Kling 4K I2V - Generate video from image
curl --request POST \
  --url https://api.magnific.com/v1/ai/video/kling-4k-i2v \
  --header 'Content-Type: application/json' \
  --header 'x-magnific-api-key: <api-key>' \
  --data '
{
  "image": "<string>",
  "webhook_url": "<string>",
  "image_tail": "<string>",
  "prompt": "<string>",
  "negative_prompt": "blur, distort, and low quality",
  "cfg_scale": 0.5,
  "duration": 5,
  "static_mask": "<string>",
  "dynamic_masks": [
    {
      "mask": "<string>",
      "trajectories": [
        {
          "x": 123,
          "y": 123
        }
      ]
    }
  ]
}
'
"<unknown>"

Documentation Index

Fetch the complete documentation index at: https://docs.magnific.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-magnific-api-key
string
header
required

Your Magnific API key. Required for authentication. Learn how to obtain an API key

Body

application/json
image
string
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
webhook_url
string<uri>

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

image_tail
string

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
prompt
string

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
Maximum string length: 2500
negative_prompt
string
default:blur, distort, and low quality

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

Maximum string length: 2500
cfg_scale
number<float>
default:0.5

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
Required range: 0 <= x <= 1
duration
enum<integer>
default:5

Duration of the generated video in seconds.

Range: 3-15 seconds

Available options:
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15
static_mask
string

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.

dynamic_masks
object[]

Response

OK - Task created successfully

OK - The task exists and the status is returned