Seedance 2.5 video generation
seedance2.5 handles text-to-video and video generation driven by reference media: images, video and audio. Use the async task API: create a task, then check progress with its task ID.
Before you start
Use the dedicated group
When you create the API key, pick the Image & Video group (图片视频专用分组). Seedance 2.5 bills per generated second, with a reference price of $0.057 / second.
For example, a 4-second clip costs about $0.23. Models and prices may change. The console and live pricing are the source of truth.
Async flow
| Step | Method and path | Notes |
|---|---|---|
| 1. Create a task | POST /v1/videos | Returns the task id and a queued status |
| 2. Check the task | GET /v1/videos/{id} | Poll every 10–15 seconds |
| 3. Get the video | video_url in the response | Download it once completed |
Don't count on a synchronous wait
In our tests, adding wait: true to the create request still returns a queued async task. Save the id and poll, so you avoid long-connection timeouts and accidentally submitting (and paying for) duplicate tasks.
Create a text-to-video task
curl https://ai.flashapi.top/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance2.5",
"prompt": "a cute kitten playing with a ball of yarn, cinematic lighting",
"size": "1280x720",
"seconds": "4",
"generate_audio": false
}'Create an image-to-video task
The reference image can be a publicly reachable URL or a data: base64 string. For multiple images, use the images array.
curl https://ai.flashapi.top/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance2.5",
"prompt": "slow cinematic push-in, drifting clouds, golden hour",
"size": "1280x720",
"seconds": "4",
"input_reference": "https://example.com/reference.jpg"
}'Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Always seedance2.5 |
prompt | string | Conditional | Describe the content, camera work and style. Required when content isn't provided |
seconds | string | No | Duration as a string, "4"–"30". Defaults to "4" |
duration | integer | No | Duration as an integer, 4–30. Use either this or seconds |
size | string | No | WIDTHxHEIGHT, e.g. 1280x720 |
ratio | string | No | auto, 21:9, 16:9, 4:3, 1:1, 3:4, 9:16. Overrides the aspect ratio from size |
resolution | string | No | 480p or 720p |
generate_audio | boolean | No | Whether to generate audio. Defaults to true |
seed | integer | No | Random seed. -1 means random |
input_reference | string / array | No | Reference media URL or data: base64 |
images | string / array | No | Reference images, up to 30 |
content | array | No | Multimodal content. Can replace the top-level prompt and reference media |
Multimodal references
content accepts text, image_url, video_url and audio_url. Up to 30 images, 10 videos and 10 audio clips.
{
"model": "seedance2.5",
"seconds": "4",
"ratio": "16:9",
"resolution": "720p",
"content": [
{"type": "text", "text": "gentle camera push-in, soft morning light"},
{
"type": "image_url",
"image_url": {"url": "https://example.com/reference.jpg"}
}
]
}Reference URLs must be publicly reachable and allow server-side downloads. If they aren't, switch to data: base64 or a directly accessible object storage URL.
Create-task response
{
"id": "video_976521f793cf4d80a7b1a091",
"object": "video",
"model": "seedance2.5",
"status": "queued",
"progress": 0,
"seconds": "4",
"size": "1280x720",
"created_at": 1785248785
}Check a task
curl https://ai.flashapi.top/v1/videos/video_976521f793cf4d80a7b1a091 \
-H "Authorization: Bearer YOUR_API_KEY"In progress:
{
"id": "video_976521f793cf4d80a7b1a091",
"object": "video",
"status": "in_progress",
"progress": 35,
"seconds": "4"
}Completed:
{
"id": "video_976521f793cf4d80a7b1a091",
"object": "video",
"status": "completed",
"progress": 100,
"seconds": "4",
"video_url": "https://example-cdn.com/generated-video.mp4",
"completed_at": 1785249046,
"usage": {"seconds": 4, "video_count": 1}
}Failed:
{
"id": "video_976521f793cf4d80a7b1a091",
"status": "failed",
"error": {
"code": "generation_failed",
"message": "content moderated"
}
}| Status | Meaning |
|---|---|
queued | In the queue |
in_progress / processing | Rendering. Read progress if present |
completed | Done. Read video_url |
failed | Failed. Check error.message |
Full Python example
import os
import time
import requests
api_key = os.environ["FLASH_API_KEY"]
base_url = "https://ai.flashapi.top"
headers = {"Authorization": f"Bearer {api_key}"}
created = requests.post(
f"{base_url}/v1/videos",
headers=headers,
json={
"model": "seedance2.5",
"prompt": "a red hot air balloon over green mountains at sunrise",
"size": "1280x720",
"seconds": "4",
"generate_audio": False,
},
timeout=60,
)
created.raise_for_status()
task_id = created.json()["id"]
deadline = time.monotonic() + 20 * 60
while time.monotonic() < deadline:
try:
response = requests.get(
f"{base_url}/v1/videos/{task_id}", headers=headers, timeout=30
)
response.raise_for_status()
task = response.json()
except requests.RequestException:
time.sleep(12)
continue
if task["status"] == "completed":
print(task["video_url"])
break
if task["status"] == "failed":
raise RuntimeError(task.get("error", "Video generation failed"))
time.sleep(12)
else:
raise TimeoutError(f"Task {task_id} didn't finish within 20 minutes; you can keep polling later")Troubleshooting
| Symptom | Fix |
|---|---|
| Reference media returns HTTP 403 | The host blocks server-side downloads. Use a directly reachable URL or data: base64 |
content moderated | Adjust the prompt or reference media and retry |
Upstream rate limit or DataDome 429 | Wait for the channel to recover, then retry. Don't keep creating new tasks |
| Network error while polling | Keep polling with the same task ID. Don't recreate the task |
Notes
- Poll every 10–15 seconds, with an overall timeout of at least 20 minutes.
- 720p is the highest supported resolution. Higher values may be downgraded to 720p.
- Use
video_urlonce the task completes. Don't rely on/v1/videos/{id}/contentfor now. - Cost depends on the requested duration, so test with 4 seconds first.