Skip to content
Home

Kling Image 2.0

kling-v2-image

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

POST /v1/queue/kling-v2-image # Create task
GET /v1/queue/kling-v2-image/requests/{request_id}/status # Check status
GET /v1/queue/kling-v2-image/requests/{request_id}/response # Get result
PUT /v1/queue/kling-v2-image/requests/{request_id}/cancel # Cancel task
Окно терминала
curl --request 'POST' 'https://odirouter.ai/model/v1/queue/kling-v2-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

Text prompt that describes the image to generate.

Maximum length: 2500 characters.

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 text prompt.

Maximum length: 2500 characters.

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

n integer

Number of images to generate.

Default: 1

Range: 1 - 9

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 for task status changes. If provided, the server sends task updates to this URL.

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-v2-image/requests/task_01hxyz.../response",
"status_url": "https://odirouter.ai/model/v1/queue/kling-v2-image/requests/task_01hxyz.../status",
"cancel_url": "https://odirouter.ai/model/v1/queue/kling-v2-image/requests/task_01hxyz.../cancel",
"queue_position": 0
}
FieldTypeDescription
request_idstringTask ID used for all follow-up operations.
response_urlstringURL to fetch the final result.
status_urlstringURL to query task status.
cancel_urlstringURL to cancel the task.
queue_positionintCurrent queue position.