Callback
Pass callback_url when creating the task. The system will automatically poll the upstream provider and send a POST request to your URL when the task completes or fails.
Headers
| Header | Description |
|---|---|
Content-Type | application/json |
X-Event | Event type: task.completed or task.failed |
X-Task-Id | Task ID |
X-Timestamp | Unix timestamp (seconds) |
Completed
{
"id": "7d89c51e-9430-410e-909e-df347131ebaa",
"status": "completed",
"model": "doubao-seedance-2.0",
"created_at": 1774790227,
"completed_at": 1774796529,
"output": {
"urls": [
"https://ark-acg-cn-beijing.tos-cn-beijing.volces.com/doubao-seedance-2-0/...mp4?X-Tos-Algorithm=..."
],
"metadata": {
"seed": 41485,
"ratio": "16:9",
"duration": 5,
"resolution": "480p",
"generate_audio": true,
"framespersecond": 24
}
}
}
Failed
{
"id": "57c8772c-f834-46f3-9b7d-81f92e104050",
"status": "failed",
"model": "doubao-seedance-2.0",
"created_at": 1774793758,
"error": {
"code": "upstream_error",
"message": "The request failed because the input text may contain sensitive information. Request id: 0217747937596950e290995bd2535df6af5f05331d9ca5663eeee"
}
}
When a task fails, pre-charged credits are automatically refunded.
Retry Policy
If your server is unreachable or returns a non-2xx status, the system will retry up to 3 times:
| Attempt | Timing |
|---|---|
| 1st | Immediate |
| 2nd | 3 minutes later |
| 3rd | 10 minutes later |
If all 3 attempts fail, the callback is marked as failed. You can always fall back to polling GET /v1/tasks/{taskId} to check the final status.