Cấu hình một URL webhook để tự động nhận một callback POST khi một lần render hoàn tất (thành công hoặc thất bại). Bạn có thể thiết lập URL trong Render Console hoặc thông qua lập trình.
curl -X POST https://render-api.chillin.online/user/webhook \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"url": "https://your-domain.com/webhook"}'curl -X POST https://render-api.chillin.online/user/webhook/test \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"url": "https://your-domain.com/webhook"}'{
"render_id": 123,
"user_id": 456,
"status": "success",
"video_url": "https://cloud.chillin.online/video_xxx.mp4",
"json_url": "https://cloud.chillin.online/project_xxx.json",
"error_message": "",
"error_log_url": "",
"cost": 0.05,
"duration": 10.5,
"finished_at": "2024-01-01T12:00:00Z"
}
POST được gửi ngay lập tức sau khi lần render hoàn tất.status (success hoặc failed) cùng với error_message/error_log_url để xử lý các lỗi một cách hợp lý.