본문으로 건너뛰기

Seedance Video

POST/api/v3/contents/generations/tasks

Seedance 비디오 작업을 제출합니다. 제출이 성공하면 HTTP 200과 SandBase 작업 id를 반환합니다.

요청 본문

stringmodel필수

지원되는 model 식별자: bytedance/seedance/2.0-official 또는 bytedance/seedance/2.5-official.

arraycontent필수

입력된 텍스트와 선택적 미디어 입력입니다. 항목 형태는 model에 의해 검증됩니다.

선택 사항<integer>duration

model에 변경 없이 전달됩니다. model 검증이 적용됩니다.

선택 사항<string>resolution

model에 변경 없이 전달됩니다. model 검증이 적용됩니다.

선택 사항<string>ratio

model에 변경 없이 전달됩니다. model 검증이 적용됩니다.

선택 사항<boolean>generate_audio

model에 변경 없이 전달됩니다. 지원되는 경우 생성된 오디오를 요청합니다.

Seedance 가이드 ​

Seedance는 텍스트, 시작 및 종료 프레임, 그리고 이미지, 비디오, 오디오 같은 멀티모달 참조로부터 비디오를 생성합니다. 간단한 텍스트-비디오 클립부터 시각적 주제, 카메라 움직임, 사운드트랙을 따르는 연출된 샷까지 모두에 사용할 수 있습니다.

생성은 비동기식입니다. 작업을 제출한 다음, terminal status에 도달할 때까지 폴링하세요.

모델 선택 ​

model가장 적합한 경우출력 해상도
bytedance/seedance/2.5-official1080p 제공 및 사용 가능한 최고 출력 해상도480p, 720p, 1080p
bytedance/seedance/2.0-official480p 또는 720p로 충분할 때 더 저렴한 생성480p, 720p

두 모델 모두 동일한 멀티모달 입력을 허용하며, 하나의 요청 형식에서 text-to-video, image-to-video, 멀티모달 참조 워크플로를 지원합니다. 480p 또는 720p로 필요를 충족하고 더 낮은 가격의 옵션을 원하면 2.0-official을 선택하세요. 1080p가 필요하면 2.5-official을 선택하세요.

API 참조 ​

MethodPath
POST/api/v3/contents/generations/tasks
GET/api/v3/contents/generations/tasks/{task_id}

작업 목록 조회와 작업 취소 또는 삭제는 지원되지 않습니다. 결과를 가져오려면 반환된 작업 id를 저장하세요.

각 요청은 작업을 생성할 때 사용한 것과 동일한 API key로 인증하세요:

Authorization: Bearer $SANDBASE_API_KEY

model 값은 모델 선택의 이름 중 하나와 일치해야 합니다. 폴링이 결과를 받는 지원되는 방법입니다. 이 endpoint에서는 callback_url에 의존하지 마세요.

빠른 시작 ​

작업을 제출하세요:

bash
curl -X POST https://api.sandbase.ai/api/v3/contents/generations/tasks \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "bytedance/seedance/2.5-official",
    "content": [
      {"type": "text", "text": "A slow cinematic push across an alpine lake at sunrise"}
    ],
    "ratio": "16:9",
    "resolution": "720p",
    "duration": 5,
    "generate_audio": true
  }'
json
{ "id": "158d2649-e01d-45b9-b88a-ef3c450c601c" }

status가 succeeded, failed, expired, 또는 cancelled가 될 때까지 5초에서 10초마다 해당 id로 작업을 폴링하세요:

bash
curl https://api.sandbase.ai/api/v3/contents/generations/tasks/158d2649-e01d-45b9-b88a-ef3c450c601c \
  -H "Authorization: Bearer $SANDBASE_API_KEY"
json
{
  "id": "158d2649-e01d-45b9-b88a-ef3c450c601c",
  "model": "bytedance/seedance/2.5-official",
  "status": "succeeded",
  "created_at": 1787059000,
  "updated_at": 1787059150,
  "content": { "video_url": "https://media.sandbase.ai/files/158d2649.../0.mp4" },
  "usage": { "completion_tokens": 108900, "total_tokens": 108900 }
}

생성된 비디오는 content.video_url에서 사용할 수 있습니다.

입력 워크플로 선택 ​

API는 7가지 일반적인 입력 워크플로를 지원합니다. content의 각 항목에는 type이 있으며, 항목 유형과 역할의 조합이 워크플로를 선택합니다:

