Async Tasks
Every Seedance 2.0 video generation request is asynchronous. Submission returns a task ID immediately, and actual generation happens in the background. You can:
- Poll — call the endpoint on this page periodically to check progress
- Webhook — pass a
callback_urlwhen you submit; the system pushes the result to your URL. See Webhooks.
Query Task Status
GET https://api.evolink.ai/v1/tasks/{task_id}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
task_id | string | Yes | Task ID returned by the generation endpoint |
cURL Example
curl https://api.evolink.ai/v1/tasks/task-unified-1774857405-abc123 \
-H "Authorization: Bearer YOUR_API_KEY"
Task Lifecycle
pending → processing → completed
↘ failed
↘ cancelled
| Status | Meaning |
|---|---|
pending | Task created, queued, not yet started |
processing | Generating; progress updates continuously |
completed | Generation finished; results array contains the video URL |
failed | Generation failed; not billed |
cancelled | Task was cancelled on request |
Response Examples
Pending (just submitted)
{
"id": "task-unified-1774857405-abc123",
"object": "video.generation.task",
"created": 1774857405,
"model": "seedance-2.0-text-to-video",
"status": "pending",
"progress": 0,
"type": "video",
"task_info": {
"can_cancel": true,
"estimated_time": 165,
"video_duration": 5
},
"usage": {
"billing_rule": "per_second",
"credits_reserved": 50,
"user_group": "default"
}
}
Processing (generating)
{
"id": "task-unified-1774857405-abc123",
"object": "video.generation.task",
"created": 1774857405,
"model": "seedance-2.0-text-to-video",
"status": "processing",
"progress": 65,
"type": "video",
"task_info": {
"can_cancel": true
}
}
Completed
{
"id": "task-unified-1774857405-abc123",
"object": "video.generation.task",
"created": 1774857405,
"model": "seedance-2.0-text-to-video",
"status": "completed",
"progress": 100,
"results": [
"https://cdn.example.com/videos/task-unified-1774857405-abc123.mp4"
],
"type": "video",
"task_info": {
"can_cancel": false
}
}
Video URLs are valid for 24 hours. Download them to your own object storage (OSS / S3 / R2) before they expire.
Failed
{
"id": "task-unified-1774857405-abc123",
"object": "video.generation.task",
"created": 1774857405,
"model": "seedance-2.0-text-to-video",
"status": "failed",
"progress": 0,
"type": "video",
"task_info": {
"can_cancel": false
}
}
Failed tasks are not billed.
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Task ID |
object | string | Always video.generation.task |
created | integer | Unix timestamp of task creation |
model | string | The actual model ID used (matches submission) |
status | string | Current status — see the lifecycle table |
progress | integer | 0–100 percent |
results | array<string> | Only present in completed state; contains the video URL(s) |
type | string | Output type, always video |
task_info.can_cancel | boolean | Whether the cancel endpoint can still be called |
task_info.estimated_time | integer | Estimated seconds remaining |
task_info.video_duration | integer | Requested video duration in seconds |
usage.billing_rule | string | Always per_second |
usage.credits_reserved | number | Reserved credits |
usage.user_group | string | User group |
Polling Best Practices
- 5-second interval is a good balance between poll frequency and response latency
- Short videos (4–6 seconds) typically complete in 1–3 minutes; long videos or complex multimodal tasks take longer
- Production pipelines should prefer Webhooks over polling.
callback_urlminimizes request count and cost - Don't treat
progressas an exact ETA — it's a progress indicator; the model advances at different rates during different stages
Complete Python Example
import os
import time
import requests
API_KEY = os.environ["EVOLINK_API_KEY"]
headers = {"Authorization": f"Bearer {API_KEY}"}
# Submit task
response = requests.post(
"https://api.evolink.ai/v1/videos/generations",
headers={**headers, "Content-Type": "application/json"},
json={
"model": "seedance-2.0-text-to-video",
"prompt": "Rainy streets of Tokyo at night, neon reflections on wet asphalt",
"duration": 6,
"quality": "720p"
}
)
task_id = response.json()["id"]
# Poll for status
while True:
result = requests.get(
f"https://api.evolink.ai/v1/tasks/{task_id}",
headers=headers
).json()
status = result["status"]
print(f"[{status}] progress={result.get('progress', 0)}%")
if status == "completed":
print(f"Video URL: {result['results'][0]}")
break
if status in ("failed", "cancelled"):
print(f"Task ended with status: {status}")
break
time.sleep(5)
Related
- Webhooks — Use
callback_urlinstead of polling - Error Codes — Handle failure scenarios
- Quick Start