Kling Omni Image
Channel type: Kling Omni Image (65) Gateway path:
POST https://maasunion.com/kling/v1/omni/images·GET https://maasunion.com/kling/v1/omni/images/{task_id}Official upstream:https://api-beijing.klingai.com(/v1/images/omni-image)
Overview
The image Omni models can combine a Prompt with images, subjects, and other elements to generate images. Reference materials in the prompt using <<<>>>, for example:
<<<image_1>>>— the 1st reference image<<<object_1>>>/<<<element_1>>>— the 1st subject
This gateway keeps the request/response format identical to the official Kling OmniImage API; the request body is passed through to the upstream as-is.
Supported Models
| model_name | Description |
|---|---|
kling-image-o1 | Base image Omni model |
kling-v3-omni | Supports advanced features such as image series |
Authentication
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer {your_api_token} |
Content-Type | Required for POST | application/json |
Create Task
POST https://maasunion.com/kling/v1/omni/images
Request Body Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model_name | string | Yes | — | Model name: kling-image-o1, kling-v3-omni |
prompt | string | Yes | — | Text prompt, ≤ 2500 characters. Can reference materials via <<<image_N>>>, <<<element_N>>>, etc. |
image_list | array | No | — | Reference image list, see the table below |
element_list | array | No | — | Subject reference list, see the table below |
resolution | string | No | 1k | Clarity: 1k, 2k, 4k |
result_type | string | No | single | Result type: single (single image), series (image series) |
n | int | No | 1 | Number of images to generate [1, 9]. Invalid when result_type=series |
series_amount | int/string | No | 4 | Number of images in a series: 2–9 or auto. Invalid when result_type=single |
aspect_ratio | string | No | auto | Aspect ratio: 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3, 21:9, auto |
watermark_info | object | No | — | Watermark configuration, e.g. {"enabled": false} |
callback_url | string | No | — | Callback URL for task status changes |
external_task_id | string | No | — | Custom task ID (unique on the user side) |
image_list[]
| Parameter | Type | Required | Description |
|---|---|---|---|
image | string | Yes | Image URL or Base64 (supports the data:image/...;base64, prefix; the gateway normalizes it automatically) |
The
image_urlfield is also compatible; the gateway converts it to theimagefield required by the official API.
element_list[]
| Parameter | Type | Required | Description |
|---|---|---|---|
element_id | long | Yes | The subject ID in the Kling subject library |
Request Example
Multi-Image + Subject Reference
curl --request POST \
--url "https://maasunion.com/kling/v1/omni/images" \
--header "Authorization: Bearer sk-xxxxxxxx" \
--header "Content-Type: application/json" \
--data '{
"model_name": "kling-image-o1",
"prompt": "将所有图片中的人物融合到<<<element_1>>>图中",
"element_list": [
{ "element_id": 829836802793406551 }
],
"image_list": [
{ "image": "https://example.com/a.png" },
{ "image": "https://example.com/b.png" }
],
"resolution": "2k",
"n": 1,
"aspect_ratio": "3:2"
}'Image Series (kling-v3-omni)
curl --request POST \
--url "https://maasunion.com/kling/v1/omni/images" \
--header "Authorization: Bearer sk-xxxxxxxx" \
--header "Content-Type: application/json" \
--data '{
"model_name": "kling-v3-omni",
"prompt": "Generate a recommended cover for each subject <<<element_1>>> based on the style of <<<image_1>>>",
"element_list": [
{ "element_id": 160 },
{ "element_id": 161 }
],
"image_list": [
{ "image": "https://example.com/style.png" }
],
"resolution": "2k",
"result_type": "series",
"series_amount": 2,
"aspect_ratio": "auto"
}'Create Response
{
"code": 0,
"message": "string",
"request_id": "string",
"data": {
"task_id": "string",
"task_info": { "external_task_id": "string" },
"task_status": "submitted",
"created_at": 1722769557708,
"updated_at": 1722769557708
}
}| Field | Description |
|---|---|
code | Error code; 0 means success |
data.task_id | Gateway task ID (used for subsequent queries) |
data.task_status | submitted / processing / succeed / failed |
Query Task
GET https://maasunion.com/kling/v1/omni/images/{task_id}
| Path parameter | Type | Required | Description |
|---|---|---|---|
task_id | string | Yes | The data.task_id from the create task response |
curl --request GET \
--url "https://maasunion.com/kling/v1/omni/images/your-task-id" \
--header "Authorization: Bearer sk-xxxxxxxx"Response Example (Success · Single Image)
{
"code": 0,
"message": "string",
"request_id": "string",
"data": {
"task_id": "your-task-id",
"task_status": "succeed",
"task_status_msg": "string",
"task_info": { "external_task_id": "string" },
"task_result": {
"result_type": "single",
"images": [
{ "index": 0, "url": "string", "watermark_url": "string" }
]
},
"watermark_info": { "enabled": false },
"final_unit_deduction": "string",
"created_at": 1722769557708,
"updated_at": 1722769557708
}
}Response Example (Success · Image Series)
{
"code": 0,
"data": {
"task_id": "your-task-id",
"task_status": "succeed",
"task_result": {
"result_type": "series",
"series_images": [
{ "index": 0, "url": "string", "watermark_url": "string" },
{ "index": 1, "url": "string", "watermark_url": "string" }
]
}
}
}| Field | Description |
|---|---|
data.task_result.result_type | single or series |
data.task_result.images[] | Single image result (result_type=single) |
data.task_result.series_images[] | Image series result (result_type=series) |
data.task_result.*.url | Image download URL (valid for about 30 days; please persist in time) |
data.final_unit_deduction | Number of credits deducted by the upstream |
Parameter Reference
result_type: single vs series
| Parameter | result_type: "single" | result_type: "series" |
|---|---|---|
n | ✅ Effective (1~9) | ❌ Invalid |
series_amount | ❌ Invalid | ✅ Effective (2~9 or auto) |
| Response field | task_result.images[] | task_result.series_images[] |
resolution Description
| Value | Meaning |
|---|---|
1k | 1K standard definition |
2k | 2K high definition |
4k | 4K high definition |
aspect_ratio Description
| Value | Ratio |
|---|---|
16:9 | Landscape |
9:16 | Portrait |
1:1 | Square |
4:3 / 3:4 | Traditional landscape/portrait |
3:2 / 2:3 | Wide/narrow portrait |
21:9 | Ultra-wide |
auto | Intelligently selected based on the input content |
Capability Matrix
| Feature | kling-image-o1 | kling-v3-omni |
|---|---|---|
| Image-to-Image | ✅ | ✅ |
| Subject reference | ✅ | ✅ |
| Single image (single) | ✅ | ✅ |
| Image series (series) | ❌ | ✅ |
| 1K / 2K / 4K | ✅ | ✅ |
Task Status
task_status | Meaning |
|---|---|
submitted | Submitted |
processing | Processing |
succeed | Succeeded |
failed | Failed |
After creating a task, it is recommended to poll the query endpoint at intervals of 10~30 seconds until task_status is succeed or failed. You can also use callback_url to have the gateway notify you via callback on status changes.
For more general information, see Kling Gateway Overview.
How is this guide?