Kling V2.1 Multi Image to Image
kling-v2-1-multi-image2image
Kirin V2.1 reference-to-image generation uses multiple reference images for subject, scene, and style control to produce a new image.
Примечание к API
Заголовок раздела «Примечание к API»kling-v2-1-multi-image2image supports up to 4 subject reference images through subject_image_list, and optionally supports scene_image and style_image
Эндпоинты
Заголовок раздела «Эндпоинты»POST /v1/queue/kling-v2-1-multi-image2image # Создать задачуGET /v1/queue/kling-v2-1-multi-image2image/requests/{request_id}/status # Проверить статусGET /v1/queue/kling-v2-1-multi-image2image/requests/{request_id}/response # Получить результатPUT /v1/queue/kling-v2-1-multi-image2image/requests/{request_id}/cancel # Отменить задачуПараметры запроса
Заголовок раздела «Параметры запроса»curl --request 'POST' 'https://odirouter.ai/model/v1/queue/kling-v2-1-multi-image2image' \ --header 'Authorization: Bearer YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --location \ --data-raw '{ "prompt": "A woman in a flowing red dress on the grassland, in Ghibli style.", "subject_image_list": [ { "subject_image": "https://www.gstatic.com/webp/gallery/4.jpg" }, { "subject_image": "https://www.gstatic.com/webp/gallery/1.jpg" } ], "scene_image": "https://www.gstatic.com/webp/gallery/2.jpg", "style_image": "https://www.gstatic.com/webp/gallery/3.jpg", "n": 1, "aspect_ratio": "16:9"}'prompt string
Заголовок раздела «prompt string»Positive text prompt.
Must not exceed 2500 characters.
subject_image_list array required
Заголовок раздела «subject_image_list array required»Subject reference image list. Supports 1 to 4 images, each passed as a URL or raw Base64 string through the subject_image key:
"subject_image_list": [ { "subject_image": "image_url_or_base64" }, { "subject_image": "image_url_or_base64" }]No cropping is applied on the API side - upload images with the subject already prepared as intended
Supports Base64 encoded images or image URLs (must be publicly accessible)
Note: When using Base64, do not add any prefix such as data:image/png;base64, - pass the raw Base64 string directly
Supported formats: .jpg / .jpeg / .png
File size must not exceed 10MB; width and height must be at least 300px; aspect ratio must be between 1:2.5 and 2.5:1
subject_image
Заголовок раздела «subject_image string required»stringrequiredSubject image URL or raw Base64 string
scene_image string
Заголовок раздела «scene_image string»Optional scene reference image.
Supports Base64 encoded image or image URL (must be publicly accessible)
Supported formats: .jpg / .jpeg / .png
File size must not exceed 10MB; width and height must be at least 300px; aspect ratio must be between 1:2.5 and 2.5:1
style_image string
Заголовок раздела «style_image string»Optional style reference image.
Supports Base64 encoded image or image URL (must be publicly accessible)
Supported formats: .jpg / .jpeg / .png
File size must not exceed 10MB; width and height must be at least 300px; aspect ratio must be between 1:2.5 and 2.5:1
n integer
Заголовок раздела «n integer»Number of images to generate.
Default: 1
Range: 1 - 9
aspect_ratio string
Заголовок раздела «aspect_ratio string»Aspect ratio of the generated image (width:height).
Default: 16:9
Options: 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3, 21:9
watermark_info object
Заголовок раздела «watermark_info object»Whether to generate a watermarked result at the same time. Custom watermarks are not supported.
enabled
Заголовок раздела «enabled boolean»boolean
true: Generate a watermarked resultfalse: Do not generate a watermarked result
callback_url string
Заголовок раздела «callback_url string»Callback notification address for this task. If configured, the server will actively notify when the task status changes.
external_task_id string
Заголовок раздела «external_task_id string»Custom task ID.
A user-defined task ID. It does not override the system-generated task ID but can be used to query the task.
Note: It must be unique per user.
Параметры ответа
Заголовок раздела «Параметры ответа»{ "request_id": "task_01hxyz...", "response_url": "https://odirouter.ai/model/v1/queue/kling-v2-1-multi-image2image/requests/task_01hxyz.../response", "status_url": "https://odirouter.ai/model/v1/queue/kling-v2-1-multi-image2image/requests/task_01hxyz.../status", "cancel_url": "https://odirouter.ai/model/v1/queue/kling-v2-1-multi-image2image/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 | Текущая позиция в очереди. |