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

# Kling 이미지-비디오

> <ul><li>Kling 모델로 이미지에서 비디오를 생성합니다.</li><li>image 파라미터로 이미지 URL 또는 Base64 인코딩 이미지 데이터를 전달할 수 있습니다.</li></ul>

<RequestExample>
  ```bash cURL theme={null} theme={null}
  curl --request POST \
    --url 'https://api.elkapi.com/kling/v1/videos/image2video' \
    --header 'Authorization: Bearer <token>' \
    --header 'Content-Type: application/json' \
    --data '{
    "model": "kling-v3",
    "prompt": "햇살이 비치는 정원에서 달리는 작은 고양이, 영화적인 느낌, 높은 디테일",
    "image": "https://example.com/image.png",
    "duration": 5,
    "response_format": "json",
    "metadata": {}
  }'
  ```

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

  url = "https://api.elkapi.com/kling/v1/videos/image2video"
  headers = {
      "Authorization": "Bearer <token>"
  }
  headers["Content-Type"] = "application/json"
  payload = {
      "model": "kling-v3",
      "prompt": "햇살이 비치는 정원에서 달리는 작은 고양이, 영화적인 느낌, 높은 디테일",
      "image": "https://example.com/image.png",
      "duration": 5,
      "response_format": "json",
      "metadata": {}
  }

  response = requests.request("POST", url, headers=headers, json=payload)
  print(response.json())
  ```

  ```javascript JavaScript theme={null} theme={null}
  const url = "https://api.elkapi.com/kling/v1/videos/image2video";

  const headers = {
    "Authorization": "Bearer <token>"
  };
  headers["Content-Type"] = "application/json";
  const payload = {
    "model": "kling-v3",
    "prompt": "햇살이 비치는 정원에서 달리는 작은 고양이, 영화적인 느낌, 높은 디테일",
    "image": "https://example.com/image.png",
    "duration": 5,
    "response_format": "json",
    "metadata": {}
  };

  const response = await fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(payload)
  });

  console.log(await response.json());
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null} theme={null}
  {
    "task_id": "task_1234567890",
    "status": "queued"
  }
  ```

  ```json 400 theme={null} theme={null}
  {
    "error": {
      "message": "message",
      "type": "type",
      "param": "param",
      "code": "code"
    }
  }
  ```
</ResponseExample>

## Authorizations

<ParamField header="Authorization" type="string" required>
  모든 엔드포인트는 Bearer Token 인증이 필요합니다.

  요청 헤더에 추가하세요:

  ```
  Authorization: Bearer YOUR_API_KEY
  ```
</ParamField>

## Body

<ParamField body="model" type="string" default="kling-v3">
  모델/스타일 ID

  예시: `kling-v3`
</ParamField>

<ParamField body="prompt" type="string">
  텍스트 프롬프트

  예시: `우주비행사가 일어나 걸어갔습니다`
</ParamField>

<ParamField body="image" type="string">
  이미지 입력(URL 또는 Base64)

  예시: `https://example.com/image.jpg`
</ParamField>

<ParamField body="duration" type="number">
  비디오 길이(초)

  예시: `5`
</ParamField>

<ParamField body="width" type="integer">
  비디오 너비

  예시: `1280`
</ParamField>

<ParamField body="height" type="integer">
  비디오 높이

  예시: `720`
</ParamField>

<ParamField body="fps" type="integer">
  비디오 프레임레이트

  예시: `30`
</ParamField>

<ParamField body="seed" type="integer">
  랜덤 시드

  예시: `20231234`
</ParamField>

<ParamField body="n" type="integer">
  생성할 비디오 수

  예시: `1`
</ParamField>

<ParamField body="response_format" type="string">
  응답 형식

  예시: `url`
</ParamField>

<ParamField body="user" type="string">
  사용자 식별자

  예시: `user-1234`
</ParamField>

<ParamField body="metadata" type="object">
  확장 파라미터(예: negative\_prompt, style, quality\_level 등)
</ParamField>

## Response

<ResponseField name="task_id" type="string">
  작업 ID

  예시: `abcd1234efgh`
</ResponseField>

<ResponseField name="status" type="string">
  작업 상태

  예시: `queued`
</ResponseField>
