메인 콘텐츠로 건너뛰기
POST
/
kling
/
v1
/
images
/
generations
Multi-Image to Image
curl --request POST \
  --url https://api.cometapi.com/kling/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "subject_image_list": [
    {
      "subject_image": "https://filesystem.site/cdn/20250814/goDW44JIf6eSuxAS7TNringhWjO9kW.png"
    },
    {
      "subject_image": "https://filesystem.site/cdn/20250814/goDW44JIf6eSuxAS7TNringhWjO9kW.png"
    },
    {
      "subject_image": "https://filesystem.site/cdn/20250814/goDW44JIf6eSuxAS7TNringhWjO9kW.png"
    },
    {
      "subject_image": "https://filesystem.site/cdn/20250814/goDW44JIf6eSuxAS7TNringhWjO9kW.png"
    }
  ]
}
'
{
  "code": 123,
  "message": "<string>",
  "request_id": "<string>",
  "data": {
    "task_id": "<string>",
    "task_status": "<string>",
    "created_at": 123,
    "updated_at": 123
  }
}
여러 피사체 참조 이미지와 선택적인 장면 또는 스타일 참조를 바탕으로 Kling이 하나의 이미지를 생성하도록 하려면 이 엔드포인트를 사용하세요.

호출 전에 확인할 사항

  • subject_image_list에 2~4개의 이미지를 제공하세요
  • model_name: kling-v2를 사용하세요
  • 핵심 피사체 구성이 이미 잘 동작할 때만 scence_image 또는 style_image를 추가하세요
  • 이를 비동기 생성 경로로 간주하고 반환된 task id를 저장하세요

작업 흐름

1

이미지 생성 작업 제출

피사체 이미지 목록과 프롬프트(Prompt)를 전송한 뒤, 반환된 task id를 저장하세요.
2

작업 폴링

작업이 최종 상태에 도달할 때까지 Kling 이미지 조회 경로를 사용해 개별 조회를 계속 진행하세요.
3

결과 저장

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

인증

Authorization
string
header
필수

Bearer token authentication. Use your CometAPI key.

헤더

Content-Type
string

Content type of the request body.

본문

application/json

Kling Image Generation API request body definition

subject_image_list
object[]
필수

List of subject reference images. Minimum 2, maximum 4.

model_name
enum<string>
기본값:kling-v2

Model to use for multi-image generation.

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

Text prompt describing the desired output. Max 2500 characters.

scence_image
string

Optional scene reference image. Same format and size constraints as subject images.

style_image
string

Optional style reference image. Same format and size constraints as subject images.

n
integer
기본값:1

Number of images to generate.

aspect_ratio
enum<string>
기본값:16:9

Aspect ratio of the generated image (width:height).

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

Webhook URL for task status notifications. The server sends a callback when the task status changes.

external_task_id
string

Optional user-defined task ID for your own tracking. Does not replace the system-generated task ID. Must be unique per account.

응답

200 - application/json

Successful Response

code
integer

Error code; specifically define the error code

message
string

error message

request_id
string

Request ID, system-generated, for tracking requests, troubleshooting issues

data
object