목표content 조합다음과 같은 경우에 사용
텍스트를 비디오로Text장면을 프롬프트만으로 완전히 설명할 수 있을 때
시작 프레임 애니메이션Text (optional) + first_frame이 있는 image첫 프레임이 제공된 이미지와 일치해야 할 때
두 프레임 사이 전환Text (optional) + first_frame + last_frame샷에 제어된 시작과 끝이 필요할 때
시각적 참조 따르기Text (optional) + reference_image가 있는 image주제, 제품, 의상, 또는 시각적 스타일이 알아볼 수 있게 유지되어야 할 때
움직임 또는 카메라 언어 따르기Text (optional) + reference_video가 있는 video움직임, 타이밍, 편집 리듬, 또는 카메라 움직임을 참조 클립에서 가져와야 할 때
오디오 참조 추가Text/image/video + reference_audio가 있는 audio대사, 음악, 목소리, 또는 사운드 디자인이 결과를 안내해야 할 때
전체 멀티모달 연출Text + image + video + audio references서로 다른 자산이 한 샷에서 외형, 움직임, 사운드를 제어할 때

오디오는 단독으로 사용할 수 없습니다. 오디오 항목이 포함된 모든 요청에는 최소 하나의 text, image, 또는 video 항목도 포함되어야 합니다.

Content 항목 형태 ​

json
{ "type": "text", "text": "A puppy running across a sunlit lawn" }
json
{ "type": "image_url", "image_url": { "url": "https://example.com/ref.jpg" }, "role": "reference_image" }
json
{ "type": "video_url", "video_url": { "url": "https://example.com/ref.mp4" }, "role": "reference_video" }
json
{ "type": "audio_url", "audio_url": { "url": "https://example.com/bgm.mp3" }, "role": "reference_audio" }

role은 모델이 자산을 어떻게 사용해야 하는지 알려줍니다:

Assetrole효과
Imagefirst_frame이미지를 시작 프레임으로 사용
Imagelast_frame이미지를 종료 프레임으로 사용; 같은 요청에 first_frame을 포함하세요
Imagereference_image주제, 구도, 제품, 의상, 또는 시각적 스타일을 참조
Videoreference_video움직임, 카메라 워크, 타이밍, 또는 편집 리듬을 참조
Audioreference_audio목소리, 대사, 음악, 또는 사운드 디자인을 참조

Image 항목은 공개 URL 또는 인라인 data:image/...;base64,... 값을 허용합니다. Video 및 audio 참조는 모델이 다운로드할 수 있는 공개 URL을 사용해야 합니다.

어떤 video_url 항목이든 포함하면 요청은 video-to-video 모드가 되며, 이는 token rate를 변경합니다. 청구를 참조하세요.

일반적인 레시피 ​

아래 예시는 request body를 보여줍니다. 빠른 시작에 표시된 create-task endpoint로 아무거나 전송하세요.

첫 프레임 애니메이션 ​

json
{
  "model": "bytedance/seedance/2.5-official",
  "content": [
    {"type": "text", "text": "The woman slowly looks up and smiles as the camera gently pushes in"},
    {"type": "image_url", "image_url": {"url": "https://example.com/first-frame.jpg"}, "role": "first_frame"}
  ],
  "ratio": "adaptive",
  "resolution": "720p",
  "duration": 5,
  "generate_audio": true
}

첫 프레임에서 마지막 프레임으로 전환 만들기 ​

json
{
  "model": "bytedance/seedance/2.5-official",
  "content": [
    {"type": "text", "text": "A smooth transition from a bright afternoon into a neon-lit night"},
    {"type": "image_url", "image_url": {"url": "https://example.com/first-frame.jpg"}, "role": "first_frame"},
    {"type": "image_url", "image_url": {"url": "https://example.com/last-frame.jpg"}, "role": "last_frame"}
  ],
  "ratio": "adaptive",
  "resolution": "720p",
  "duration": 6
}

image, video, audio 참조로 샷 연출하기 ​

bash
curl -X POST https://api.sandbase.ai/api/v3/contents/generations/tasks \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "bytedance/seedance/2.5-official",
    "content": [
      {"type": "text", "text": "First-person fruit tea commercial, camera pushes in on the layered foam"},
      {"type": "image_url", "image_url": {"url": "https://example.com/ref.jpg"}, "role": "reference_image"},
      {"type": "video_url", "video_url": {"url": "https://example.com/ref.mp4"}, "role": "reference_video"},
      {"type": "audio_url", "audio_url": {"url": "https://example.com/bgm.mp3"}, "role": "reference_audio"}
    ],
    "ratio": "16:9",
    "resolution": "1080p",
    "duration": 11
  }'

