지원되는 AI 모델
우리 API를 선택하는 이유
초고속 처리
최적화된 처리 파이프라인, <100ms 응답 시간, 밀리초 수준 지연.
엔터프라이즈급 보안
엔드투엔드 암호화, ISO 27001 인증, 엔터프라이즈급 개인정보 보호.
데이터 프라이버시
GDPR 엄격 준수, 사용자 데이터 30일 자동 삭제.
높은 신뢰성
99.9% 가동 시간 보장, 글로벌 다중 지역 배포.
무제한 확장
자동 확장 아키텍처, 모든 트래픽 지원, 용량 걱정 불필요.
완벽한 문서
상세한 API 문서, SDK 예제, 모범 사례 가이드.
SDK 설치
빠른 시작 가이드
Python SDK
pip로 설치
pip install seedance-sdk
poetry로 설치
poetry add seedance-sdk
Node.js SDK
npm으로 설치
npm install seedance-sdk
yarn으로 설치
yarn add seedance-sdk
빠른 시작 가이드
Python 예제
클라이언트 초기화
기본 설정
import seedance # Initialize client client = seedance.Client(api_key="your-api-key-here") # Or use environment variable # export SEEDANCE_API_KEY="your-api-key" # client = seedance.Client()
이미지 생성
Seedream 이미지 생성
# Generate high-quality images using Seedream 4.5
response = client.seedream.generate(
prompt="A serene mountain landscape at sunset, oil painting style",
model="seedream-4.5",
resolution="4k",
quality="high",
num_images=1,
seed=42 # Optional: for reproducible results
)
# Get results
image_url = response.images[0].url
print(f"Generated image: {image_url}")비디오 생성
Seedance 비디오 생성
# Generate video using Seedance 1.5 Pro
response = client.seedance.generate(
prompt="A majestic eagle soaring over snowy mountains",
model="seedance-1.5-pro",
duration=15, # seconds
resolution="1080p",
fps=24
)
# Get async task ID
task_id = response.task_id
print(f"Task submitted: {task_id}")작업 상태 확인
결과 폴링
import time
# Poll task status
while True:
status = client.task.get_status(task_id)
if status.status == "completed":
result = status.result
print(f"Video URL: {result.video_url}")
break
elif status.status == "failed":
print(f"Task failed: {status.error_message}")
break
else:
print(f"Task status: {status.status}")
time.sleep(2) # Check every 2 secondsNode.js / TypeScript 예제
클라이언트 초기화
기본 설정
import { SeedanceClient } from 'seedance-sdk';
// Initialize client
const client = new SeedanceClient({
apiKey: 'your-api-key-here'
});
// Or use environment variable
// const client = new SeedanceClient();이미지 생성
Seedream 이미지 생성
// Generate images using Seedream 4.5
const response = await client.seedream.generate({
prompt: "A cyberpunk city street with neon signs",
model: "seedream-4.5",
resolution: "4k",
quality: "high",
numImages: 1
});
// Get results
const imageUrl = response.images[0].url;
console.log(`Generated image: ${imageUrl}`);비디오 생성
Seedance 비디오 생성
// Generate video using Seedance 1.5 Pro
const response = await client.seedance.generate({
prompt: "A spacecraft entering Earth's atmosphere",
model: "seedance-1.5-pro",
duration: 20, // seconds
resolution: "1080p",
fps: 24
});
// Get task ID
const taskId = response.taskId;
console.log(`Task submitted: ${taskId}`);비동기 대기
완료 대기
// Use waitForCompletion helper function
const result = await client.task.waitForCompletion(taskId, {
maxWaitTime: 300000, // 5 minutes
pollInterval: 2000 // Check every 2 seconds
});
if (result.status === 'completed') {
console.log(`Video URL: ${result.videoUrl}`);
} else {
console.error(`Task failed: ${result.errorMessage}`);
}REST API 사용
cURL 요청 예시
이미지 생성
POST /v1/seedream/generate
curl -X POST https://api.seedance2api.com/v1/seedream/generate \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A beautiful sunset over the ocean",
"model": "seedream-4.5",
"resolution": "4k",
"quality": "high",
"num_images": 1
}' | jq '.images[0].url'비디오 생성
POST /v1/seedance/generate
curl -X POST https://api.seedance2api.com/v1/seedance/generate \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A runner jogging through a forest",
"model": "seedance-1.5-pro",
"duration": 15,
"resolution": "1080p",
"fps": 24
}' | jq '.task_id'작업 상태 확인
GET /v1/tasks/:task_id
curl -X GET https://api.seedance2api.com/v1/tasks/task-123-abc \
-H "Authorization: Bearer your-api-key" | jq '.'
# Response example:
# {
# "task_id": "task-123-abc",
# "status": "processing",
# "progress": 45,
# "created_at": "2024-01-15T10:30:00Z",
# "updated_at": "2024-01-15T10:32:15Z"
# }최종 결과 가져오기
GET /v1/results/:task_id
curl -X GET https://api.seedance2api.com/v1/results/task-123-abc \
-H "Authorization: Bearer your-api-key" | jq '.'
# Response example:
# {
# "task_id": "task-123-abc",
# "status": "completed",
# "result": {
# "video_url": "https://cdn.seedance2api.com/videos/...",
# "duration": 15,
# "resolution": "1080p"
# },
# "completed_at": "2024-01-15T10:35:00Z"
# }API 매개변수 상세 설명
완전한 매개변수 설명 및 예시
Seedream 이미지 생성 매개변수
| 매개변수명 | 타입 | 필수 | 설명 | 예시 |
|---|---|---|---|---|
| prompt | string | 예 | 이미지 설명 텍스트, 최대 300자 | A sunset over mountains |
| model | string | 예 | 모델명: seedream-3.0, seedream-4.0, seedream-4.5, seedream-5.0 | seedream-4.5 |
| resolution | string | 아니오 | 출력 해상도: 1024x1024, 2048x2048, 4k (4096×4096) | 4k |
| quality | string | 아니오 | 생성 품질: standard, high | high |
| num_images | integer | 아니오 | 생성 이미지 수, 1-4장 | 1 |
| seed | integer | 아니오 | 랜덤 시드, 결과 재현용 | 42 |
| style | string | 아니오 | 예술 스타일: oil_painting, watercolor, cyberpunk 등 | oil_painting |
Seedance 비디오 생성 매개변수
| 매개변수명 | 타입 | 필수 | 설명 | 예시 |
|---|---|---|---|---|
| prompt | string | 예 | 비디오 설명 텍스트, 최대 300자 | Running through forest |
| model | string | 예 | 모델명: seedance-1.0, seedance-1.5-pro, seedance-2.0 | seedance-1.5-pro |
| duration | integer | 예 | 비디오 길이(초), 5-30초 | 15 |
| resolution | string | 아니오 | 출력 해상도: 720p, 1080p, 4k | 1080p |
| fps | integer | 아니오 | 프레임 레이트: 24, 30, 60 | 24 |
| image_input | string | 아니오 | 참조 이미지 URL(선택), 이미지-비디오용 | https://... |
응답 형식 예시
표준화된 JSON 응답 구조
성공 응답
이미지 생성 성공
{
"status": "success",
"data": {
"task_id": "task-uuid-12345",
"images": [
{
"id": "img-uuid-001",
"url": "https://cdn.seedance2api.com/images/...",
"width": 2048,
"height": 2048,
"format": "png",
"size_bytes": 4526048
}
],
"model": "seedream-4.5",
"resolution": "4k",
"processing_time_ms": 2500
}
}비디오 생성 수락됨
{
"status": "accepted",
"data": {
"task_id": "task-uuid-67890",
"status": "queued",
"estimated_wait_time_seconds": 45,
"check_status_url": "/v1/tasks/task-uuid-67890"
}
}오류 응답
잘못된 요청 (400)
{
"status": "error",
"error": {
"code": "INVALID_PROMPT",
"message": "Prompt is too long (max 300 characters)",
"details": {
"field": "prompt",
"value": "...",
"constraint": "max_length",
"limit": 300
}
}
}인증 실패 (401)
{
"status": "error",
"error": {
"code": "INVALID_API_KEY",
"message": "API key is invalid or expired"
}
}오류 처리 가이드
| HTTP 상태 코드 | 오류 코드 | 설명 | 권장 조치 |
|---|---|---|---|
| 400 | INVALID_REQUEST | 요청 매개변수가 유효하지 않거나 누락됨 | 요청 매개변수 형식 및 필수 항목 확인 |
| 401 | UNAUTHORIZED | API 키가 유효하지 않거나 만료됨 | API 키가 올바른지 확인 |
| 403 | FORBIDDEN | 리소스 액세스 권한 없음 | 계정 업그레이드 또는 지원팀 문의 |
| 429 | RATE_LIMITED | 속도 제한 초과 | 대기 후 재시도, 속도 제한 헤더 확인 |
| 500 | INTERNAL_ERROR | 서버 내부 오류 | 나중에 재시도 또는 기술 지원 문의 |
| 503 | SERVICE_UNAVAILABLE | 서비스 일시적으로 사용 불가 | 지수 백오프 재시도 메커니즘 사용 |
모범 사례
- 지수 백오프 재시도 전략 구현
- 합리적인 타임아웃 설정(5분 권장)
- 비디오 생성은 폴링 또는 Webhook으로 결과 가져오기
- 디버깅을 위해 모든 API 오류 기록
- 빈번한 폴링 방지를 위해 Webhook 사용
속도 제한
다양한 플랜의 요청 할당량 설명
요청 제한
개인 테스트 및 소규모 사용에 적합
중소형 애플리케이션 및 개발팀에 적합
대규모 프로덕션 환경에 적합, 맞춤 할당량
응답 헤더 정보
속도 제한 응답 헤더
HTTP/1.1 200 OK X-RateLimit-Limit: 1000 X-RateLimit-Remaining: 999 X-RateLimit-Reset: 1705315200 X-RateLimit-RetryAfter: 3600 # Explanation: # X-RateLimit-Limit: Total quota for current period # X-RateLimit-Remaining: Remaining requests # X-RateLimit-Reset: Quota reset timestamp # X-RateLimit-RetryAfter: Recommended retry wait time in seconds
인증 및 API 키
API 키 받기
- 1
api.authentication.steps.register.title
api.authentication.steps.register.description
- 2
api.authentication.steps.verify.title
api.authentication.steps.verify.description
- 3
api.authentication.steps.dashboard.title
api.authentication.steps.dashboard.description
- 4
api.authentication.steps.generate.title
api.authentication.steps.generate.description
api.authentication.useApiKey
api.authentication.httpUsage
# Method 1: Using Authorization header
curl -X POST https://api.seedance2api.com/v1/seedream/generate \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{"prompt": "..."}'
# Method 2: Using X-API-Key header
curl -X POST https://api.seedance2api.com/v1/seedream/generate \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{"prompt": "..."}'api.authentication.securityTips.title
- • api.authentication.securityTips.noExpose
- • api.authentication.securityTips.useEnv
- • api.authentication.securityTips.rotate
- • api.authentication.securityTips.deleteLeaked
Webhook 지원
api.webhook.realtimeNotifications
실시간 알림
- api.webhook.features.taskComplete
- api.webhook.features.failureNotification
- api.webhook.features.progressUpdate
- api.webhook.features.autoRetry
api.webhook.eventExample
{
"event": "task.completed",
"timestamp": "2024-01-15T10:35:00Z",
"data": {
"task_id": "task-uuid-12345",
"status": "completed",
"model": "seedance-1.5-pro",
"result": {
"video_url": "https://cdn.seedance2api.com/...",
"duration": 15,
"resolution": "1080p"
}
}
}api.webhook.setup.title
- api.webhook.setup.step1
- api.webhook.setup.step2
- api.webhook.setup.step3
- api.webhook.setup.step4
무료 크레딧
api.freeCredits.cards.cardBinding.description
api.freeCredits.cards.cardBinding.note
api.freeCredits.cards.firstRecharge.description
api.freeCredits.cards.firstRecharge.note
api.freeCredits.cards.trialPeriod.title
api.freeCredits.cards.trialPeriod.description
API 가격 미리보기
api.pricing.description
api.pricing.payAsYouGo.title
- api.pricing.payAsYouGo.seedreamPrice
- api.pricing.payAsYouGo.seedancePrice
- api.pricing.payAsYouGo.noMinimum
- api.pricing.payAsYouGo.payPerUse
API 자주 묻는 질문
답변을 빠르게 찾으세요