Seedance 2.0 API API 문서
Seedance 2.0 영상 생성을 앱에 통합하는 데 필요한 모든 것.
기본 URL
https://api.defapi.org인증
모든 API 요청에는 Authorization 헤더에 API 키가 필요합니다.
Authorization: Bearer <your-api-key>예시: Bearer dk-1234567890abcdef
POST
/api/video/seedance/genSeedance AI로 영상을 생성합니다. 폴링용 task_id를 반환합니다.
요청 본문
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
| model | string | 아니오 | 사용할 AI 모델. 기본값: seedance-2.0 |
| content | array | 예 | 텍스트/이미지 URL 배열. 최대 9개의 이미지. @image1, @image2로 참조 |
| duration | integer | 아니오 | 영상 길이(초). 옵션: 5, 10, 15. 기본값: 5 |
| ratio | string | 아니오 | 화면 비율. 옵션: 16:9, 9:16, 1:1, 4:3, 3:4, 21:9. 기본값: 16:9 |
| callback_url | string | 아니오 | 작업 완료 알림을 받을 Webhook URL |
예시
텍스트-영상 변환
POST https://api.defapi.org/api/video/seedance/gen
Authorization: Bearer dk-1234567890abcdef
Content-Type: application/json
{
"model": "seedance-2.0",
"content": [
{ "type": "text", "text": "A beautiful beach scene with waves gently lapping at the shore" }
]
}이미지-영상 변환 (@image1, @image2로 이미지 참조)
{
"model": "seedance-2.0",
"content": [
{ "type": "text", "text": "The cat in @image1 walks through a garden, then meets the dog in @image2" },
{ "type": "image_url", "image_url": { "url": "https://example.com/cat.png" } },
{ "type": "image_url", "image_url": { "url": "https://example.com/dog.png" } }
],
"duration": 5,
"callback_url": "https://example.com/webhook/video-callback"
}응답
{
"code": 0,
"message": "ok",
"data": {
"task_id": "ta12345678-1234-1234-1234-123456789abc"
}
}GET
/api/task/query영상 생성 작업의 상태와 결과를 조회합니다.
쿼리 파라미터
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
| task_id | string | 예 | 생성 엔드포인트에서 반환된 Task ID |
예시
GET https://api.defapi.org/api/task/query?task_id=ta823dfb-eaac-44fd-aec2-3e2c7ba8e071 Authorization: Bearer dk-1234567890abcdef
응답
{
"code": 0,
"message": "ok",
"data": {
"task_id": "ta823dfb-eaac-44fd-aec2-3e2c7ba8e071",
"status": "success",
"result": { "video": "https://example.com/generated-video.mp4" },
"consumed": "0.500000",
"status_reason": { "message": null },
"created_at": "2025-08-03T10:22:20.010Z"
}
}오류 코드
| HTTP 상태 | code 필드 | 의미 |
|---|---|---|
| 200 | 0 | 성공 |
| 400 | 1 | 잘못된 요청 — 유효하지 않은 파라미터 |
| 401 | 1 | 인증 실패 — API 키 없음 또는 잘못됨 |
| 404 | 1 | 작업을 찾을 수 없음 |
| 500 | 1 | 내부 서버 오류 |