프롬프트를 사용해 각 참조에 명확한 역할을 할당하세요. 예를 들어, “이미지의 제품 외형을 유지하고, video의 카메라 움직임을 사용하며, audio의 페이싱을 따르세요.”라고 지시하는 것이, 모든 자산이 전체 결과를 제어하도록 요청하는 것보다 더 안정적입니다.

효과적인 프롬프트 작성 ​

실용적인 프롬프트는 보통 다음 순서를 따릅니다:

  1. Subject — 샷에 등장하는 대상이 누구 또는 무엇인지.
  2. Action — 무엇이 변하거나 움직이는지.
  3. Scene — 장소, 시간대, 날씨, 주변 세부 사항.
  4. Visual style — 시네마틱, 다큐멘터리, 제품 광고, 애니메이션 등.
  5. Camera — 구도, 렌즈 느낌, 카메라 움직임, 컷.
  6. Sound — generate_audio가 활성화되어 있을 때의 대사, 앰비언스, 음악, 또는 효과음.

무엇이 안정적으로 유지되어야 하는지 명확하게 적으세요. 예를 들어: “제품 라벨은 읽을 수 있게 유지되고, 카메라는 한 번 천천히 push-in하며, 장면 전환은 없고, 자연스러운 room tone.” 여러 참조가 있을 때는 각 참조에서 어떤 시각적 또는 동작 품질을 가져올지 설명하세요.

출력 옵션 ​

매개변수TypeDefaultValues
resolutionstring720p480p, 720p, 1080p. 2.0-official does not support 1080p
ratiostringadaptive16:9, 9:16, 4:3, 3:4, 1:1, 21:9, adaptive. adaptive chooses a ratio from the input and prompt
durationinteger54 to 15 seconds, or -1 to let the model choose within the supported range
generate_audiobooleantrue동기화된 음성, 효과음, 배경 음악을 생성
seedinteger-1-1 to 2^32-1. The same prompt and seed produce similar, not identical, output
watermarkbooleanfalse오른쪽 아래 모서리에 AI 생성 워터마크 추가
toolsarray[][{"type": "web_search"}] enables web search while planning the shot

작업 제어 ​

매개변수TypeDefaultNotes
execution_expires_afterinteger172800Task timeout in seconds, from 3600 to 259200. A task past this becomes expired
service_tierstringdefaultThese models do not support flex
safety_identifierstring—최대 64자까지의 불투명한 최종 사용자 식별자. 원시 개인 데이터가 아니라 해시를 보내세요

프레임 크기 ​

resolution and ratio together determine the pixel dimensions:

Resolution16:99:164:33:41:121:9
480p864×496496×864752×560560×752640×640992×432
720p1280×720720×12801112×834834×1112960×9601470×630
1080p1920×10801080×19201664×12481248×16641440×14402206×946

작업 상태 ​

status의미수행할 작업
queuedAccepted, waiting to start5초에서 10초마다 계속 폴링
runningGenerating계속 폴링
succeededDoneDownload content.video_url
failed콘텐츠 검토에서 거부되었거나, 모델에서 오류가 발생함error.message를 읽으세요. 다시 시도하기 전에 프롬프트를 조정하세요
expiredRan past execution_expires_after다시 제출하세요
cancelledEnded before generation started다시 제출하세요

작업 필드 ​

필드TypeNotes
idstring제출 시 반환된 작업 id
modelstring전달한 model 값
statusstring위 참조
created_atintegerUnix seconds
updated_atintegerUnix seconds. 작업이 완료될 때까지 created_at과 동일함
contentobject작업이 성공할 때까지 비어 있음. 생성된 video_url을 포함함
usageobject토큰 수. Billing 참조
errorobjectfailed 및 expired에서 존재함. code와 message를 포함함

Python 전체 흐름 ​

python
import os
import time

import requests

BASE_URL = "https://api.sandbase.ai/api/v3/contents/generations/tasks"
HEADERS = {
    "Authorization": f"Bearer {os.environ['SANDBASE_API_KEY']}",
    "Content-Type": "application/json",
}

