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.
Примечание к API
Заголовок раздела «Примечание к API»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 object required
Заголовок раздела «data object required»Data parameter object
image
Заголовок раздела «image string»stringReference 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,.pngSize: Less than10MBDimensions: Width and height at least300px, aspect ratio between1:2.5and2.5:1image + image_tail parameters, dynamic_masks/static_mask parameters, and camera_control parameters are mutually exclusive
image_tail
Заголовок раздела «image_tail string»stringReference 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,.pngSize: Less than10MBDimensions: Width and height at least300pximage + image_tail parameters, dynamic_masks/static_mask parameters, and camera_control parameters are mutually exclusive
prompt
Заголовок раздела «prompt string»stringVideo generation prompt, maximum
2500characters
duration
Заголовок раздела «duration string»stringVideo duration
Options:
5,10Default:
5
cfg_scale
Заголовок раздела «cfg_scale number»numberGeneration freedom level. Higher values mean less model freedom and stronger correlation with user prompt
Range:
0-1Default:
0.5
seed
Заголовок раздела «seed integer»integerRandom seed
negative_prompt
Заголовок раздела «negative_prompt string»stringNegative text prompt, maximum
2500characters
mode
Заголовок раздела «mode string»stringVideo generation mode
std: Standard mode, basic mode with high cost-effectivenesspro: Expert mode (high quality), high performance mode with better video qualityOptions:
std,proDefault:
std
static_mask
Заголовок раздела «static_mask string»stringStatic 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,.pngImage 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_masks
Заголовок раздела «dynamic_masks array»arrayDynamic brush configuration list
Can configure multiple groups (up to 6 groups), each group contains “mask area” and “trajectories” sequence
mask
Заголовок раздела «mask string»stringDynamic 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,.pngImage 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
trajectories
Заголовок раздела «trajectories array»arrayMotion 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
x
Заголовок раздела «x integer»integerTrajectory point x-coordinate (pixel coordinate with image bottom-left as origin)
y
Заголовок раздела «y integer»integerTrajectory point y-coordinate (pixel coordinate with image bottom-left as origin)
camera_control
Заголовок раздела «camera_control object»objectProtocol 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
type
Заголовок раздела «type string»stringPredefined camera movement type
Options:
simple
simple: Simple camera movement, choose one of six in “config”config
Заголовок раздела «config object»objectContains 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
Заголовок раздела «horizontal number»numberHorizontal 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
Заголовок раздела «vertical number»numberVertical movement, controls camera movement in vertical direction (translation along y-axis)
Range:
[-10, 10]Negative values indicate downward translation, positive values indicate upward translation
pan
Заголовок раздела «pan number»numberHorizontal 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
tilt
Заголовок раздела «tilt number»numberVertical 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
Заголовок раздела «roll number»numberRoll 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
Заголовок раздела «zoom number»numberZoom, 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
watermark_info
Заголовок раздела «watermark_info string»stringWhether 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
Заголовок раздела «callback_url string»stringCallback URL for task result notification. If configured, the server will actively notify when task status changes
external_task_id
Заголовок раздела «external_task_id string»stringCustom 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_id | string | Идентификатор задачи для последующей проверки статуса, получения результата и отмены. |
response_url | string | URL для получения итогового результата. |
status_url | string | URL для проверки статуса задачи. |
cancel_url | string | URL для отмены задачи. |
queue_position | int | Текущая позиция в очереди. |