API Documentation
Complete Seedance 2.0 API reference to help you integrate video generation quickly.
Quick Start
Get started with Seedance 2.0 API in three simple steps: get API key, send request, receive video.
1
Get API Key
Register to get key
2
Send Request
Call API to generate
3
Get Video
Download video
Authentication
All API requests must include your API key in the HTTP Header:
Authorization: Bearer YOUR_API_KEYKeep your API key secure and never expose it in client-side code.
API Endpoints
POST
/v1/videos/text-to-videoText to Video
Generate video from text prompt
POST
/v1/videos/image-to-videoImage to Video
Generate video from image
GET
/v1/videos/{task_id}Get Status
Check video generation task status
Code Examples
curl
curl -X POST https://api.seeddanceapi.com/v1/videos/text-to-video \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A cinematic shot of a futuristic city at sunset",
"resolution": "1080p",
"aspect_ratio": "16:9",
"duration": 5
}'python
import requests
response = requests.post(
"https://api.seeddanceapi.com/v1/videos/text-to-video",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"prompt": "A cinematic shot of a futuristic city at sunset",
"resolution": "1080p",
"aspect_ratio": "16:9",
"duration": 5
}
)
data = response.json()
print(f"Task ID: {data['task_id']}")node
const axios = require('axios');
const response = await axios.post(
'https://api.seeddanceapi.com/v1/videos/text-to-video',
{
prompt: 'A cinematic shot of a futuristic city at sunset',
resolution: '1080p',
aspect_ratio: '16:9',
duration: 5
},
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
}
);
console.log('Task ID:', response.data.task_id);Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| prompt | string | Yes | Text prompt describing the video you want to generate |
| image_url | string | Conditional | Image URL (required for image-to-video) |
| resolution | string | No | Video resolution: 480p, 720p, 1080p |
| aspect_ratio | string | No | Aspect ratio: 16:9, 9:16, 4:3, 3:4, 21:9, 1:1 |
| duration | integer | No | Video duration in seconds, max 10s |
| seed | integer | No | Random seed for reproducible results |
Error Handling
API uses standard HTTP status codes and JSON error responses:
200Success400Bad Request401Unauthorized429Rate Limit Exceeded500Internal Server Error