task = requests.post(
    BASE_URL,
    headers=HEADERS,
    json={
        "model": "bytedance/seedance/2.5-official",
        "content": [
            {
                "type": "text",
                "text": "A quiet shoreline at sunrise, gentle waves, one slow camera push-in",
            }
        ],
        "ratio": "16:9",
        "resolution": "720p",
        "duration": 5,
        "generate_audio": True,
    },
)
task.raise_for_status()
task_id = task.json()["id"]

while True:
    time.sleep(8)
    result = requests.get(f"{BASE_URL}/{task_id}", headers=HEADERS)
    result.raise_for_status()
    data = result.json()
    print(data["status"])

    if data["status"] == "succeeded":
        print(data["content"]["video_url"])
        break
    if data["status"] in {"failed", "expired", "cancelled"}:
        raise RuntimeError(data.get("error", {"message": data["status"]}))

Billing ​

These models bill on usage.completion_tokens, which the task reports when it finishes. The token rate depends on two dimensions:

  • Whether the input includes video. Video-to-video requests, meaning any content item of type video_url, bill at a lower rate than text-to-video.
  • Output resolution. For 2.5-official, 1080p bills higher than 480p and 720p. The 2.0-official rate does not vary by resolution.

usage reports completion_tokens and total_tokens, which are currently equal. It is empty while the task is running. See your account history for actual charges, and the pricing guide for current rates.

오류 ​

An invalid request returns an error immediately. A generation-time error appears in the task after polling. Both use an error object with a machine-readable code and a human-readable message:

json
{ "error": { "code": "InvalidParameter", "message": "model is required", "type": "BadRequest" } }
HTTPcodetype
400InvalidParameterBadRequest
401AuthenticationErrorUnauthorized
403PermissionDeniedForbidden
404ResourceNotFoundNotFound
429RateLimitExceededTooManyRequests
500InternalServiceErrorInternalServerError
503InternalServiceErrorServiceUnavailable

Common recovery steps:

ResultWhat to try
400 InvalidParameter모델 이름, 필수 콘텐츠, 역할, resolution, duration, asset URLs를 확인하세요
Task status failed with a content-review error다시 제출하기 전에 프롬프트를 다시 작성하거나 플래그가 지정된 참조 에셋을 교체하세요
Task status expired새 작업을 제출하세요. 고해상도 또는 긴 클립의 경우 더 긴 execution_expires_after를 고려하세요
429 RateLimitExceeded귀하의 조직이 비디오 동시성 한도 또는 분당 한도에 도달했습니다. Concurrency limits를 참조하세요. 실행 중인 작업이 끝날 때까지 기다리거나 지수 백오프로 다시 시도하세요
503 ServiceUnavailable잠시 후 같은 요청을 다시 시도하세요

등록된 미디어 Asset 사용 ​

SandBase는 /v1/assets에서 공식 호환 Asset 프로토콜을 제공합니다. Asset 요청과 반환되는 asset:// 참조는 공식 프로토콜을 따르며, 해당 참조는 네이티브 ByteDance Contents Generations 요청에서 변경 없이 그대로 전달됩니다. bytedance/seedance/2.5-official과 bytedance/seedance/2.0-official 둘 다 일반적으로 공용 HTTP(S) URL을 허용하는 곳에서 이 참조를 허용합니다.

전체 워크플로는 다음과 같습니다:

  1. POST /v1/assets로 접근 가능한 미디어 URL을 등록합니다.
  2. 제공자가 Asset을 사용할 수 있다고 보고할 때까지 GET /v1/assets/{external_id}를 조회합니다.
  3. 반환된 asset_url을 Seedance content 항목에 넣고 생성 작업을 제출합니다.

공식 호환 Asset 작업 ​

MethodPath목적
POST/v1/assets접근 가능한 미디어 URL을 등록하고 공식 호환 asset:// 참조를 받음
GET/v1/assets/{external_id}제공자 상태를 읽고 현재 미리보기/다운로드 URL을 प्राप्त함

공개 API는 현재 등록과 조회만 제공합니다. Asset 그룹, 목록 조회, 이름 변경, 업데이트, 삭제는 공개 작업이 아닙니다. Asset은 API 키와 연결된 조직에 속합니다.

1단계: Asset 등록 ​

접근 가능한 URL을 POST /v1/assets로 전송합니다. asset_type은 대소문자를 구분하며 Image, Video, 또는 Audio여야 합니다:

bash
curl -X POST https://api.sandbase.ai/v1/assets \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/product-reference.png",
    "asset_type": "Image",
    "name": "Product reference"
  }'

