import React, { useState, useEffect } from 'react'; import { Check, Loader2, Zap, Cpu, KeyRound, Send, HardDrive } from 'lucide-react'; import { useAuth } from '../contexts/AuthContext'; import { apiJson } from '../lib/api'; import { track } from '../lib/analytics'; import SegmentedControl from './ui/SegmentedControl'; const PLAN_ORDER = ['starter', 'creator', 'pro']; const PLAN_BLURB = { starter: 'For getting started', creator: 'For regular creators', pro: 'For power users & teams', }; const HIGHLIGHT = 'creator'; const FREE_MINUTES = 20; const fmt = (amount, currency) => new Intl.NumberFormat('en-US', { style: 'currency', currency: (currency || 'usd').toUpperCase(), maximumFractionDigits: 0 }).format((amount || 0) / 100); // Free tier + 3 paid tiers with monthly/annual toggle. Checkout requires sign-in. export default function PricingSection({ onRequireLogin }) { const { isSignedIn } = useAuth(); const [plans, setPlans] = useState([]); const [interval, setInterval] = useState('month'); const [loading, setLoading] = useState(true); const [busyPrice, setBusyPrice] = useState(null); useEffect(() => { apiJson('/api/billing/plans') .then((d) => setPlans(d.plans || [])) .catch(() => setPlans([])) .finally(() => setLoading(false)); }, []); const checkout = async (entry) => { if (!isSignedIn) { onRequireLogin?.(entry.price_id); return; } setBusyPrice(entry.price_id); // `source` segments this surface from the two modals (see TopUpModal), which // now emit the same three events. const props = { plan: entry.plan, interval: entry.interval, source: 'pricing' }; track('CheckoutStarted', { props }); // Stash the price so we can attach real revenue to the Subscribed goal when // the user returns from Stripe (see AccountPage's checkout=success handler). try { localStorage.setItem('os_pending_checkout', JSON.stringify({ plan: entry.plan, interval: entry.interval, amount: entry.amount, currency: entry.currency, })); } catch (_) { /* ignore storage errors */ } try { const { url } = await apiJson('/api/billing/checkout', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ price_id: entry.price_id }), }); track('CheckoutRedirected', { props }); window.location.href = url; } catch (e) { track('CheckoutFailed', { props: { ...props, reason: String(e?.detail || e?.message || 'unknown').slice(0, 120) } }); setBusyPrice(null); alert(e?.detail || 'Could not start checkout. Please try again.'); } }; if (loading) { return
; } const byPlan = (plan) => plans.find((p) => p.plan === plan && p.interval === interval); return (
{/* Free tier — no card, Google sign-in only */}

free

Try it on your own videos

$0 /mo
  • {FREE_MINUTES} min of video / month
  • YouTube URL or upload
  • Same GPU rendering, about 50s per 8-min video
  • Gemini key included, no setup
  • No credit card — Google sign-in
  • Watermark · clips kept 7 days

free minutes reset monthly.

{PLAN_ORDER.map((plan) => { const entry = byPlan(plan); if (!entry) return null; const highlight = plan === HIGHLIGHT; return (
{highlight && ( Most popular )}

{plan}

{PLAN_BLURB[plan]}

{fmt(entry.amount, entry.currency)} /{interval === 'month' ? 'mo' : 'yr'}
  • {entry.minutes} min of video / month
  • No watermark, no 7-day clip expiry
  • GPU rendering, about 50s per 8-min video
  • Gemini key + auto-posting included
  • {plan === 'pro' &&
  • Priority processing queue
  • }

billed {interval === 'month' ? 'monthly' : 'yearly'}. cancel anytime.

); })}
{/* What every plan includes vs what's bring-your-own-key */}
Included in every plan
  • Our NVIDIA GPU does the rendering. An 8-minute video is clipped in about 50 seconds, instead of the 5 to 8 minutes it takes on a typical CPU.
  • The Gemini API key is included. Nothing to sign up for, nothing to paste, no per-request quota of your own to babysit.
  • Auto-posting is already wired up for TikTok, Instagram Reels and YouTube Shorts.
  • Clips are stored and served for you, ready to re-open and re-edit from any browser.
  • Full YouTube Studio: titles, thumbnails and descriptions.

Your monthly minutes cover video processing. Titles & descriptions are free; AI thumbnail image generation uses ~3 min of your quota per batch.

Bring your own key

AI Shorts (AI-actor UGC videos) and voice dubbing use premium generation from fal.ai and ElevenLabs. Connect your own keys for those — you're billed by those providers directly (typically ~$0.65-2 per video). Your plan still covers the script & orchestration.

Managed credits for these are coming later — no keys needed.

start free right here, upgrade for more minutes and no watermark, or run it yourself on your own hardware.

); }