Kling Omni 이미지 작업 생성
CometAPI POST /kling/v1/images/omni-image를 사용해 프롬프트와 참조 이미지 입력으로 Kling Omni Image 작업을 생성합니다.
task_id를 반환하며, 생성된 이미지 URL을 사용할 수 있을 때까지 Kling Omni 이미지 작업 조회를 사용해 작업을 폴링하세요.
요청 형태 선택
- 단일 이미지 생성:
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>>>처럼 지정합니다.
작업 흐름
작업 생성
POST /kling/v1/images/omni-image를 제출하고 반환된 data.task_id를 저장합니다.작업 조회
data.task_status가 succeed 또는 failed가 될 때까지 GET /kling/v1/images/omni-image/를 폴링합니다.이미지 저장
data.task_result.images[].url을 자체 스토리지에 복사합니다.결과 필드
성공적인 쿼리 응답은 생성된 이미지를data.task_result.images 아래에 반환합니다. 각 항목에는 다음이 포함될 수 있습니다:
인증
Bearer token authentication. Use your CometAPI API key.
헤더
Must be application/json.
본문
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.
Optional model ID for this Omni Image request. Omit this field to use the route default.
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.
Requested output resolution. Use 1k, 2k, or 4k; omitted requests use 1k.
1k, 2k, 4k Use single for a single-image task.
single Number of single-image results to generate. Range: 1 to 9.
1 <= x <= 9Requested 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 options. When enabled is true, the task can return watermarked result URLs in addition to the original result URLs.
Webhook URL that receives task status notifications when the task status changes. Omit this field to poll manually.
User-defined task ID for your own tracking. It does not replace the system-generated task_id and must be unique per account.