Skip to main content
POST
/
vendors
/
klingai
/
v1
/
kling-v2.5-turbo
/
image-to-video
/
generation
Image to Video Generation
curl --request POST \
  --url https://api.mulerun.com/vendors/klingai/v1/kling-v2.5-turbo/image-to-video/generation \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "mode": "pro",
  "duration": 5,
  "image": "https://example.com/image.jpg",
  "prompt": "A bird is flying over the lake"
}
'
{
  "task_info": {
    "id": "8e1e315e-b50d-4334-a231-be7d19a372f4",
    "status": "pending",
    "created_at": "2025-09-21T00:00:00.000Z",
    "updated_at": "2025-09-21T00:00:00.000Z"
  }
}
This API supports Kling v2.5 Turbo video generation model. Please refer to Kling’s official documentation for more details.

Overview

Generate videos from images using the Kling v2.5 Turbo model with faster generation speed and advanced features.

Key Features

  • Fast image-to-video generation
  • Standard and Professional quality modes
  • 5s or 10s duration
  • End frame control (image_tail)
  • Motion brush support (static_mask, dynamic_masks)

Image Requirements

PropertyRequirement
FormatsJPEG, JPG, PNG
DimensionsMin 300px for both width and height
Aspect RatioBetween 1:2.5 and 2.5:1
File SizeMax 10MB
InputPublic URL or Base64 encoded data

Example Requests

Basic Image-to-Video

{
  "image": "https://example.com/landscape.jpg",
  "prompt": "Camera slowly pans across the landscape",
  "mode": "std",
  "duration": 5
}

With End Frame Control

{
  "image": "https://example.com/start.jpg",
  "image_tail": "https://example.com/end.jpg",
  "prompt": "Smooth transition between frames",
  "mode": "pro",
  "duration": 5
}

With Dynamic Masks

{
  "image": "https://example.com/scene.jpg",
  "prompt": "Object moves along the path",
  "static_mask": "https://example.com/static_mask.png",
  "dynamic_masks": [
    {
      "mask": "https://example.com/dynamic_mask.png",
      "trajectories": [
        {"x": 100, "y": 200},
        {"x": 300, "y": 400}
      ]
    }
  ],
  "mode": "std",
  "duration": 5
}

Parameters

image_tail

  • Optional: Yes
  • Description: End frame image for video interpolation
  • Note: Cannot be used with dynamic_masks/static_mask

dynamic_masks

  • Optional: Yes
  • Description: Up to 6 groups of mask and trajectory configurations
  • Note: Cannot be used with image_tail

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
image
string
required

Reference Image. Support inputting image Base64 encoding or image URL.

Important: When using Base64 encoding, do not add any prefixes such as data:image/png;base64,. Provide only the Base64-encoded string itself.

  • Supported image formats: .jpg, .jpeg, .png
  • Image file size cannot exceed 10MB
  • Width and height dimensions must not be less than 300px
  • Aspect ratio should be between 1:2.5 ~ 2.5:1
image_tail
string | null

Reference Image - End frame control. Support inputting image Base64 encoding or image URL.

  • At least one parameter should be filled in between image and image_tail
  • image+image_tail and dynamic_masks/static_mask cannot be used at the same time
prompt
string

Positive text prompt. Cannot exceed 2500 characters.

Maximum string length: 2500
negative_prompt
string

Negative text prompt. Cannot exceed 2500 characters.

Maximum string length: 2500
mode
enum<string>
default:std

Video generation mode

std: Standard Mode, which is cost-effective. pro: Professional Mode, generates videos use longer duration but higher quality video output.

Available options:
std,
pro
static_mask
string | null

Static Brush Application Area (Mask image created by users using the motion brush).

  • Support inputting image Base64 encoding or image URL
  • The aspect ratio of the mask image must match the input image
dynamic_masks
object[] | null

Dynamic Brush Configuration List. Multiple configurations can be set up (up to 6 groups).

Maximum array length: 6
duration
enum<integer>
default:5

Video Length in seconds

Available options:
5,
10

Response

202 - application/json

Accepted - Task created successfully

task_info
object