메인 콘텐츠로 건너뛰기

개요

이 엔드포인트는 Volc 스타일 Seedance 작업 구조를 이미 사용하는 팀을 위한 것입니다. 인증은 TokenLab Bearer API Key를 사용합니다. 반환되는 작업 ID는 cgt-로 시작하며, statussucceeded, failed, cancelled, expired 중 하나가 될 때까지 폴링하세요. Action 디스패처로 CreateContentsGenerationsTasks, GetContentsGenerationsTask, ListContentsGenerationsTasks, DeleteContentsGenerationsTasks를 호출할 수도 있습니다. ActionVersion은 대소문자를 구분하지 않습니다. Version은 생략할 수 있으며, 전달할 경우 2024-01-01이어야 합니다. 이 버전에서는 callback_url을 받지 않습니다. 완료 이벤트를 놓치지 않도록 작업 상태를 폴링하세요. 같이 보기 Seedance 2.0 비디오 모델비디오 생성.

콘텐츠 규칙

  • 프롬프트 텍스트에는 type=text를 사용합니다.
  • role 없는 type=image_url은 첫 프레임으로 처리되며, role=first_frame을 명시할 수도 있습니다.
  • role=last_frame은 첫 프레임과 함께만 사용할 수 있습니다.
  • 참조 미디어에는 role=reference_image, reference_video, reference_audio를 사용합니다.
  • 하나의 요청에서 첫/마지막 프레임 입력과 참조 미디어를 섞지 마세요.

파라미터 참고

  • ratio16:9, 4:3, 1:1, 3:4, 9:16, 21:9, adaptive를 허용합니다.
  • generate_audio 기본값은 true입니다. 무음 비디오가 필요하면 false를 전달하세요.
  • service_tier=default는 허용됩니다. Seedance 2.0 호환 작업은 service_tier=flex, frames, camera_fixed=true를 거부합니다.
  • 선택한 모델이 지원할 때 tools에는 { "type": "web_search" } 같은 객체를 전달할 수 있습니다. 잘못된 tool 항목은 무시하지 않고 거부합니다.

예시

curl https://api.tokenlab.sh/api/v3/contents/generations/tasks \
  -H "Authorization: Bearer $TOKENLAB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedance-2-0-260128",
    "content": [
      {"type": "text", "text": "A cinematic forest at sunset"},
      {"type": "image_url", "role": "reference_image", "image_url": {"url": "https://example.com/ref.png"}}
    ],
    "ratio": "16:9",
    "duration": 5,
    "resolution": "720p",
    "generate_audio": true
  }'