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

Kling Image 1.0

kling-v1-image

Kirin V1 image generation interface, supports text-to-image and optional reference image generation.

POST /v1/queue/kling-v1-image # Создать задачу
GET /v1/queue/kling-v1-image/requests/{request_id}/status # Проверить статус
GET /v1/queue/kling-v1-image/requests/{request_id}/response # Получить результат
PUT /v1/queue/kling-v1-image/requests/{request_id}/cancel # Отменить задачу
Окно терминала
curl --request 'POST' 'https://odirouter.ai/model/v1/queue/kling-v1-image' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--location \
--data-raw '{
"prompt": "A beautiful sunset landscape painting in impressionist style",
"negative_prompt": "",
"resolution": "1k",
"n": 1,
"aspect_ratio": "16:9"
}'

Text prompt that describes the image to generate.

Maximum length: 2500 characters.


Reference image. Provide this field when you want to generate an image based on an input image. Omit it for text-to-image generation.

Supports an accessible image URL or a Base64-encoded image string.

Image requirements: Image formats: .jpg, .jpeg, .png. Image size must not exceed 10MB. Image width and height must be at least 300px. Aspect ratio must be within 1:2.5 to 2.5:1.

Base64 requirements: If you use Base64, pass only the raw Base64 string. Do not include a prefix such as data:image/png;base64,.


Negative text prompt.

Maximum length: 2500 characters.

For image-to-image requests where image is provided, negative prompts may not be supported.


Number of images to generate.

Default: 1

Range: 1 - 9


Output image aspect ratio.

Options: 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3, 21:9

Default: 16:9


Callback URL for task status changes. If provided, the server sends task updates to this URL.


Custom task ID. It does not replace the system task ID, but can be used for task lookup.

Keep this value unique for each user.

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