Skip to main content
POST
cURL
여러 개의 피사체 참조 이미지와 선택적인 장면 또는 스타일 참조를 바탕으로 Kling이 하나의 이미지를 생성하게 하려면 이 엔드포인트를 사용하세요.

호출 전에 확인할 사항

  • subject_image_list에 1~4개의 이미지를 제공합니다
  • 새 요청에는 model_name: kling-v2-1을 사용합니다
  • 핵심 피사체 구성이 이미 잘 작동할 때만 scene_image 또는 style_image를 추가합니다
  • 이를 비동기 생성 경로로 보고, 반환된 작업 id를 저장합니다

작업 흐름

1

이미지 생성 작업 제출

피사체 이미지 목록과 프롬프트를 전송한 뒤, 반환된 작업 id를 저장합니다.
2

작업 폴링

작업이 종료 상태에 도달할 때까지 해당 Kling 이미지 조회 경로로 반환된 작업을 폴링합니다.
3

결과 저장

지속적으로 접근해야 한다면 생성된 이미지를 자체 스토리지에 저장합니다.
전체 파라미터 참조는 공식 Kling 문서를 확인하세요.

인증

Authorization
string
header
필수

Bearer token authentication. Use your CometAPI key.

헤더

Content-Type
string
기본값:application/json

Must be application/json.

본문

application/json
subject_image_list
object[]
필수

Subject reference images. Minimum 1, maximum 4.

Required array length: 1 - 4 elements
model_name
enum<string>
기본값:kling-v2

Model to use for multi-image generation. Use kling-v2-1 for new requests; omitting the field uses the legacy route default.

사용 가능한 옵션:
kling-v2,
kling-v2-1
prompt
string

Text prompt describing the desired output. Maximum 2500 characters.

negative_prompt
string

Elements to exclude from the image. Maximum 2500 characters.

scene_image
string

Optional scene reference image. Image URL or raw Base64 string without a data: prefix. Supported formats: JPG, JPEG, PNG. Maximum 10 MB, minimum 300x300 px, aspect ratio between 1:2.5 and 2.5:1.

style_image
string

Optional style reference image. Image URL or raw Base64 string without a data: prefix. Supported formats: JPG, JPEG, PNG. Maximum 10 MB, minimum 300x300 px, aspect ratio between 1:2.5 and 2.5:1.

n
integer
기본값:1

Number of images to generate. Range: 1-9.

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

Aspect ratio of the generated image.

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

Watermark options.

callback_url
string

Webhook URL for task status notifications.

external_task_id
string

Optional user-defined task ID for your own tracking. Must be unique per account.

응답

200 - application/json

Task request accepted or an error response returned by the API.

code
필수

Response code. 0 means the task request was accepted.

message
string
필수

Response message.

data
object
필수
request_id
string

Request identifier returned when present.