Omni-Image
OpenAPI Specification
yaml
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/kling/v1/images/omni-image:
post:
summary: Omni-Image
deprecated: false
description: ''
tags:
- 可灵 Kling 平台/Omni-Image
parameters:
- name: Content-Type
in: header
description: ''
required: false
example: application/json
schema:
type: string
- name: Authorization
in: header
description: ''
required: false
example: Bearer {{YOUR_API_KEY}}
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
model_name:
type: string
description: 模型名称 枚举值:kling-image-o1,kling-v3-omni
prompt:
type: string
description: |-
文本提示词,可包含正向描述和负向描述
可将提示词模板化来满足不同的图像生成需求
不能超过2500个字符
image_list:
type: array
items:
type: object
properties:
image:
type: string
x-apifox-orders:
- image
description: 参考图列表
resolution:
type: string
description: |-
生成图片的清晰度
枚举值:1k, 2k
1k:1K标清
2k:2K高清
'n':
type: integer
description: |-
生成图片数量
取值范围:[1,9]
result_type:
type: string
description: |-
生成结果单图/组图切换开关
枚举值:single,series
series_amount:
type: integer
description: |-
生成组图的图片数量
● 取值范围:[2, 9]
当result_type值为single时,当前参数无效
aspect_ratio:
type: string
description: |-
生成图片的画面纵横比(宽:高)
枚举值:16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3, 21:9, auto
其中:auto为根据传入内容智能生成视频
参考原图横纵比生成新图时,当前参数无效
watermark_info:
type: object
properties:
enabled:
type: boolean
required:
- enabled
x-apifox-orders:
- enabled
description: "是否同时生成含水印的结果\n● 通过enabled参数定义,用key:value承载,如下::\n\"watermark_info\": {\n \t\"enabled\": boolean // true 为生成,false 为不生成\n}\n● 暂不支持自定义水印"
callback_url:
type: string
external_task_id:
type: string
required:
- model_name
- prompt
x-apifox-orders:
- model_name
- prompt
- image_list
- resolution
- 'n'
- result_type
- series_amount
- aspect_ratio
- watermark_info
- callback_url
- external_task_id
example: "{\r\n \"model_name\": \"kling-image-o1\",\r\n \"prompt\": \"生成一张海边跳舞的图片\",\r\n // \"image_list\": [\r\n // {\r\n // \"image\": \"https://p2-fdl.klingai.com/ksc2/z3PF_5x5kcBzfxZU-uZ66pg5k_lhpifyoCyTFjn_jsKOiBYQGMoR7_kLKO34JyIdJbCSKR3vRneCwiyPHHjTPk01J7Dr65Ovoa7vYQuEh9c4j1_0G03JjIyKUMI58c29jou3zMmAyhzg7p8CrG7esV5agnr2P9XuO5VdTKdr0sUjEDycWEFe07ajsaYFg-wCu7vTJGLD0cr3nvYKnUl-CA.png?cacheKey=ChtzZWN1cml0eS5rbGluZy5tZXRhX2VuY3J5cHQSsAEeMBuZg7aCbU7N7Rcp5oJ-kfGAN3V073p1GMw7U9oTuISV4gRwnqW7X62AbPhPQVRmzngQDHsFrcGU8kCtzGOJEUWdikBNDmI_JPyD4jpae40CyqnscoIaQhbakFkkDSf515oxxHoFKX2uekXxhaC-Ux41JUupV2RFEPtWRqJtZy4w5ozqI6jbHeVXI7LP_zHpYOGuULmTPK93QFpw13NYPzMPddw3UIRVMrgRQxivnBoS0TR4h_eyjkvDOmDeFijUb3cSIiCmxVk1M5S1rqBZGCnxiZ3evpByg-3YWaVjVOSCzNW4rCgFMAE&x-kcdn-pid=112757&pkey=AAXAHqkraVdXL-kd_qQmLBUx0arOSG4SaHfdeXdQqN5MCBxYZ4QHE_nMRaT_7H8WHOAkbT65kOvXwPx8qkIAOsrbUM980pOy5e_FSqUqJgc_1oYe5msfxxfxRU6wi85LgDw\"\r\n // }\r\n // ],\r\n \"element_list\": [\r\n {\r\n \"element_id\": 835266081714884677\r\n }\r\n ],\r\n \"resolution\": \"\",\r\n \"n\": 1,\r\n \"aspect_ratio\": \"\",\r\n \"callback_url\": \"\",\r\n \"external_task_id\": \"\"\r\n}"
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties: {}
headers: {}
x-apifox-name: 成功
security:
- bearer: []
x-apifox-folder: 可灵 Kling 平台/Omni-Image
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443236/apis/api-393418401-run
components:
schemas: {}
securitySchemes:
bearer:
type: http
scheme: bearer
servers:
- url: https://www.anyapi.vip
description: 正式环境
security:
- bearer: []