API 문서
Seedance API 레퍼런스
Seedance Video AI를 애플리케이션에 통합하기 위한 완전한 API 문서입니다. 텍스트 프롬프트와 이미지에서 고품질 비디오를 생성합니다.
REST API
JSON 응답
비디오 생성
인증
Seedance API는 Bearer Token 인증을 사용합니다. Authorization 헤더에 API 토큰을 포함하세요:
Authorization: Bearer your-api-token-here
보안 참고: 클라이언트 측 코드나 공개 저장소에 API 토큰을 절대 노출하지 마세요.
기본 URL
모든 API 요청은 다음 주소로 보내야 합니다:
https://seedanceapi.org/v1
API 엔드포인트
POST
비디오 생성
/generateAI 모델을 사용하여 텍스트 프롬프트와 이미지에서 고품질 비디오를 생성합니다.
요청 본문
텍스트에서 비디오 (T2V)
{
"prompt": "cardi b bends over to pick up coins",
"mode": "text",
"resolution": "480p",
"ratio": "adaptive",
"duration": 5,
"framespersecond": 24,
"seed": -1
}이미지에서 비디오 (I2V)
{
"prompt": "kissing",
"mode": "img2img",
"resolution": "480p",
"ratio": "adaptive",
"duration": 5,
"framespersecond": 24,
"seed": -1,
"image_url": "https://tempfile.redpandaai.co/kieai/284/images/user-uploads/image (2).png"
}매개변수
| 매개변수 | 타입 | 설명 |
|---|---|---|
| prompt | 문자열 | 생성할 비디오의 텍스트 설명 |
| mode | 문자열 | 생성 모드: T2V의 경우 "text", I2V의 경우 "img2img" |
| image_url | 문자열? | 입력 이미지 URL (img2img 모드에서 필수) |
| resolution | 문자열 | 비디오 해상도: "480p", "720p" 또는 "1080p" |
| ratio | 문자열 | 비디오 화면 비율 (기본값: "adaptive") |
| duration | 정수 | 비디오 길이(초, 기본값: 5) |
| framespersecond | 정수 | 초당 프레임 수 (기본값: 24) |
| seed | 정수 | 재현 가능한 결과를 위한 랜덤 시드 (기본값: -1) |
응답
{
"code": 200,
"message": "success",
"data": {
"task_id": "task_123456789"
}
}endpoints.generate.curl
텍스트에서 비디오 (T2V):
curl -X POST https://seedanceapi.org/v1/generate \
-H "Authorization: Bearer your-api-token" \
-H "Content-Type: application/json" \
-d '{
"prompt": "cardi b bends over to pick up coins",
"mode": "text",
"resolution": "480p",
"ratio": "adaptive",
"duration": 5,
"framespersecond": 24,
"seed": -1
}'이미지에서 비디오 (I2V):
curl -X POST https://seedanceapi.org/v1/generate \
-H "Authorization: Bearer your-api-token" \
-H "Content-Type: application/json" \
-d '{
"prompt": "kissing",
"mode": "img2img",
"resolution": "480p",
"ratio": "adaptive",
"duration": 5,
"framespersecond": 24,
"seed": -1,
"image_url": "https://tempfile.redpandaai.co/kieai/284/images/user-uploads/image (2).png"
}'GET
작업 상태 조회
/status?task_id=xxxx진행 중이거나 완료된 비디오 생성 작업의 상태를 확인합니다.
매개변수
| 매개변수 | 타입 | 설명 |
|---|---|---|
| task_id | 문자열 | 생성 엔드포인트에서 반환된 작업 ID |
응답
{
"code": 200,
"message": "success",
"data": {
"consumed_credits": 10,
"created_at": "2024-01-01T00:00:00Z",
"status": "completed",
"task_id": "task_123456789",
"user_request": {
"prompt": "A beautiful landscape with flowing water",
"model": "seedance-video-v1",
"duration": 5
},
"user_response": {
"video_url": "https://cdn.seedance.com/generated/video.mp4",
"last_frame_url": "https://cdn.seedance.com/generated/last_frame.jpg"
},
"provider_status": "success",
"model": "seedance-video-v1"
}
}endpoints.generate.curl
curl -X GET "https://seedanceapi.org/v1/status?task_id=task_123456789" \
-H "Authorization: Bearer your-api-token"오류 처리
Seedance API는 표준 HTTP 상태 코드와 오류 메시지를 반환합니다:
HTTP 상태 코드
200OK
400Bad Request
401Unauthorized
429Rate Limited
500Server Error
오류 응답 형식
{
"code": 400,
"message": "Invalid request: The prompt parameter is required",
"error": "INVALID_REQUEST"
}모범 사례: 항상 오류를 적절히 처리하고 응답 본문을 처리하기 전에 HTTP 상태 코드를 확인하세요.
요청 제한
100
요청/분
무료 플랜
1000
요청/분
Pro 플랜
5000
요청/분
엔터프라이즈
요청 제한 헤더: 각 응답에는 현재 사용량을 추적하기 위한 X-RateLimit-Remaining 및 X-RateLimit-Reset 헤더가 포함됩니다.
