Kling Omni 이미지 작업 생성
CometAPI POST /kling/v1/images/omni-image를 사용하여 프롬프트(Prompt) 및 참조 이미지 입력으로 Kling Omni Image 작업을 생성합니다.
task_id를 반환합니다. 이를 사용해 Kling Omni 이미지 작업 가져오기 를 호출하여 생성된 이미지 URL을 사용할 수 있을 때까지 작업을 폴링합니다.
요청 형식 선택
- 단일 이미지 생성:
prompt,image_list,resolution,result_type: single,n,aspect_ratio를 전송합니다. - 워터마크 출력: 쿼리 응답에서 워터마크가 있는 결과 URL이 필요한 경우
watermark_info.enabled: true를 추가합니다. - 모델 ID: 경로 기본값을 사용하려면
model_name를 생략하거나,kling-image-o1또는kling-v3-omni같은 테스트된 Omni Image 모델 ID를 전송합니다.
image_list 항목을 사용하며 각 항목에는 image 필드가 있습니다. 프롬프트(Prompt)에서 인덱스로 이를 참조할 수 있으며, 첫 번째 항목에는 <<<image_1>>>, 두 번째 항목에는 <<<image_2>>>처럼 지정합니다.
작업 흐름
작업 생성
POST /kling/v1/images/omni-image을 제출하고 반환된 data.task_id를 저장합니다.작업 조회
data.task_status가 succeed 또는 failed가 될 때까지 폴링합니다.이미지 저장
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.