Seedance API Reference
Complete API documentation for integrating Seedance Video AI into your applications. Generate high-quality videos from text prompts and images.
Authentication
Seedance API uses Bearer Token authentication. Include your API token in the Authorization header:
Security Note: Never expose your API token in client-side code or public repositories.
Base URL
All API requests should be made to:
API Endpoints
Generate Video
/generateGenerate high-quality videos from text prompts and images using AI models.
Request Body
Text to Video (T2V)
{
"prompt": "cardi b bends over to pick up coins",
"mode": "text",
"resolution": "480p",
"ratio": "adaptive",
"duration": 5,
"framespersecond": 24,
"seed": -1
}Image to Video (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"
}Parameters
| Parameter | Type | Description |
|---|---|---|
| prompt | string | Text description of the video to generate |
| mode | string | Generation mode: "text" for T2V or "img2img" for I2V |
| image_url | string? | Input image URL (required for img2img mode) |
| resolution | string | Video resolution: "480p", "720p", or "1080p" |
| ratio | string | Video aspect ratio (default: "adaptive") |
| duration | integer | Video duration in seconds (default: 5) |
| framespersecond | integer | Frames per second (default: 24) |
| seed | integer | Random seed for reproducible results (default: -1) |
Response
{
"code": 200,
"message": "success",
"data": {
"task_id": "task_123456789"
}
}cURL Examples
Text to Video:
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
}'Image to Video:
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 Task Status
/status?task_id=xxxxCheck the status of an ongoing or completed video generation task.
Parameters
| Parameter | Type | Description |
|---|---|---|
| task_id | string | Task ID returned from the generate endpoint |
Response
{
"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"
}
}cURL Example
curl -X GET "https://seedanceapi.org/v1/status?task_id=task_123456789" \ -H "Authorization: Bearer your-api-token"
Error Handling
Seedance API returns standard HTTP status codes and error messages:
HTTP Status Codes
Error Response Format
{
"code": 400,
"message": "Invalid request: The prompt parameter is required",
"error": "INVALID_REQUEST"
}Best Practice: Always handle errors gracefully and check HTTP status codes before processing the response body.
Rate Limits
Rate Limit Headers: Each response includes X-RateLimit-Remaining and X-RateLimit-Reset headers to track your current usage.
Ready to start building?
Get your API key and start creating amazing videos with Seedance