## Inspiration

Most AI video tools are a thin layer on top of someone else's model: one prompt, one black box. If the result isn't right, you regenerate the whole video and pay for all of it again. A short vertical video can mean fifteen generations, so one bad 3-second scene turns into a full-price retry, every time.

We wanted the opposite: a video built brick by brick, where every step can be validated or redone on its own, and where the cost stays visible and under control. "Vivi" stands for viral video.

## What it does

Vivi turns an idea into a finished 9:16 video: idea → story → script → references → clips → voice → music → edit → metadata.

  • Redo only what's wrong. Tell the AI what you want for one scene, it reworks that scene's prompt, and only that clip is regenerated. For a video of $N$ scenes, a full retry costs $N \cdot c$ generations while a single-scene fix costs $c$, so the saving is a factor of $N$ (15 generations vs 1 in our demo).
  • Independent scenes. Scenes are not chained by default, so changing one never touches the others. Recurring characters, props and settings stay consistent through shared reference elements.
  • Your choice of models. Open-weight models (Wan 2.2 and Flux through ComfyUI, Gemma through Ollama) with four quality profiles (Fast, Balanced, Precision, Max), or big providers (Claude, Gemini, fal.ai, ElevenLabs), chosen per step and per project. In the SaaS plan the open-weight models are hosted by us, so there is no middleman taking a cut of each generation.
  • Costs you can trust. Credits pay for exactly what you generate, and every project has a spending cap enforced before a paid call is made.

## How PayPal is used

  • Monthly subscription through PayPal Subscriptions, and one-off top-ups through PayPal Orders.
  • Payments are confirmed by a signed webhook, and the state is re-read from PayPal rather than trusted from the browser.
  • Credits are granted once and only once: every grant carries a unique key (for a subscription cycle it is built from the subscription id and the month), so retries and duplicate webhook deliveries cannot credit twice.
  • Cancel any time and keep the month you paid for.
  • Verified end to end in the PayPal sandbox: a $19 subscription approved, 400 credits granted once, a $10 top-up added 200 credits, and the final balance of 600 credits matches the ledger.

## How we built it

  • Backend: FastAPI plus an Arq worker. The API never calls a provider itself: it enqueues a job, the worker runs it, and progress reaches the browser through Redis pub/sub and server-sent events.
  • Storage and data: PostgreSQL, Redis, and MinIO (S3) with presigned URLs.
  • Editing: FFmpeg assembles clips, voice, music and subtitles.
  • Admin app: React and Vite, with a graphite "Studio" design system, available in English and French.
  • Cost control: every provider call goes through one tracked wrapper that logs it, applies timeouts and retries, and feeds the per-project budget.
  • Demo video: captured from the real app, assembled with Remotion, narrated with an open text-to-speech model.

## Challenges

  • Never charging twice. Payments and generations are both "do it once" problems. We used idempotency keys for credits, and a job that is interrupted is never replayed automatically, because a replay could trigger a second paid call.
  • Honest estimates. Our own time estimate for one clip was about 7.5 minutes, but the real generation took almost 28 minutes on our test machine because the scene was chained to the previous one. The app now flags when a run takes longer than expected, and we only claim what we measured: 1 generation instead of 15.
  • Consistency across scenes. Keeping the same character, product and setting from scene to scene, while still letting each scene be regenerated alone, shaped the whole data model.
  • Keeping the demo honest. We filmed the real app, including a real single-scene regeneration, instead of mock-ups.

## What we learned

  • Control is a product feature: when each step is a separate brick, users trust the result and the bill.
  • Cost per scene, not cost per video, is the right unit for AI video.
  • Open-weight models plus good orchestration can be competitive with closed providers, as long as you can still plug the big providers in where they are better.

## What's next

  • Add more providers, and add the best new open models as they appear.
  • Template packs for recurring formats (product launch, real estate, food, travel).

Built With

Share this project:

Updates

Submission history