Skip to main content
POST
/
kling-image-o1
/
async
curl --request POST \
  --url https://api.modellix.ai/api/v1/image-to-image/kling/kling-image-o1/async \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "A serene landscape with mountains at sunset"
}
'
{
  "code": 0,
  "message": "success",
  "data": {
    "status": "pending",
    "task_id": "task-omni-vwx234",
    "model_id": "kling-image-o1"
  }
}

Authorizations

Authorization
string
header
required

API Key authentication. Format: Bearer YOUR_API_KEY.

Body

application/json

Note: Total count of image_list + element_list must not exceed 10 items. This model does NOT support: negative_prompt, image (single), image_reference, image_fidelity, human_fidelity, subject_image_list, scene_image, or style_image parameters. Use image_list for multiple image inputs instead.

prompt
string
required

Image description text, supports Chinese and English. Can use <<<image_1>>>, <<<image_2>>> etc. to reference images from image_list

Required string length: 1 - 2500
Example:

"A serene landscape with mountains at sunset"

image_list
object[]

Reference image list. Each element must contain an 'image' field with image URL or Base64 data. Maximum 10 items total (images + elements combined). Supported formats: .jpg, .jpeg, .png. Maximum size per image: 10MB

Maximum array length: 10
Example:
[
{ "image": "https://example.com/image1.jpg" },
{
"image": "data:image/jpeg;base64,/9j/4AAQ..."
}
]
element_list
object[]

Reference element list. Each element must contain an 'element_id' field with long integer. Maximum 10 items total (images + elements combined)

Maximum array length: 10
Example:
[
{ "element_id": 12345 },
{ "element_id": 67890 }
]
resolution
enum<string>
default:1k

Image resolution. Supports 1K and 2K

Available options:
1k,
2k
Example:

"2k"

aspect_ratio
enum<string>
default:auto

Image aspect ratio. Supports 'auto' for intelligent aspect ratio selection

Available options:
16:9,
9:16,
1:1,
4:3,
3:4,
3:2,
2:3,
21:9,
auto
Example:

"auto"

n
integer
default:1

Number of images to generate per request

Required range: 1 <= x <= 9
Example:

1

Response

Task submitted successfully

code
integer
required

Response code, 0 indicates success

Example:

0

message
string
required

Response message

Example:

"success"

data
object
required