{ "generation_id": "550e8400-e29b-41d4-a716-446655440000", "status": "failed", "prompt": "A beautiful sunset over the ocean", "video_url": null, "created_at": "2025-11-24T10:00:00.000000", "completed_at": "2025-11-24T10:02:00.000000", "error_message": "Image contains photorealistic people. Please try with a different image."}
Retry Policy: Up to 5 attempts with exponential backoffBackoff Strategy: 30s, 60s, 120s, 240s, 480sFailure Handling: After 5 failed attempts, the webhook is marked as failed
Timeout Handling
Request Timeout: 30 seconds per webhook requestConnection Timeout: 10 seconds to establish connectionBest Practice: Respond quickly with a 200 status code
Security
HTTPS Required: All webhook URLs must use HTTPSValidation: Always validate the generation_id in your webhook handlerIP Allowlist: Consider restricting access to RunBlob’s IP ranges
def verify_webhook(data): required_fields = ['generation_id', 'status', 'prompt'] # Check required fields if not all(field in data for field in required_fields): return False # Verify generation_id format (UUID) try: uuid.UUID(data['generation_id']) except ValueError: return False # Verify status value if data['status'] not in ['completed', 'failed']: return False return True
For production environments, consider implementing additional security measures like webhook signatures or API key validation.