Overview
Seedance 2.0 (doubao-seedance-2) is a video generation model from Doubao that creates videos through text prompts with optional image and video references. Unlike the Sora models which use multipart/form-data, Seedance 2.0 uses application/json format and accepts image/video URLs directly.
After creation, use the query interface to get the generation status. Once completed, use the content endpoint to download the video.
Supported Models
Important Notes
Asynchronous ProcessingVideo generation is asynchronous. After creating a task, a task ID is returned immediately. Use the query interface to check generation progress and results.
Content PolicyGenerated video content must comply with usage policies. Content that is illegal, violent, pornographic, or infringes on copyrights is prohibited.
Resource ManagementDownload generated videos promptly to avoid resource expiration. Check the expires_at field in the response to know when the video will expire.
Quick Start
Basic Example: Text-to-Video
curl -X POST "https://api.wisgate.ai/v1/videos" \
-H "Authorization: Bearer $WISDOM_GATE_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A cat walking on the street",
"model": "doubao-seedance-2",
"duration": 4,
"size": "1280x720"
}'
Parameters
Request Body (JSON)
| Parameter | Type | Required | Description |
|---|
prompt | string | Yes | Text prompt describing the video to generate |
model | string | Yes | Must be doubao-seedance-2 |
duration | integer | No | Video duration in seconds. Range: 4-15. Default: 4 |
size | string | No | Output resolution. Options: 1280x720, 720x1080, 1920x1080, 1080x1920. Default: 1280x720 |
mode | string | No | Generation mode. Options: i2v or r2v. See Mode Details |
images | array[string] | No | Array of image URLs to use as references |
videos | array[string] | No | Array of video URLs to use as references |
Mode Details
i2v Mode (Image-to-Video, First/Last Frame)
When mode is set to i2v and images is provided:
- The first image in the array is used as the first frame (required)
- The second image (if provided) is used as the last frame (optional)
- The generated video will transition from the first frame to the last frame
curl -X POST "https://api.wisgate.ai/v1/videos" \
-H "Authorization: Bearer $WISDOM_GATE_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A smooth transition from day to night in a city skyline",
"model": "doubao-seedance-2",
"duration": 6,
"size": "1280x720",
"mode": "i2v",
"images": [
"https://example.com/first-frame.jpg",
"https://example.com/last-frame.jpg"
]
}'
r2v Mode (Reference-to-Video)
When mode is set to r2v, all provided images and videos are used as references to guide the video generation. The model combines the visual information from all references to create the output video.
Each image and video file must be smaller than 4MB.
curl -X POST "https://api.wisgate.ai/v1/videos" \
-H "Authorization: Bearer $WISDOM_GATE_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Referring to Figures 1 to 2, design a fade-in and fade-out animation with smooth line flow and flowing light and shadow in the background.",
"model": "doubao-seedance-2",
"duration": 4,
"size": "1280x720",
"mode": "r2v",
"images": [
"https://example.com/reference1.jpg",
"https://example.com/reference2.jpg"
],
"videos": [
"https://example.com/reference-video.mp4"
]
}'
Complete Workflow
Step 1: Create Video Task
import requests
url = "https://api.wisgate.ai/v1/videos"
headers = {
"Authorization": "Bearer WISDOM_GATE_KEY",
"Content-Type": "application/json"
}
data = {
"prompt": "A cat walking on the street",
"model": "doubao-seedance-2",
"duration": 5,
"size": "1280x720"
}
response = requests.post(url, headers=headers, json=data)
result = response.json()
video_id = result["id"]
print(f"Created video task: {video_id}")
Step 2: Poll for Status & Download
Use the query interface with the returned id. When status is completed, the video download URL is available in meta_data.url:
import time
status_url = f"https://api.wisgate.ai/v1/videos/{video_id}"
while True:
response = requests.get(status_url, headers={"Authorization": "Bearer WISDOM_GATE_KEY"})
result = response.json()
status = result["status"]
progress = result.get("progress", 0)
print(f"Status: {status}, Progress: {progress}%")
if status == "completed":
video_url = result["meta_data"]["url"]
print(f"Video URL: {video_url}")
# Download the video
video_response = requests.get(video_url, stream=True)
with open("generated_video.mp4", "wb") as f:
for chunk in video_response.iter_content(chunk_size=8192):
f.write(chunk)
print("Video downloaded successfully!")
break
elif status == "failed":
print(f"Error: {result.get('error')}")
break
time.sleep(10)
Supported Resolutions
| Size | Orientation | Description |
|---|
1280x720 | Landscape | Standard HD (default) |
720x1080 | Portrait | Vertical format |
1920x1080 | Landscape | Full HD |
1080x1920 | Portrait | Vertical Full HD |
Best Practices
1. Prompt Optimization
Use specific, detailed descriptions including scene, action, and style:
Good prompt:
A cinematic aerial shot of golden wheat fields swaying in the wind at sunset, with warm light casting long shadows, 4K quality
Poor prompt:
2. Duration Selection
Choose appropriate duration based on content complexity:
- 4-6 seconds: Best for simple scenes, fastest generation
- 7-10 seconds: Good for moderate complexity scenes
- 11-15 seconds: For complex scenes with multiple elements
3. Reference Quality
When using images or videos as references:
- Ensure URLs are publicly accessible
- Keep each file under 4MB
- Use high-quality, clear references for best results
- In
i2v mode, ensure the first and last frame images are consistent in style and resolution
4. Mode Selection
- Use i2v when you want precise control over the starting (and optionally ending) frame of the video
- Use r2v when you want the model to use multiple references as style/content guidance
FAQ
How is Seedance 2.0 different from Sora models?
Seedance 2.0 uses application/json format and accepts image/video URLs directly, while Sora models use multipart/form-data with file uploads. Seedance 2.0 also supports unique features like first/last frame control (i2v mode) and multi-reference generation (r2v mode).
What file size limits apply to references?
Each image and video used as reference must be smaller than 4MB.
How many images/videos can I provide?
In i2v mode, you can provide up to 2 images (first frame required, last frame optional). In r2v mode, you can provide multiple images and videos as references.
Can I use Seedance 2.0 without any images or videos?
Yes. If no mode, images, or videos are provided, the model generates video from the text prompt only (text-to-video).