> ## 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.

# Seedance 비디오 생성

> <ul><li>ElkAPI를 통해 Doubao Seedance 2.0 비디오 생성을 호출합니다.</li><li>비동기 작업 엔드포인트입니다. 제출 후 작업 ID를 반환합니다.</li><li>Seedance 공식 파라미터는 metadata에 넣어 그대로 전달하세요.</li></ul>

<RequestExample>
  ```bash cURL theme={null} theme={null}
  curl --request POST \
    --url 'https://api.elkapi.com/v1/video/generations' \
    --header 'Authorization: Bearer <token>' \
    --header 'Content-Type: application/json' \
    --data '{
      "model": "doubao-seedance-2-0-260128",
      "prompt": "1인칭 시점의 과일차 광고, 손으로 사과를 따고, 신선하게 자른 뒤 셰이크하고, 완성품 클로즈업, 영화적인 느낌, 높은 디테일",
      "metadata": {
        "duration": 8,
        "ratio": "16:9",
        "resolution": "720p",
        "generate_audio": true,
        "watermark": false
      }
    }'
  ```

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

  url = "https://api.elkapi.com/v1/video/generations"
  headers = {
      "Authorization": "Bearer <token>",
      "Content-Type": "application/json"
  }
  payload = {
      "model": "doubao-seedance-2-0-260128",
      "prompt": "1인칭 시점의 과일차 광고, 손으로 사과를 따고, 신선하게 자른 뒤 셰이크하고, 완성품 클로즈업, 영화적인 느낌, 높은 디테일",
      "metadata": {
          "duration": 8,
          "ratio": "16:9",
          "resolution": "720p",
          "generate_audio": True,
          "watermark": False
      }
  }

  response = requests.post(url, headers=headers, json=payload)
  print(response.json())
  ```

  ```javascript JavaScript theme={null} theme={null}
  const response = await fetch("https://api.elkapi.com/v1/video/generations", {
    method: "POST",
    headers: {
      "Authorization": "Bearer <token>",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      model: "doubao-seedance-2-0-260128",
      prompt: "1인칭 시점의 과일차 광고, 손으로 사과를 따고, 신선하게 자른 뒤 셰이크하고, 완성품 클로즈업, 영화적인 느낌, 높은 디테일",
      metadata: {
        duration: 8,
        ratio: "16:9",
        resolution: "720p",
        generate_audio: true,
        watermark: false
      }
    })
  });

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

<ResponseExample>
  ```json 200 theme={null} theme={null}
  {
    "id": "task_abc123",
    "task_id": "task_abc123",
    "object": "video",
    "model": "doubao-seedance-2-0-260128",
    "status": "queued",
    "progress": 0,
    "created_at": 1760000000
  }
  ```

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

## Authorizations

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

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

## Body

<ParamField body="model" type="string" required default="doubao-seedance-2-0-260128">
  Seedance 모델 ID입니다.

  사용 가능 값: `doubao-seedance-2-0-260128`, `doubao-seedance-2-0-fast-260128`
</ParamField>

<ParamField body="prompt" type="string" required>
  텍스트 프롬프트입니다. 현재 어댑터는 이 필드를 최종 `content` 텍스트 항목으로 업스트림에 전송합니다.
</ParamField>

<ParamField body="images" type="array<string>">
  이미지 URL 또는 Base64 문자열 배열입니다. `role`을 지정해야 하는 경우 `metadata.content` 사용을 권장합니다.
</ParamField>

<ParamField body="seconds" type="string">
  비디오 길이(초)입니다. 설정하면 `metadata.duration`을 덮어씁니다.
</ParamField>

<ParamField body="metadata" type="object">
  Seedance 업스트림으로 그대로 전달되는 파라미터 객체입니다. Seedance 공식 필드는 여기에 넣으세요.
</ParamField>

<ParamField body="metadata.duration" type="integer">
  비디오 길이입니다. Seedance 2.0은 일반적으로 `4`\~`15`초이며, 업스트림이 지원하면 `-1`도 전달할 수 있습니다.
</ParamField>

<ParamField body="metadata.ratio" type="string">
  비디오 화면비입니다.

  예시: `16:9`, `4:3`, `1:1`, `3:4`, `9:16`, `21:9`, `adaptive`
</ParamField>

<ParamField body="metadata.resolution" type="string">
  해상도입니다.

  예시: `480p`, `720p`, `1080p`
</ParamField>

<ParamField body="metadata.generate_audio" type="boolean">
  오디오 생성 여부입니다.
</ParamField>

<ParamField body="metadata.watermark" type="boolean">
  워터마크 추가 여부입니다.
</ParamField>

<ParamField body="metadata.seed" type="integer">
  랜덤 시드입니다.
</ParamField>

<ParamField body="metadata.content" type="array<object>">
  멀티모달 참고 콘텐츠입니다. `image_url`, `video_url`, `audio_url`을 지원합니다. 텍스트 내용은 최상위 `prompt`를 사용하세요.

  ```json theme={null}
  [
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.com/reference.png"
      },
      "role": "reference_image"
    },
    {
      "type": "video_url",
      "video_url": {
        "url": "https://example.com/reference.mp4"
      },
      "role": "reference_video"
    },
    {
      "type": "audio_url",
      "audio_url": {
        "url": "https://example.com/reference.mp3"
      },
      "role": "reference_audio"
    }
  ]
  ```
</ParamField>

## 멀티모달 예시

<RequestExample>
  ```bash cURL theme={null} theme={null}
  curl --request POST \
    --url 'https://api.elkapi.com/v1/video/generations' \
    --header 'Authorization: Bearer <token>' \
    --header 'Content-Type: application/json' \
    --data '{
      "model": "doubao-seedance-2-0-260128",
      "prompt": "전체 영상에서 참고 비디오의 1인칭 구도를 사용하고 참고 오디오를 배경음악으로 사용하여 과일차 광고를 생성합니다",
      "metadata": {
        "duration": 11,
        "ratio": "16:9",
        "generate_audio": true,
        "watermark": false,
        "content": [
          {
            "type": "image_url",
            "image_url": {
              "url": "https://example.com/first-frame.jpg"
            },
            "role": "reference_image"
          },
          {
            "type": "video_url",
            "video_url": {
              "url": "https://example.com/reference.mp4"
            },
            "role": "reference_video"
          },
          {
            "type": "audio_url",
            "audio_url": {
              "url": "https://example.com/music.mp3"
            },
            "role": "reference_audio"
          }
        ]
      }
    }'
  ```
</RequestExample>

## Response

<ResponseField name="id" type="string">
  ElkAPI가 반환한 공개 작업 ID입니다.
</ResponseField>

<ResponseField name="task_id" type="string">
  호환 필드입니다. 값은 `id`와 같습니다.
</ResponseField>

<ResponseField name="object" type="string">
  객체 유형이며 `video`로 고정됩니다.
</ResponseField>

<ResponseField name="model" type="string">
  요청에 사용된 모델입니다.
</ResponseField>

<ResponseField name="status" type="string">
  작업 상태입니다. 제출 성공 후 일반적으로 `queued`입니다.
</ResponseField>

<ResponseField name="created_at" type="integer">
  작업 생성 타임스탬프입니다.
</ResponseField>
