TokenHub 통합 API를 통해 ByteDance Seedance 2.0 비디오 생성 model에 접근할 수 있습니다. 텍스트-비디오, 이미지-비디오, 비디오 편집, 오디오 기반 생성 등을 지원합니다. 이 가이드는 전체 통합 과정을 안내합니다.
th-xxxxxxxxxxxx...)https://tokenhub.store/api/v1모든 요청은 헤더에 API Key가 필요합니다:
Authorization: Bearer th-your-api-keyPOST/videos/generations비디오 생성 작업을 만들며, task ID를 반환합니다
GET/videos/generations/{task_id}작업 상태를 조회하며, 성공 시 video URL을 반환합니다
| 모델 ID | 해상도 | 출력 요금 | 설명 |
|---|---|---|---|
| doubao-seedance-2.0 | 720p | $0.20/s | 플래그십 model, 최고 품질 |
| 480p | $0.12/s | 표준 품질, 비용 효율적 | |
| doubao-seedance-2.0-fast | 720p | $0.16/s | 고속 model, 더 빠른 생성 |
| 480p | $0.10/s | 가장 저렴한 옵션 |
청구 세부정보:
예: doubao-seedance-2.0 (720p), 5초 입력 video + 10초 출력 → 비용 = (5+10)×$0.20 = $3.00
| 파라미터 | 타입 | 필수 여부 | 설명 |
|---|---|---|---|
| model | string | 필수 | Model ID, 예: "doubao-seedance-2.0" |
| prompt | string | 필수 | video 설명 텍스트. 일반적으로 영어 프롬프트가 더 좋은 결과를 냅니다 |
| duration | number | 선택 | video 길이(초), 범위 4–15, 기본값 5 |
| resolution | string | 선택 | "480p" 또는 "720p" (기본값 720p) |
| aspect_ratio | string | 선택 | 화면 비율: "adaptive" (기본값), "16:9", "9:16", "1:1" 등 |
| image_url | string | 선택 | 참조 이미지 URL (image-to-video) |
| image_urls | string[] | 선택 | 여러 참조 이미지 URL 배열 |
| video_url | string | 선택 | 참조 video URL (video editing / video-to-video) |
| video_urls | string[] | 선택 | 여러 참조 video URL 배열 (최대 3개) |
| video_durations | number[] | 선택 | video별 길이(초) 배열, 예: [3, 5] |
| input_video_duration | number | 선택 | 총 입력 video 길이(초), video_durations의 대안 |
| audio_url | string | 선택 | 참조 audio URL (배경음악 / SFX) |
| audio_urls | string[] | 선택 | 여러 참조 audio URL 배열 (최대 3개) |
| generate_audio | boolean | 선택 | 오디오를 생성할지 여부, 기본값 true |
| watermark | boolean | 선택 | 워터마크를 추가할지 여부, 기본값 false |
| content | array | 선택 | 미디어 에셋 배열입니다. 각 항목: { type: "image_url", image_url: { url }, role }. 지원되는 role: first_frame (최대 1개), last_frame (최대 1개), reference_image, reference_video, reference_audio |
텍스트, 이미지, 비디오, 오디오를 입력으로 자유롭게 조합할 수 있습니다. 다음 제한 사항을 참고하세요:
가장 기본적인 사용법입니다. 텍스트로 장면을 설명해 비디오를 생성합니다.
curl -X POST https://tokenhub.store/api/v1/videos/generations \
-H "Authorization: Bearer th-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedance-2.0",
"prompt": "A golden retriever running on a sunny beach, waves crashing in the background, cinematic slow motion, 4K quality",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"watermark": false
}'응답:
{
"id": "xxxxxx-task-id",
"object": "video.generation.task",
"model": "doubao-seedance-2.0",
"status": "queued",
"created": 1719900000
}비디오 생성은 비동기식입니다. 완료될 때까지 상태를 조회하세요.
# Poll task status using the task_id from creation response
curl https://tokenhub.store/api/v1/videos/generations/YOUR_TASK_ID \
-H "Authorization: Bearer th-your-api-key"작업 진행 중:
{
"id": "YOUR_TASK_ID",
"object": "video.generation.task",
"model": "doubao-seedance-2.0",
"status": "running",
"created": 1719900000
}작업 완료(비디오 URL 수신됨):
{
"id": "YOUR_TASK_ID",
"object": "video.generation.task",
"model": "doubao-seedance-2.0",
"status": "succeeded",
"created": 1719900000,
"data": [
{
"video_url": "https://xxx.volces.com/output-video.mp4",
"cover_image_url": "https://xxx.volces.com/cover.jpg"
}
],
"usage": {
"video_duration": 5
}
}import requests
import time
API_BASE = "https://tokenhub.store/api/v1"
API_KEY = "th-your-api-key"
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}
# Step 1: Create video generation task
payload = {
"model": "doubao-seedance-2.0",
"prompt": "A majestic eagle soaring over snow-capped mountains, golden hour lighting, cinematic aerial shot",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"watermark": False
}
resp = requests.post(f"{API_BASE}/videos/generations", json=payload, headers=headers)
task = resp.json()
task_id = task["id"]
print(f"Task created: {task_id}, status: {task['status']}")
# Step 2: Poll for result
while True:
resp = requests.get(f"{API_BASE}/videos/generations/{task_id}", headers=headers)
result = resp.json()
status = result["status"]
print(f"Status: {status}")
if status == "succeeded":
video_url = result["data"][0]["video_url"]
duration = result["usage"]["video_duration"]
print(f"Video ready! Duration: {duration}s")
print(f"URL: {video_url}")
break
elif status == "failed":
print(f"Failed: {result.get('error', {}).get('message', 'Unknown error')}")
break
time.sleep(5)const API_BASE = "https://tokenhub.store/api/v1";
const API_KEY = "th-your-api-key";
const headers = {
"Authorization": `Bearer ${API_KEY}`,
"Content-Type": "application/json"
};
// Step 1: Create task
const createResp = await fetch(`${API_BASE}/videos/generations`, {
method: "POST",
headers,
body: JSON.stringify({
model: "doubao-seedance-2.0",
prompt: "A majestic eagle soaring over snow-capped mountains, cinematic aerial shot",
duration: 5,
resolution: "720p",
aspect_ratio: "16:9",
watermark: false,
}),
});
const task = await createResp.json();
console.log("Task created:", task.id);
// Step 2: Poll for result
const poll = async () => {
while (true) {
const resp = await fetch(`${API_BASE}/videos/generations/${task.id}`, { headers });
const result = await resp.json();
console.log("Status:", result.status);
if (result.status === "succeeded") {
console.log("Video URL:", result.data[0].video_url);
console.log("Duration:", result.usage.video_duration, "seconds");
return result;
}
if (result.status === "failed") {
console.error("Failed:", result.error?.message);
return result;
}
await new Promise(r => setTimeout(r, 5000));
}
};
await poll();import requests, time
API_BASE = "https://tokenhub.store/api/v1"
headers = {
"Authorization": "Bearer th-your-api-key",
"Content-Type": "application/json"
}
# Image-to-Video with a single reference image
payload = {
"model": "doubao-seedance-2.0",
"prompt": "The woman in the photo turns to face the camera and smiles warmly, her hair gently blowing in the wind",
"duration": 5,
"resolution": "720p",
"image_url": "https://your-bucket.com/portrait.jpg",
"watermark": False
}
resp = requests.post(f"{API_BASE}/videos/generations", json=payload, headers=headers)
task_id = resp.json()["id"]
print(f"Task: {task_id}")
# Poll for result
while True:
r = requests.get(f"{API_BASE}/videos/generations/{task_id}", headers=headers).json()
if r["status"] == "succeeded":
print(f"Done: {r['data'][0]['video_url']}")
break
elif r["status"] == "failed":
print(f"Error: {r.get('error', {}).get('message')}")
break
time.sleep(5)권장 형식: [주제] + [동작] + [환경/배경] + [카메라/스타일]
"A young woman walking through a cherry blossom garden, petals falling in slow motion, soft natural lighting, cinematic 35mm film look""Close-up of hands pouring latte art into a ceramic cup, steam rising, warm cafe ambiance, shallow depth of field""Aerial drone shot of a winding river through autumn forest, golden and red leaves, morning mist, 4K cinematic"© 2026 TokenHub · Powered by ByteDance Seedance 2.0 · support@tokenhub.store