4Z API

Omni-Image

Endpoint: POST https://4zapi.com/kling/v1/images/omni-image

Parameters

  • Content-Type (header, string): Request body Content-Type, usually application/json
  • Authorization (header, string): Bearer API Key

Request body (application/json)

  • model_name (string, required): Model name enum: kling-image-o1,kling-v3-omni
  • prompt (string, required): text prompt, may include positive and negative descriptions templates can be used for different image needs max 2500 characters
  • aspect_ratio (string): Aspect ratio (W:H) enum: 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3, 21:9, auto auto: smart from input ignored when matching source aspect ratio
  • callback_url (string): Callback URL invoked on task completion
  • external_task_id (string): Custom external task ID for business-side correlation
  • image_list (array<object>): reference image list
  • n (integer): Number of images to generate range: [1,9]
  • resolution (string): Output clarity enum: 1k, 2k 1k: 1K SD 2k: 2K HD
  • result_type (string): Single / series switch enum: single, series
  • series_amount (integer): Images in series ● range: [2, 9] ignored when result_type is single
  • watermark_info (object): whether to also generate a watermarked result ● defined by enabled, as key:value, as follows: : "watermark_info": { "enabled": boolean // true=generate, false=do not generate } ● custom watermarks are not supported yet

Request example

{
  "aspect_ratio": "",
  "callback_url": "",
  "element_list": [
    {
      "element_id": "835266081714884677"
    }
  ],
  "external_task_id": "",
  "model_name": "kling-image-o1",
  "n": 1,
  "prompt": "生成一张海边跳舞的图片",
  "resolution": ""
}