Omni-Image
Create Task
Request Header
Data Exchange Format
Authentication information, refer to API authentication
Request Body
Model Name
Text prompt words, which can include positive and negative descriptions
- The prompt words can be templated to meet different image generation needs
- Must not exceed 2,500 characters
- Specify an image in the format of <<<>>>, such as <<<image_1>>>
- The scope of abilities can be found in the user manual: KLING Omni Model User Guide
Reference Image List
- Load with key:value format as follows:
- Supports inputting image Base64 encoding or image URL (ensure accessibility)
- Supported image formats: .jpg / .jpeg / .png
- Image file size must not exceed 10MB. Image dimensions must be at least 300px. Aspect ratio must be between 1:2.5 and 2.5:1
- The sum of reference elements and reference images must not exceed 10
- The value of image_url parameter must not be empty
Image URL or Base64 string
Reference Element List based on element ID configuration
- Load with key:value format as follows:
- The sum of reference elements and reference images must not exceed 10
The support range for different model versionsvaries. For details, see Capability Map
Element ID from element library
Image generation resolution
- 1k: 1K standard definition
- 2k: 2K high-res
- 4k: 4K high-res
The support range for different model versionsvaries. For details, see Capability Map
Control whether to generate a single image or a series of images
The support range for different model versionsvaries. For details, see Capability Map
Number of generated images
- Value range: [1, 9]
- When result_type is series, this parameter is invalid
Number of images in a series
- Value range: [2, 9]
- When result_type is single, this parameter is invalid
The support range for different model versionsvaries. For details, see Capability Map
Aspect ratio of the generated images (width:height)
autois to intelligently aspect ratio of the generated image based on incoming content.
- When generating a new image based on the aspect ratio of the original image, this parameter is invalid
The support range for different model versionsvaries. For details, see Capability Map
Whether to generate watermarked results simultaneously
- Defined by the enabled parameter, format:
- true: generate watermarked result, false: do not generate
- Custom watermarks are not currently supported
The callback notification address for the result of this task. If configured, the server will actively notify when the task status changes
- For the specific message schema, see Callback Protocol
Customized Task ID
- User-defined task ID. It will not override the system-generated task ID, but supports querying tasks by this ID
- Please note that it must be unique for each user
Invocation examples
Image generation with element
Query Task (Single)
Request Header
Data Exchange Format
Authentication information, refer to API authentication
Path Parameters
The task ID for image generation. Request path parameter, directly fill the value in the request path. Query by external_task_id or task_id.
Customized Task ID for audio generation
- The external_task_id filled in when creating the task. You can choose to query by external_task_id or task_id
- When creating a task, you can choose to query by external_task_id or task_id.
Query Task (List)
Request Header
Data Exchange Format
Authentication information, refer to API authentication
Query Parameters
Page number
- Value range: [1, 1000]
Number of items per page
- Value range: [1, 500]