MaasUnionMaasUnion
API Reference
AI Model APIImagesKling Image

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_nameDescription
kling-image-o1Base image Omni model
kling-v3-omniSupports advanced features such as image series

Authentication

HeaderRequiredDescription
AuthorizationYesBearer {your_api_token}
Content-TypeRequired for POSTapplication/json

Create Task

POST https://maasunion.com/kling/v1/omni/images

Request Body Parameters

ParameterTypeRequiredDefaultDescription
model_namestringYesModel name: kling-image-o1, kling-v3-omni
promptstringYesText prompt, ≤ 2500 characters. Can reference materials via <<<image_N>>>, <<<element_N>>>, etc.
image_listarrayNoReference image list, see the table below
element_listarrayNoSubject reference list, see the table below
resolutionstringNo1kClarity: 1k, 2k, 4k
result_typestringNosingleResult type: single (single image), series (image series)
nintNo1Number of images to generate [1, 9]. Invalid when result_type=series
series_amountint/stringNo4Number of images in a series: 29 or auto. Invalid when result_type=single
aspect_ratiostringNoautoAspect ratio: 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3, 21:9, auto
watermark_infoobjectNoWatermark configuration, e.g. {"enabled": false}
callback_urlstringNoCallback URL for task status changes
external_task_idstringNoCustom task ID (unique on the user side)

image_list[]

ParameterTypeRequiredDescription
imagestringYesImage URL or Base64 (supports the data:image/...;base64, prefix; the gateway normalizes it automatically)

The image_url field is also compatible; the gateway converts it to the image field required by the official API.

element_list[]

ParameterTypeRequiredDescription
element_idlongYesThe 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
  }
}
FieldDescription
codeError code; 0 means success
data.task_idGateway task ID (used for subsequent queries)
data.task_statussubmitted / processing / succeed / failed

Query Task

GET https://maasunion.com/kling/v1/omni/images/{task_id}

Path parameterTypeRequiredDescription
task_idstringYesThe 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" }
      ]
    }
  }
}
FieldDescription
data.task_result.result_typesingle 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.*.urlImage download URL (valid for about 30 days; please persist in time)
data.final_unit_deductionNumber of credits deducted by the upstream

Parameter Reference

result_type: single vs series

Parameterresult_type: "single"result_type: "series"
n✅ Effective (1~9)❌ Invalid
series_amount❌ Invalid✅ Effective (2~9 or auto)
Response fieldtask_result.images[]task_result.series_images[]

resolution Description

ValueMeaning
1k1K standard definition
2k2K high definition
4k4K high definition

aspect_ratio Description

ValueRatio
16:9Landscape
9:16Portrait
1:1Square
4:3 / 3:4Traditional landscape/portrait
3:2 / 2:3Wide/narrow portrait
21:9Ultra-wide
autoIntelligently selected based on the input content

Capability Matrix

Featurekling-image-o1kling-v3-omni
Image-to-Image
Subject reference
Single image (single)
Image series (series)
1K / 2K / 4K

Task Status

task_statusMeaning
submittedSubmitted
processingProcessing
succeedSucceeded
failedFailed

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?