How the 20-second video pipeline works
A signed-in customer will upload one permitted image to private R2 storage. A server-verified order then creates a durable database job linked to the correct 9:16 or 16:9 authorized template.
Background generation
The worker submits either MiniMax H3 Max Recast or Seedance 2.5 Reference-to-Video through the fal queue SDK. It stores the provider request ID, checks real queue state, and never relies on an open browser tab.
Private result handling
After fal returns a real video URL, the worker imports the MP4 into private storage and marks the job completed. Only the owning Supabase user can request a short-lived download URL.
Failure safety
If provider submission may have succeeded but the database did not save its request ID, the job moves to manual review. It is not blindly resubmitted, which helps prevent duplicate cost.