from fastapi import FastAPI, Request
app = FastAPI()
@app.post("/webhook")
async def webhook(request: Request):
event = await request.json()
match event.type:
case 'video.started':
print('Video processing started')
case 'video.completed':
print('Video processing completed')
case 'video.errored':
print('Video processing errored')
return {"success": True}