Перейти к содержимому
Главная

Kling V1.5 - Image to Video

kling-v1-5-i2v

Kirin V1.5 - Image to Video image-to-video generation. Create videos from images with AI.

kling-v1-5-i2v only supports first and last frame or only last frame (image + image_tail or image_tail only) when mode is pro

kling-v1-5-i2v only supports motion brush (dynamic_masks/static_mask) when mode is pro and duration is 5 seconds

kling-v1-5-i2v only supports camera control (camera_control, simple only) when mode is pro and duration is 5 seconds

POST /v1/queue/kling-v1-5-i2v # Создать задачу
GET /v1/queue/kling-v1-5-i2v/requests/{request_id}/status # Проверить статус
GET /v1/queue/kling-v1-5-i2v/requests/{request_id}/response # Получить результат
PUT /v1/queue/kling-v1-5-i2v/requests/{request_id}/cancel # Отменить задачу
Окно терминала
curl --request 'POST' 'https://odirouter.ai/model/v1/queue/kling-v1-5-i2v' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--location \
--data-raw '{
"image": "https://www.gstatic.com/webp/gallery/4.jpg",
"prompt": "A cinematic drone shot over a misty mountain range at sunrise",
"negative_prompt": "blurry, low quality, distorted",
"cfg_scale": 0.5,
"mode": "std"
}'

Data parameter object

Reference image

Supports Base64 encoded image or image URL (ensure accessible)

Note: If using Base64, ensure all image data parameters use Base64 encoding format. Do not add any prefix such as data:image/png;base64, before the Base64 string. The correct format should be the Base64 encoded string directly.

Image requirements: Format: .jpg, .jpeg, .png Size: Less than 10MB Dimensions: Width and height at least 300px, aspect ratio between 1:2.5 and 2.5:1

image + image_tail parameters, dynamic_masks/static_mask parameters, and camera_control parameters are mutually exclusive

Reference image - tail frame control

Supports Base64 encoded image or image URL (ensure accessible)

Note: If using Base64, ensure all image data parameters use Base64 encoding format. Do not add any prefix such as data:image/png;base64, before the Base64 string. The correct format should be the Base64 encoded string directly.

Image requirements: Format: .jpg, .jpeg, .png Size: Less than 10MB Dimensions: Width and height at least 300px

image + image_tail parameters, dynamic_masks/static_mask parameters, and camera_control parameters are mutually exclusive

Video generation prompt, maximum 2500 characters

Video duration

Options: 5, 10

Default: 5

Generation freedom level. Higher values mean less model freedom and stronger correlation with user prompt

Range: 0 - 1

Default: 0.5

Random seed

Negative text prompt, maximum 2500 characters

Video generation mode

std: Standard mode, basic mode with high cost-effectiveness pro: Expert mode (high quality), high performance mode with better video quality

Options: std, pro

Default: std

Static brush mask area (mask image painted by user through motion brush)

“Motion brush” capability includes two types: “dynamic brush dynamic_masks” and “static brush static_mask”

Supports Base64 encoded image or image URL (ensure accessible, format requirements same as image field)

Image format supports .jpg, .jpeg, .png

Image aspect ratio must match the input image (i.e., image field), otherwise the task will fail

static_mask and dynamic_masks.mask must have the same resolution, otherwise the task will fail

Dynamic brush configuration list

Can configure multiple groups (up to 6 groups), each group contains “mask area” and “trajectories” sequence

Dynamic brush mask area (mask image painted by user through motion brush)

Supports Base64 encoded image or image URL (ensure accessible, format requirements same as image field)

Image format supports .jpg, .jpeg, .png

Image aspect ratio must match the input image (i.e., image field), otherwise the task will fail

static_mask and dynamic_masks.mask must have the same resolution, otherwise the task will fail

Motion trajectory coordinate sequence

For generating 5s video, trajectory length cannot exceed 77, i.e., coordinate count range: [2, 77]

Trajectory coordinate system uses the bottom-left corner of the image as the origin

Note 1: More coordinate points provide more accurate trajectory depiction. With only 2 trajectory points, it will be a straight line connecting them

Note 2: Trajectory direction follows the input order. The first coordinate is the starting point, connecting subsequent coordinates to form the motion trajectory

Trajectory point x-coordinate (pixel coordinate with image bottom-left as origin)

Trajectory point y-coordinate (pixel coordinate with image bottom-left as origin)

Protocol for controlling camera movement (if not specified, model will intelligently match based on input text/image)

image + image_tail parameters, dynamic_masks/static_mask parameters, and camera_control parameters are mutually exclusive

Predefined camera movement type

Options: simple

simple: Simple camera movement, choose one of six in “config”

Contains six fields for specifying camera movement or changes in different directions

Required when camera movement type is specified as simple

Choose 1 of the 6 parameters below, i.e., only one parameter can be non-zero, others must be 0

Horizontal movement, controls camera movement in horizontal direction (translation along x-axis)

Range: [-10, 10]

Negative values indicate leftward translation, positive values indicate rightward translation

Vertical movement, controls camera movement in vertical direction (translation along y-axis)

Range: [-10, 10]

Negative values indicate downward translation, positive values indicate upward translation

Horizontal pan, controls camera rotation in horizontal plane (rotation around y-axis)

Range: [-10, 10]

Negative values indicate leftward rotation around y-axis, positive values indicate rightward rotation

Vertical tilt, controls camera rotation in vertical plane (rotation along x-axis)

Range: [-10, 10]

Negative values indicate downward rotation around x-axis, positive values indicate upward rotation

Roll movement, controls camera roll amount (rotation around z-axis)

Range: [-10, 10]

Negative values indicate counterclockwise rotation around z-axis, positive values indicate clockwise rotation

Zoom, controls camera focal length change, affecting field of view distance

Range: [-10, 10]

Negative values indicate longer focal length and smaller field of view, positive values indicate shorter focal length and larger field of view

Whether to generate results with watermark

Defined by enabled parameter, specific array format as follows:

"watermark_info": {
"enabled": boolean // true to generate, false to not generate
}

Custom watermarks are not currently supported

Callback URL for task result notification. If configured, the server will actively notify when task status changes

Custom task ID

User-defined task ID, will not override the system-generated task ID, but supports querying tasks through this ID

Please note, uniqueness must be ensured for a single user

{
"request_id": "task_01hxyz...",
"response_url": "https://odirouter.ai/model/v1/queue/kling-v1-5-i2v/requests/task_01hxyz.../response",
"status_url": "https://odirouter.ai/model/v1/queue/kling-v1-5-i2v/requests/task_01hxyz.../status",
"cancel_url": "https://odirouter.ai/model/v1/queue/kling-v1-5-i2v/requests/task_01hxyz.../cancel",
"queue_position": 0
}
ПолеТипОписание
request_idstringИдентификатор задачи для последующей проверки статуса, получения результата и отмены.
response_urlstringURL для получения итогового результата.
status_urlstringURL для проверки статуса задачи.
cancel_urlstringURL для отмены задачи.
queue_positionintТекущая позиция в очереди.