Powerful and Easy-to-Use AI API
Full-Stack AI Video and Image Generation Solution
Integrate world-class Seedance and Seedream models to generate professional-grade videos and images with one click. Supports multiple SDKs, just a few lines of code.
Supported AI Models
Seedance 1.5 Pro
Recommended- 1080P video generation
- Up to 30 seconds
- Image and video to video
- Advanced control options
- AI background removal
- Background replacement
Seedream 4.0
Advanced- 4K image generation
- High-fidelity output
- Detail enhancement
- Variant generation
Seedream 4.5
Latest- 8K image generation
- Ultra-high resolution
- AI-enhanced processing
- Professional-grade quality
Seedream 5.0
Cutting-edge- 16K image support
- Extreme detail processing
- AI intelligent optimization
- Experimental features support
Why Choose Our API
Lightning Fast Processing
Optimized processing pipeline, <100ms response time, millisecond-level latency.
Enterprise-Grade Security
End-to-end encryption, ISO 27001 certified, enterprise-level privacy protection.
Data Privacy
Strictly compliant with GDPR, user data automatically deleted after 30 days.
High Reliability
99.9% uptime guarantee, multi-region deployment worldwide.
Unlimited Scaling
Auto-scaling architecture, supports any traffic volume, no capacity concerns.
Comprehensive Documentation
Detailed API docs, SDK examples, best practice guides.
SDK Installation
Quick Start Guide
Python SDK
Install via pip
pip install seedance-sdk
Install via poetry
poetry add seedance-sdk
Node.js SDK
Install via npm
npm install seedance-sdk
Install via yarn
yarn add seedance-sdk
Quick Start Guide
Python Example
Initialize Client
Basic Setup
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()
Generate Image
Seedream Image Generation
# 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}")Generate Video
Seedance Video Generation
# 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}")Check Task Status
Poll Results
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 Example
Initialize Client
Basic Setup
import { SeedanceClient } from 'seedance-sdk';
// Initialize client
const client = new SeedanceClient({
apiKey: 'your-api-key-here'
});
// Or use environment variable
// const client = new SeedanceClient();Generate Image
Seedream Image Generation
// 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}`);Generate Video
Seedance Video Generation
// 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}`);Async Wait
Wait for Completion
// 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 Usage
cURL Request Examples
Generate Image
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'Generate Video
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'Check Task Status
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 Final Result
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 Parameter Details
Complete parameter descriptions and examples
Seedream Image Generation Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| prompt | string | Yes | Image description text, max 300 characters | A sunset over mountains |
| model | string | Yes | Model name: seedream-3.0, seedream-4.0, seedream-4.5, seedream-5.0 | seedream-4.5 |
| resolution | string | No | Output resolution: 1024x1024, 2048x2048, 4k (4096×4096) | 4k |
| quality | string | No | Generation quality: standard, high | high |
| num_images | integer | No | Number of images to generate, 1-4 | 1 |
| seed | integer | No | Random seed for reproducible results | 42 |
| style | string | No | Art style: oil_painting, watercolor, cyberpunk, etc. | oil_painting |
Seedance Video Generation Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| prompt | string | Yes | Video description text, max 300 characters | Running through forest |
| model | string | Yes | Model name: seedance-1.0, seedance-1.5-pro, seedance-2.0 | seedance-1.5-pro |
| duration | integer | Yes | Video duration in seconds, 5-30s | 15 |
| resolution | string | No | Output resolution: 720p, 1080p, 4k | 1080p |
| fps | integer | No | Frame rate: 24, 30, 60 | 24 |
| image_input | string | No | Reference image URL (optional) for image-to-video | https://... |
Response Format Examples
Standardized JSON response structure
Success Response
Image Generation Success
{
"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
}
}Video Generation Accepted
{
"status": "accepted",
"data": {
"task_id": "task-uuid-67890",
"status": "queued",
"estimated_wait_time_seconds": 45,
"check_status_url": "/v1/tasks/task-uuid-67890"
}
}Error Response
Bad Request (400)
{
"status": "error",
"error": {
"code": "INVALID_PROMPT",
"message": "Prompt is too long (max 300 characters)",
"details": {
"field": "prompt",
"value": "...",
"constraint": "max_length",
"limit": 300
}
}
}Unauthorized (401)
{
"status": "error",
"error": {
"code": "INVALID_API_KEY",
"message": "API key is invalid or expired"
}
}Error Handling Guide
| HTTP Status | Error Code | Description | Suggested Action |
|---|---|---|---|
| 400 | INVALID_REQUEST | Invalid or missing request parameters | Check request parameter format and required fields |
| 401 | UNAUTHORIZED | Invalid or expired API key | Verify API key is correct |
| 403 | FORBIDDEN | No permission to access this resource | Upgrade account or contact support |
| 429 | RATE_LIMITED | Rate limit exceeded | Wait and retry, check rate limit headers |
| 500 | INTERNAL_ERROR | Internal server error | Retry later or contact technical support |
| 503 | SERVICE_UNAVAILABLE | Service temporarily unavailable | Use exponential backoff retry mechanism |
Best Practices
- Implement exponential backoff retry strategy
- Set reasonable timeout (recommend 5 minutes)
- Use polling or Webhook for video generation results
- Log all API errors for debugging
- Use Webhook to avoid frequent polling
Rate Limiting
Request quota descriptions for different plans
Request Limits
Suitable for personal testing and small-scale use
Suitable for small to medium applications and development teams
Suitable for large-scale production environments, custom quotas
Response Headers
Rate Limit Response Headers
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
Authentication - API Key
How to Get API Key
- 1
Register Account
Visit seedance2api.com to register a new account
- 2
Verify Email
Complete email verification to activate account
- 3
Access Dashboard
Login and access developer console
- 4
Generate Key
Generate new key in API Keys page
How to Use API Key
HTTP Request Usage
# 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": "..."}'Security Tips
- • Never expose API keys in client-side code
- • Use environment variables to store keys
- • Rotate keys regularly
- • If key is leaked, delete immediately and regenerate
Webhook Support
Real-time Notifications
Configure Webhook to receive task completion notifications without frequent API polling. Supports automatic retry and signature verification.
- Automatic task completion notification
- Failure notification
- Progress updates (optional)
- Automatic retry mechanism
Webhook Event Example
{
"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"
}
}
}How to Setup Webhook
- 1. Configure Webhook URL in dashboard
- 2. Select event types to receive
- 3. Verify Webhook signature for security
- 4. Add webhook_url parameter in requests
Free Credits Information
Get $1 credit on first card binding
Automatically received upon account verification
Get 25% bonus on first deposit
Get 25% bonus on any first deposit amount
Day Trial Period
New users get 30-day free trial
Pricing Preview
Flexible pricing plans to meet needs from individual developers to enterprises
Frequently Asked Questions
Find answers to your questions quickly