Problem
AI video tools are expensive, English-only and fragile: providers fail, block prompts or time out, and users lose credits. Klipmatic aims to give Uzbek creators a one-click studio that just works and never charges for a failed generation.
What I built
As co-founder and lead engineer I wrote all of it: the Django API, the Next.js web app and the Refine admin. The product pivoted in July 2026 from “faceless video on autopilot” to a cinema and shorts studio.
Front · Web
- Next.js 15 with React 19 and only four runtime dependencies; 14 pages including create, templates, cinema, reels, enhance, library and wallet.
- Uzbek-first copy, so’m prices, Payme and Click top-ups, Telegram login through a server-side OAuth redirect.
Behind · Servers
- Every generation runs in one atomic transaction: debit credits, create the job, queue it on commit.
- An append-only ledger with
balance_after, row locks and a fixed lock order makes refunds idempotent and deadlock-free. - A reconciler every 2 minutes finds stuck jobs, with hard cutoffs of 60 minutes for video and 20 for everything else.
Inside · AI
- 14 models from 5 providers (BytePlus Seedance, fal, Gemini, Imagen, Replicate) behind an ordered fallback chain with health checks; “content blocked” is final, never retried elsewhere.
- Cinema Studio: a screenplay writer, a shot planner and a paid render step with lip-synced dialogue, stitched with ffmpeg crossfades and burned-in captions.
Hard problems
- Never charge for a failure — solved with the ledger design above and a single refund path used by both the system and the admin.
- Providers that fail differently — normalised errors per adapter so the fallback chain can decide “retry elsewhere” vs “stop”.
- Pricing that stays profitable — prices derive from the model registry and a cost model, validated by a test.
Results
A working studio at klipmatic.ai, a partner API that Zynygram buys video through, and a place in the UzCombinator Founders Camp 2026.
