Seedance 2.0 API: The Complete Developer Guide to AI Video Generation
Learn how to integrate the Seedance 2.0 API into your applications. This guide covers authentication, endpoints, parameters, pricing, error handling, and best practices for building AI-powered video generation workflows.

The Seedance 2.0 API gives developers programmatic access to one of the most advanced AI video generation models. This guide walks you through everything from your first API call to production-ready integrations.
Why Use the Seedance 2.0 API?
Building AI video generation into your product no longer requires complex infrastructure. The Seedance 2.0 API offers a clean, straightforward interface for generating high-quality videos from text prompts or reference images.
Here’s what makes it compelling for developers:
- Two simple endpoints — Generate videos and check status. That’s it. No complex orchestration needed
- Text-to-video and image-to-video — Support both pure text prompts and image-guided generation through a single endpoint
- Built-in audio generation — Optionally generate synchronized audio for your videos
- Flexible output — Choose between 480p and 720p resolution, with durations of 4, 8, or 12 seconds
- Multiple aspect ratios — Support for 1:1, 16:9, 9:16, 4:3, 3:4, 21:9, and 9:21
API Architecture Overview
The Seedance 2.0 API follows a standard asynchronous job pattern with just two endpoints:
Base URL: https://seedanceapi.org/v1
1. POST /v1/generate → Submit generation request → Returns task_id
2. GET /v1/status → Poll with task_id → Returns status + video URL
This pattern means your application never blocks waiting for video generation. Submit the job, give the user feedback, and check back when processing completes.
Getting Started
Step 1: Get Your API Key
Sign up at seedanceapi.org and navigate to the API Keys page in your dashboard to create your API key. Each key comes with a credit allocation that covers generation costs.
Step 2: Your First Generation (Text-to-Video)
Here’s the simplest possible API call — a text-to-video generation:
curl -X POST 'https://seedanceapi.org/v1/generate' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"prompt": "A cinematic shot of mountains at sunrise with flowing clouds",
"aspect_ratio": "16:9",
"resolution": "720p",
"duration": "8"
}'
Response:
{
"code": 200,
"message": "success",
"data": {
"task_id": "seed15abc123def456pro",
"status": "IN_PROGRESS"
}
}
Step 3: Check Status
Poll the status endpoint until the job completes:
curl -X GET 'https://seedanceapi.org/v1/status?task_id=seed15abc123def456pro' \
-H 'Authorization: Bearer YOUR_API_KEY'
Completed response:
{
"code": 200,
"message": "success",
"data": {
"task_id": "seed15abc123def456pro",
"status": "SUCCESS",
"consumed_credits": 28,
"created_at": "2026-02-07T10:30:00Z",
"request": {
"prompt": "A cinematic shot of mountains at sunrise with flowing clouds",
"aspect_ratio": "16:9",
"resolution": "720p",
"duration": "8"
},
"response": ["https://cdn.example.com/videos/seed15abc123def456pro.mp4"],
"error_message": null
}
}
💡 Tip: The
responsefield is an array of video URLs. Accessdata.response[0]to get the video URL directly.
Generation Modes
Text-to-Video
Generate a video purely from a text description:
{
"prompt": "A majestic eagle soaring through golden sunset clouds over ocean waves",
"aspect_ratio": "16:9",
"resolution": "720p",
"duration": "8"
}
Image-to-Video
Use a reference image to guide video generation. Pass an image URL via the image_urls parameter:
{
"prompt": "The character slowly turns and smiles at the camera",
"image_urls": [
"https://example.com/my-image.jpg"
],
"aspect_ratio": "16:9",
"resolution": "720p",
"duration": "4"
}
Note: The
image_urlsarray accepts a maximum of 1 image URL.
With Audio Generation
Enable AI-generated audio that syncs with your video content:
{
"prompt": "A peaceful river flowing through a forest with birds singing",
"aspect_ratio": "16:9",
"resolution": "720p",
"duration": "8",
"generate_audio": true,
"fixed_lens": true
}
API Parameters Reference
POST /v1/generate
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
prompt |
string | ✅ Yes | — | Text description of the video to generate (max 2000 characters) |
aspect_ratio |
string | No | 1:1 |
Output aspect ratio. Supported: 1:1, 16:9, 9:16, 4:3, 3:4, 21:9, 9:21 |
resolution |
string | No | 720p |
Video resolution: “480p” or “720p” |
duration |
string | No | 8 |
Video duration in seconds: “4”, “8”, or “12” |
generate_audio |
boolean | No | false |
Enable AI audio generation for the video |
fixed_lens |
boolean | No | false |
Lock the camera lens to reduce motion blur |
image_urls |
string[] | No | — | Array of reference image URLs for image-to-video generation (max 1 image) |
callback_url |
string | No | — | Webhook URL for async status notifications. Must be publicly accessible (no localhost) |
GET /v1/status
| Parameter | Type | Required | Description |
|---|---|---|---|
task_id |
string | ✅ Yes | The unique task ID returned from the generate endpoint |
Pricing
480p Resolution
Fast generation, suitable for previews and drafts.
| Duration | Without Audio | With Audio |
|---|---|---|
| 4s | 8 credits ($0.04) | 14 credits ($0.07) |
| 8s | 14 credits ($0.07) | 28 credits ($0.14) |
| 12s | 19 credits ($0.095) | 38 credits ($0.19) |
720p Resolution
High quality output, recommended for production.
| Duration | Without Audio | With Audio |
|---|---|---|
| 4s | 14 credits ($0.07) | 28 credits ($0.14) |
| 8s | 28 credits ($0.14) | 56 credits ($0.28) |
| 12s | 42 credits ($0.21) | 84 credits ($0.42) |
Code Examples
Python
import requests
import time
API_KEY = "YOUR_API_KEY"
BASE_URL = "https://seedanceapi.org/v1"
# Generate video
response = requests.post(
f"{BASE_URL}/generate",
headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
},
json={
"prompt": "A cinematic shot of mountains at sunrise with flowing clouds",
"aspect_ratio": "16:9",
"resolution": "720p",
"duration": "8"
}
)
data = response.json()
task_id = data["data"]["task_id"]
print(f"Task created: {task_id}")
# Poll for status
while True:
status_response = requests.get(
f"{BASE_URL}/status?task_id={task_id}",
headers={"Authorization": f"Bearer {API_KEY}"}
)
status_data = status_response.json()["data"]
if status_data["status"] == "SUCCESS":
video_url = status_data["response"][0]
print(f"Video URL: {video_url}")
break
elif status_data["status"] == "FAILED":
print(f"Error: {status_data.get('error_message')}")
break
time.sleep(10)
JavaScript / Node.js
const API_KEY = "YOUR_API_KEY";
const BASE_URL = "https://seedanceapi.org/v1";
// Generate video
const response = await fetch(`${BASE_URL}/generate`, {
method: "POST",
headers: {
"Authorization": `Bearer ${API_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
prompt: "A cinematic shot of mountains at sunrise with flowing clouds",
aspect_ratio: "16:9",
resolution: "720p",
duration: "8"
})
});
const { data } = await response.json();
console.log("Task created:", data.task_id);
// Poll for status
const pollStatus = async (taskId) => {
const statusResponse = await fetch(
`${BASE_URL}/status?task_id=${taskId}`,
{ headers: { "Authorization": `Bearer ${API_KEY}` } }
);
const statusData = await statusResponse.json();
if (statusData.data.status === "SUCCESS") {
const videoUrl = statusData.data.response[0];
console.log("Video URL:", videoUrl);
} else if (statusData.data.status === "FAILED") {
console.error("Error:", statusData.data.error_message);
} else {
setTimeout(() => pollStatus(taskId), 10000);
}
};
pollStatus(data.task_id);
Webhook Callbacks
Instead of polling the status endpoint, you can provide a callback_url in your generate request to receive completion notifications:
{
"prompt": "A serene mountain landscape at sunrise, time-lapse style",
"duration": "8",
"resolution": "720p",
"aspect_ratio": "16:9",
"callback_url": "https://your-app.com/api/seedance-callback"
}
When the task completes, the API will send the result to your callback URL, eliminating the need for polling.
Note: The
callback_urlmust be a publicly accessible HTTPS endpoint. Localhost URLs are not supported.
Error Handling
Error Codes
| Status | Code | Description |
|---|---|---|
| 400 | INVALID_PROMPT |
The prompt is invalid or empty |
| 400 | INVALID_ASPECT_RATIO |
Unsupported aspect ratio value |
| 400 | INVALID_RESOLUTION |
Resolution must be 480p or 720p |
| 400 | INVALID_DURATION |
Duration must be 4, 8, or 12 seconds |
| 400 | TOO_MANY_IMAGES |
Maximum 1 image URL allowed in image_urls array |
| 401 | INVALID_API_KEY |
API key is missing or invalid |
| 402 | INSUFFICIENT_CREDITS |
Not enough credits for this operation |
| 404 | TASK_NOT_FOUND |
Task ID not found or does not belong to your account |
| 500 | INTERNAL_ERROR |
Server error, please try again later |
Task Status Values
| Status | Meaning | Action |
|---|---|---|
IN_PROGRESS |
Generation is running | Continue polling (recommended: every 10s) |
SUCCESS |
Generation complete | Retrieve video URL from data.response[0] |
FAILED |
Generation failed | Check data.error_message, retry if transient |
Recommended Polling Strategy
async function pollUntilComplete(taskId, apiKey, maxAttempts = 60) {
const BASE_URL = "https://seedanceapi.org/v1";
for (let i = 0; i < maxAttempts; i++) {
const response = await fetch(
`${BASE_URL}/status?task_id=${taskId}`,
{ headers: { 'Authorization': `Bearer ${apiKey}` } }
);
const result = await response.json();
const data = result.data;
if (data.status === 'SUCCESS') return data.response[0];
if (data.status === 'FAILED') throw new Error(data.error_message);
// Wait 10 seconds between polls
await new Promise(resolve => setTimeout(resolve, 10000));
}
throw new Error('Generation timed out');
}
Best Practices for Production
-
Use descriptive prompts — The Seedance 2.0 model performs best with specific, detailed descriptions. “A woman walking” produces far less interesting results than “A woman in a red coat walking through falling snow on a quiet city street, tracked by a steadicam at waist height.”
-
Choose the right resolution — Use 480p for quick previews and drafts, and 720p for production-quality output. This also helps manage credit costs effectively.
-
Handle audio credits — Enabling
generate_audioroughly doubles the credit cost. Only enable it when audio is actually needed. -
Use the
fixed_lensparameter wisely — When you need stable, non-shaky video output, enablefixed_lensto reduce camera motion blur. -
Implement proper polling — Don’t poll too aggressively. A 10-second interval is recommended. Consider using the
callback_urlparameter for webhook-based notifications instead. -
Validate inputs client-side — Check prompt length (max 2000 characters), aspect ratio, resolution, and duration values before hitting the API to avoid unnecessary failed requests.
-
Monitor credit consumption — Track the
consumed_creditsfield in status responses to keep your usage in check and avoid unexpected costs.
Use Cases
E-commerce Product Videos
Upload a product photo and use image-to-video generation to create dynamic product showcases. Combine with fixed_lens for clean, professional-looking rotations and reveals.
Social Media Content
Generate short-form video content from text prompts. The 4-second duration option is perfect for social media clips and stories. Use 9:16 aspect ratio for vertical video platforms.
Marketing & Advertising
Create multiple video variants from different prompts for A/B testing ad creatives. The low per-video cost makes large-scale experimentation feasible.
Educational Content
Generate visual explainers and animated demonstrations from text descriptions. Pair with generate_audio for complete video content with synchronized sound.
Game & App Prototyping
Quickly generate visual concepts and motion tests using text-to-video. Great for concept art in motion and storyboard visualization.
FAQ
What is the Seedance 2.0 API? The Seedance 2.0 API is a RESTful interface for programmatic access to the Seedance 2.0 AI video generation model. It supports text-to-video and image-to-video generation with optional AI audio.
How do I get access to the Seedance 2.0 API? Visit seedanceapi.org to create an account. Navigate to the API Keys page in your dashboard to generate your API key.
What are the API endpoints?
There are two endpoints: POST /v1/generate for creating video generation tasks, and GET /v1/status for checking task status and retrieving results.
What parameters does the generate endpoint accept?
Required: prompt. Optional: aspect_ratio (default: 1:1), resolution (default: 720p), duration (default: 8s), generate_audio, fixed_lens, image_urls, and callback_url.
What programming languages can I use with the Seedance 2.0 API? The API is language-agnostic — any language that can make HTTP requests works. Common choices include Python, JavaScript/Node.js, Go, and Java. The API uses standard JSON request/response formats.
How long does video generation take? Generation times vary depending on resolution, duration, and whether audio generation is enabled. You should poll the status endpoint at 10-second intervals to check for completion.
What resolutions and durations are supported? Resolutions: 480p and 720p. Durations: 4, 8, or 12 seconds. Aspect ratios: 1:1, 16:9, 9:16, 4:3, 3:4, 21:9, 9:21.
How does the response structure work?
The generate endpoint returns { code, message, data: { task_id, status } }. The status endpoint returns the same structure with additional fields: consumed_credits, created_at, request, response (array of video URLs), and error_message.
How do I get the video URL from the status response?
The video URL is in the response array: access data.response[0] to get the video download URL.
Can I use the Seedance 2.0 API for commercial projects? Yes. All generated content can be used commercially. Review the terms of service at seedanceapi.org for full licensing details.
How does pricing work? Pricing is credit-based. Costs depend on resolution (480p vs 720p), duration (4s, 8s, 12s), and whether audio is enabled. For example, an 8-second 720p video without audio costs 28 credits ($0.14). Check seedanceapi.org/pricing for current rates.
Can I use a webhook instead of polling?
Yes. Include a callback_url parameter in your generate request. The API will send the completion result to your webhook URL. The URL must be publicly accessible (no localhost).
What happens if my generation fails?
Failed generations return a FAILED status with a descriptive error_message. Common causes include content policy violations or invalid parameters. Failed generations do not consume credits.
Is there a maximum prompt length? Yes, prompts can be up to 2000 characters long.
How many images can I provide for image-to-video?
The image_urls array accepts a maximum of 1 image URL.