Skip to main content
POST
cURL
이 엔드포인트를 사용하면 CometAPI를 통해 비동기 Kling Omni Image 작업을 생성할 수 있습니다. 생성 요청은 task_id를 반환하며, 생성된 이미지 URL을 사용할 수 있을 때까지 Kling Omni 이미지 작업 조회를 사용해 작업을 폴링하세요.
전체 provider 파라미터 참조는 Kling Image O1 문서를 확인하세요.

요청 형태 선택

  • 단일 이미지 생성: prompt, image_list, resolution, result_type: single, n, aspect_ratio를 전송합니다
  • 워터마크 출력: 쿼리 응답에서 워터마크가 포함된 결과 URL이 필요하면 watermark_info.enabled: true를 추가합니다
  • Model ID: 라우트 기본값을 사용하려면 model_name을 생략하고, kling-image-o1 또는 kling-v3-omni 같은 검증된 Omni Image model ID를 전송할 수도 있습니다
참조 이미지는 image_list 항목의 image 필드를 사용합니다. 프롬프트에서는 인덱스로 이를 참조할 수 있으며, 예를 들어 첫 번째 항목은 <<<image_1>>>, 두 번째 항목은 <<<image_2>>>처럼 지정합니다.

작업 흐름

1

작업 생성

POST /kling/v1/images/omni-image를 제출하고 반환된 data.task_id를 저장합니다.
2

작업 조회

data.task_statussucceed 또는 failed가 될 때까지 GET /kling/v1/images/omni-image/를 폴링합니다.
3

이미지 저장

작업이 성공하면 장기적으로 접근해야 하는 경우 data.task_result.images[].url을 자체 스토리지에 복사합니다.
전체 응답 스키마와 폴링 예시는 Kling Omni 이미지 작업 조회를 참고하세요. 다음의 짧은 예시는 하나의 작업이 종료 상태에 도달할 때까지 폴링합니다:

결과 필드

성공적인 쿼리 응답은 생성된 이미지를 data.task_result.images 아래에 반환합니다. 각 항목에는 다음이 포함될 수 있습니다: 생성된 asset URL은 만료되거나 provider 서비스에서 삭제될 수 있습니다. 워크플로에서 장기 보관이 필요하다면 완료된 이미지를 자체 스토리지 계층에 저장하세요.

인증

Authorization
string
header
필수

Bearer token authentication. Use your CometAPI API key.

헤더

Content-Type
string

Must be application/json.

본문

application/json
prompt
string
필수

Text prompt for the generated image. The prompt can reference images with <<<image_1>>>, <<<image_2>>>, and matching indexes from image_list. Maximum length is 2,500 characters.

model_name
string

Optional model ID for this Omni Image request. Omit this field to use the route default.

image_list
object[]

Reference images that the prompt can cite with <<<image_1>>>, <<<image_2>>>, and so on. Keep the total number of reference images within the provider limits for the selected model.

resolution
enum<string>
기본값:1k

Requested output resolution. Use 1k, 2k, or 4k; omitted requests use 1k.

사용 가능한 옵션:
1k,
2k,
4k
result_type
enum<string>
기본값:single

Use single for a single-image task.

사용 가능한 옵션:
single
n
integer
기본값:1

Number of single-image results to generate. Range: 1 to 9.

필수 범위: 1 <= x <= 9
aspect_ratio
enum<string>
기본값:auto

Requested output aspect ratio in width:height format. Use auto to let the provider choose from the prompt and references.

사용 가능한 옵션:
16:9,
9:16,
1:1,
4:3,
3:4,
3:2,
2:3,
21:9,
auto
watermark_info
object

Watermark options. When enabled is true, the task can return watermarked result URLs in addition to the original result URLs.

callback_url
string<uri>

Webhook URL that receives task status notifications when the task status changes. Omit this field to poll manually.

external_task_id
string

User-defined task ID for your own tracking. It does not replace the system-generated task_id and must be unique per account.

응답

200 - application/json

Task accepted.

code
integer
필수

Response code. 0 means the task request was accepted.

message
string
필수

Response message.

data
object
필수
request_id
string

Request identifier returned by CometAPI when present.