About this template
ShipAny Video Agent
A production-ready conversational AI video SaaS, built to rebrand and ship. Users describe a shot or attach source media; the agent decides how to use the material, chooses the right video tool, writes the cinematic prompt, renders the clip, and charges credits for it. Payments, subscriptions, credits, auth, admin, sharing, media library, and i18n are already wired.
Built on ShipAny (TanStack Start + Drizzle + better-auth). It runs on Node or Cloudflare Workers without relying on a writable filesystem.
What it does
The chat is an agent loop, not a prompt box. A message goes to an LLM that has
two tools — generate_video (text-to-video) and animate_image
(image-to-video) — and it picks one, writes the cinematic prompt, and calls it.
That's why a user can say "slow push in on her while the background goes soft"
and get a clip back instead of a form to fill in.
Around that loop:
- Agent-owned media routing — the composer only asks users to upload from their device or choose something from their library. The agent decides whether each image, audio file, or video is a frame or reference input and maps it to the generation tool's parameters.
- Video Lite-compatible composer — MiniMax H3 and Seedance 2.5 expose the
same duration, resolution, aspect-ratio, provider model mapping, and example
behavior as
shipany-video-lite. - Living showcase — examples use a responsive masonry layout, load and autoplay only near the viewport, and open in a full-screen preview with “Use this prompt” and “Use as reference” actions.
- Credits — priced per model and per second from a catalog, deducted atomically, refunded when a render fails or is canceled. A 10-second clip costs twice a 5-second one before resolution multipliers. The turn is refused up front when the balance is short, so nobody pays for an LLM turn that ends in a paywall.
- Paywall that fits — someone without a plan is shown plans; someone on a plan who ran dry is shown top-ups. The server decides which.
- Providers — gRouter, Fal, and Replicate, all configured in the admin panel. The model catalog maps a single UI choice to the id each provider expects, so switching providers does not change what the user selected.
- Renders take minutes, not seconds — the tool polls for up to 15 minutes at a 5-second interval. The upstream and local task ids are persisted; the composer becomes a stop button while work is active, cancellation is sent upstream when supported, and stale unfinished transcript rows are shown as interrupted instead of spinning forever.
- Stateless — conversation history replays from the database each turn, and generated clips go straight to object storage. No session files, no disk.
- Product shell included — chat history, reusable media library, clip preview/download, public share pages, bilingual UI, billing, top-ups, and an admin settings/test surface are included.