응답에서 asset_url을 저장합니다:

json
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "asset_url": "asset://asset-20260710150403-hx4hf",
  "asset_type": "Image",
  "name": "Product reference",
  "created_at": "2026-07-10T15:04:03Z"
}

asset:// 뒤의 값이 공식 호환 조회 작업에서 사용되는 external_id입니다.

2단계: 준비 상태 확인 ​

asset:// 접두사 없이 external_id로 Asset을 조회합니다:

bash
curl https://api.sandbase.ai/v1/assets/asset-20260710150403-hx4hf \
  -H "Authorization: Bearer $SANDBASE_API_KEY"
json
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "external_id": "asset-20260710150403-hx4hf",
  "asset_url": "asset://asset-20260710150403-hx4hf",
  "status": "Active",
  "asset_type": "Image",
  "name": "Product reference",
  "download_url": "https://media.example.com/current-signed-url",
  "created_at": "2026-07-10T15:04:03Z"
}

status는 완전한 enum이 아니라 개방형 제공자 값으로 취급하세요. 생성 작업을 제출하기 전에 제공자가 사용 가능한 상태를 보고할 때까지 기다립니다. 일반적인 준비 완료 값은 Active입니다. download_url은 제공자가 관리하며 처리 중에는 비어 있을 수 있습니다. 현재 미리보기 URL이 필요하면 Asset을 다시 조회하세요. Seedance 요청에서는 download_url을 복사하지 말고 지속적인 asset_url을 계속 사용하세요.

3단계: Asset과 함께 생성 ​

미디어 유형에 맞는 URL 필드에 asset_url을 넣습니다. 이 예시는 등록된 이미지를 시각적 참조로 사용합니다:

bash
curl -X POST https://api.sandbase.ai/api/v3/contents/generations/tasks \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "bytedance/seedance/2.5-official",
    "content": [
      {
        "type": "text",
        "text": "Create a cinematic product shot. Keep the bottle shape and label from the reference image."
      },
      {
        "type": "image_url",
        "image_url": {"url": "asset://asset-20260710150403-hx4hf"},
        "role": "reference_image"
      }
    ],
    "ratio": "16:9",
    "resolution": "1080p",
    "duration": 5,
    "generate_audio": true
  }'

생성 응답은 작업 id를 반환합니다. 선택한 모델 페이지에 설명된 대로 GET /api/v3/contents/generations/tasks/{task_id}를 폴링합니다.

content 항목과 role 선택 ​

Asset typecontent[].typeURL fieldSupported role용도
Imageimage_urlimage_url.urlfirst_frame이 정확한 프레임에서 비디오를 시작
Imageimage_urlimage_url.urllast_frame이 프레임에서 종료; 같은 요청에 first_frame을 포함
Imageimage_urlimage_url.urlreference_image피사체, 제품, 구도, 의상, 또는 시각 스타일 유지
Videovideo_urlvideo_url.urlreference_video움직임, 타이밍, 카메라 워크, 또는 편집 리듬 따르기
Audioaudio_urlaudio_url.urlreference_audio음성, 대화, 음악, 또는 사운드 디자인 따르기

Audio는 단독 입력일 수 없습니다. reference_audio Asset을 텍스트, 이미지, 또는 비디오와 결합하세요. video_url을 포함하는 모든 요청은 video-to-video 요금이 적용됩니다.

비디오 Asset 예시 ​

json
{
  "type": "video_url",
  "video_url": {"url": "asset://asset-20260710150403-video1"},
  "role": "reference_video"
}

오디오 Asset 예시 ​

json
{
  "type": "audio_url",
  "audio_url": {"url": "asset://asset-20260710150403-audio1"},
  "role": "reference_audio"
}

직접 URL 또는 asset:// 참조? ​

Input가장 적합한 경우Trade-off
Public HTTP(S) URL미디어가 이미 호스팅되어 있고 한 번만 사용됨가장 빠른 경로지만, 작업 제출 및 제공자 fetch 동안 URL이 계속 접근 가능해야 함
asset:// reference공식 Asset 프로토콜을 통해 미디어를 재사용함등록/준비 상태 확인 단계가 추가되지만, 이후 Seedance 작업에 사용할 지속적인 참조를 제공함

요청 파라미터, 폴링, 작업 상태, 요금은 위의 Seedance 가이드를 참조하세요.

공식 ByteDance 리소스 ​