> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crazyrouter.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Kling 이미지 생성

> Kling API를 사용하여 이미지를 생성합니다

> 업데이트: 2026-06-06

# Kling 이미지 생성

```
POST /kling/v1/images/generations
```

현재 공개 문서는 Kling 이미지 생성의 주 경로만 보장합니다. 아직 공개적으로 모델링되지 않은 image-side 확장 필드를 이미 안정화된 고객 대상 contract로 잘못 작성하지 마십시오.

## 현재 검증된 범위

* `kling-v2-5-turbo` 이미지 생성은 bounded 검증이 완료됨
* 성공 결과는 우선적으로 Crazyrouter 아카이브 주소(예: `https://media.crazyrouter.com/...png`)를 반환

## 요청 파라미터

| 파라미터               | 타입      | 필수  | 설명                             |
| ------------------ | ------- | --- | ------------------------------ |
| `model`            | string  | 아니오 | 현재 일반적인 예시는 `kling-v2-5-turbo` |
| `prompt`           | string  | 예   | 이미지 설명 프롬프트                    |
| `negative_prompt`  | string  | 아니오 | 네거티브 프롬프트                      |
| `aspect_ratio`     | string  | 아니오 | 예: `1:1`, `16:9`, `9:16`       |
| `n`                | integer | 아니오 | 생성 수량, 기본값 `1`                 |
| `callback_url`     | string  | 아니오 | 콜백 주소                          |
| `external_task_id` | string  | 아니오 | 비즈니스 측 커스텀 작업 ID               |

## 요청 예시

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.crazyrouter.com/kling/v1/images/generations \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -d '{
      "model": "kling-v2-5-turbo",
      "prompt": "선글라스를 쓴 시바견, 사실적인 사진 스타일",
      "negative_prompt": "blurry, low quality",
      "aspect_ratio": "1:1",
      "n": 1
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.crazyrouter.com/kling/v1/images/generations",
      headers={
          "Content-Type": "application/json",
          "Authorization": "Bearer YOUR_API_KEY"
      },
      json={
          "model": "kling-v2-5-turbo",
          "prompt": "선글라스를 쓴 시바견, 사실적인 사진 스타일",
          "negative_prompt": "blurry, low quality",
          "aspect_ratio": "1:1",
          "n": 1
      }
  )

  print(response.json())
  ```
</CodeGroup>

## 제출 성공 응답 예시

```json theme={null}
{
  "created_at": 1774536039,
  "id": "2037177945839673344",
  "model": "kling-v2-5-turbo",
  "object": "video",
  "progress": 0,
  "status": "",
  "task_id": "2037177945839673344"
}
```

***

## 이미지 작업 조회

```
GET /kling/v1/images/generations/{task_id}
```

```bash cURL theme={null}
curl https://api.crazyrouter.com/kling/v1/images/generations/2037177945839673344 \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### 응답 예시 (완료됨)

```json theme={null}
{
  "code": "success",
  "message": "",
  "data": {
    "error": null,
    "format": "png",
    "metadata": null,
    "status": "succeeded",
    "task_id": "2037177945839673344",
    "url": "https://media.crazyrouter.com/task-artifacts/2026/03/26/50/imageGenerate/2037177945839673344.png"
  }
}
```

<Note>
  Kling 이미지 생성은 비동기 작업입니다. 제출 후 조회 인터페이스를 통해 최종 결과를 가져오시기 바랍니다. 이 페이지는 이미지-투-이미지, `image_fidelity` 등의 image-side 확장 파라미터를 공개된 고정 contract로 기술하지 않습니다.
</Note>
