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"}'prompt string required
Заголовок раздела «prompt string required»Text prompt that describes the image to generate.
Maximum length: 2500 characters.
image string
Заголовок раздела «image string»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_prompt string
Заголовок раздела «negative_prompt string»Negative text prompt.
Maximum length: 2500 characters.
For image-to-image requests where image is provided, negative prompts may not be supported.
n integer
Заголовок раздела «n integer»Number of images to generate.
Default: 1
Range: 1 - 9
aspect_ratio string
Заголовок раздела «aspect_ratio string»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 string
Заголовок раздела «callback_url string»Callback URL for task status changes. If provided, the server sends task updates to this URL.
external_task_id string
Заголовок раздела «external_task_id string»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_id | string | Идентификатор задачи для последующей проверки статуса, получения результата и отмены. |
response_url | string | URL для получения итогового результата. |
status_url | string | URL для проверки статуса задачи. |
cancel_url | string | URL для отмены задачи. |
queue_position | int | Текущая позиция в очереди. |