Webhooks (Callback URL)
Receive real-time HTTP POST notifications when your video generation tasks complete, fail, or are cancelled — instead of polling the task status endpoint.
Setting Up Callbacks
Include a callback_url in your generation request:
import requests
response = requests.post(
"https://api.evolink.ai/v1/videos/generations",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"model": "seedance-2.0",
"prompt": "A sunset over the ocean, cinematic wide shot",
"quality": "1080p",
"callback_url": "https://yourapp.com/api/video-callback"
}
)
Callback Payload
When the task completes (or fails), a POST request is sent to your callback_url. The response body format is identical to the task query API response:
Completed
{
"id": "task-unified-1756817821-4x3rx6ny",
"object": "video.generation.task",
"created": 1756817821,
"model": "seedance-2.0",
"status": "completed",
"progress": 100,
"results": [
"https://cdn.example.com/videos/task-unified-1756817821-4x3rx6ny.mp4"
],
"type": "video",
"task_info": {
"can_cancel": false
}
}
Failed
{
"id": "task-unified-1756817821-4x3rx6ny",
"object": "video.generation.task",
"created": 1756817821,
"model": "seedance-2.0",
"status": "failed",
"progress": 0,
"type": "video",
"task_info": {
"can_cancel": false
}
}
Callback Timing
- Triggered when task is completed, failed, or cancelled
- Sent after billing confirmation is completed
Callback Requirements
| Requirement | Details |
|---|---|
| Protocol | HTTPS only |
| Timeout | Your endpoint must respond within 10 seconds |
| Success | Return a 2xx status code to confirm receipt |
| Retries | Up to 3 retries on failure (after 1s, 2s, 4s) |
| URL length | Maximum 2048 characters |
| Network | Internal/private IPs are prohibited (127.0.0.1, 10.x.x.x, 172.16-31.x.x, 192.168.x.x) |
Related
- Async Tasks — Polling-based status checks
- Error Codes — Error code reference