A ten-second rap video sounds like a small job: take a portrait, generate a performance, return an MP4.
A request can time out after the provider has already accepted the job. The video might then finish after the user closes the tab. And before any of that, there is a simpler problem: the generated scene might have the wrong face.
I'm building RapVideo, a web app that turns one or two portraits into short rap performances. Its main workflow has two generation steps, with a scene review between them. The application uses React and TanStack Start, runs on Cloudflare Workers, and keeps task state in D1. Generated media goes into R2.
The prompts are only one part of the implementation. Much of the code deals with what happens after a request leaves the server.…