01Overview
UGC creators need three things: a brand contact that actually works, a pitch that doesn't sound written by a machine, and a way to send and follow up without babysitting a spreadsheet. The platform is a creator app, an internal operations console and one FastAPI backend: 110 API endpoints, 22 database tables and a campaign engine driven by a five-minute cron. Creators browse a curated brand directory for free and spend a credit to unlock a contact email. An LLM drafts the pitch, a separate call critiques it, and the campaign engine sends it through the creator's own mailbox inside business hours, then tracks opens, clicks and replies.

02The Challenge
Cold pitching brands is where most UGC creators stall. Finding a working contact takes hours, and AI writing tools produce emails that brand inboxes now recognise and ignore: the same openers, the same rhythm, curly quotes and em dashes that also trip spam filters. The product had to fix both without becoming a spam cannon, which meant scheduled sending from the creator's own mailbox, unsubscribe handling and bounce suppression from day one. It also had to make money at every tier. The first cost analysis concluded the product could offer unlimited AI. Once every model call logged its real token count and dollar cost, that conclusion reversed: with the model's thinking left uncapped, a single pitch spent over 7,700 hidden reasoning tokens across the draft and the critique, and the worst case cost 60 times more than it needed to.
Pain points we set out to solve
- Hours spent finding a brand contact that actually replies
- AI-written pitches that brands spot and ignore
- Sending at scale without hurting the creator's own sender reputation
- An early cost model that said 'unlimited AI' and was wrong
03Objectives
- 01Pitches that read like a person wrote them, checked before they reach an inbox
- 02Scheduled multi-step campaigns that never double-send and never fail silently
- 03A price ladder with healthy margins, built on measured costs rather than estimates
- 04Billing and credits that can be audited line by line
04Approach
How it was delivered: phased, with clear checkpoints and evidence at each step.
- Week 1-3
Foundation and email
FastAPI with Supabase auth and row-level security, a shared design system, then a real two-way email integration: hosted OAuth for the creator's mailbox, thread sync, webhooks and open, click and bounce tracking.
- Week 4-5
Campaign engine
A just-in-time state machine on a five-minute cron: claim up to 30 due recipients with row locks, respect each campaign's hours, weekdays and timezone, write step N+1 only after step N sends, and park rather than fail anything that can't go out yet.
- Week 6-9
AI hardening
Structured JSON output for every call, a self-critique pass by a separate call, deterministic cleanup, few-shot examples from the creator's own best pitches, and a switch from the SDK to plain HTTPS when the SDK broke the serverless bundle limit.
- Week 10-13
Billing, security and launch
Subscriptions, credit packs and an append-only credit ledger, an admin console with four server-enforced roles, a pricing model built from measured costs, and a pre-launch security review that found and fixed five issues.

05The Solution
The pitch writer is built on the assumption that the model's first draft will sound like a model. A prompt with 40 banned phrases and rules on sentence rhythm, subject lines and length comes first. A second, separate call grades the draft against a 7-point rubric and regenerates once if it fails, so the writer never judges its own work. Code then removes what the model can't be trusted to avoid, and a non-LLM score flags anything spammy without ever blocking a send.

Four layers against AI-sounding copy
Prompt constraints, an independent critique call, deterministic cleanup (straight quotes, no em dashes, no emoji, ASCII only) and an advisory quality score.
Just-in-time campaign engine
Row-locked claiming so overlapping runs can't double-send, per-send commits, business-hours windows by timezone, and quota overruns parked until next month with a reason.
Learning that pays off at volume
An epsilon-greedy bandit picks subject lines by open rate, send times shift to when this creator's emails get opened, and past winning pitches become examples.
Compliance from the first send
Signed unsubscribe links in every footer, a public unsubscribe page, per-creator suppression, and hard bounces suppressed across all future campaigns.
Credits as an append-only ledger
No balance changes without a matching ledger row in the same transaction. Row locks stop two concurrent unlocks spending the same credit twice.
Security reviewed before launch
Fixed an open redirect on the payment return URL, a dev-only login shortcut reachable on some hosts, a wildcard CORS policy, a webhook retry that could drop a paid invoice, and unhandled 3-D Secure renewals.
06Technology stack
Picked for latency, cost, and long-term maintainability — not for novelty.
AI
- Gemini (structured output)
- Self-critique rubric
- Per-call token and cost logging
- Nylas v3
- Hosted OAuth
- Open, click and bounce webhooks
Backend / Data
- FastAPI
- SQLAlchemy 2
- Postgres (Supabase)
- Versioned SQL migrations
Billing
- Stripe subscriptions
- Stripe one-off credit packs
- Append-only credit ledger
Frontend / Deploy
- React 19
- Vite
- HeroUI
- Tailwind 4
- Vercel + cron
07Results
- 20×Cheaper per AI pitch after capping thinking tokens
- ~20 ptsGross margin protected on each paid tier
- 50×Lower monthly cost of a free user, by design
- 5Security issues found and fixed before launch


The pricing ladder is built on measured costs, and one model setting is what keeps it viable. The same measurements shaped the product: the free tier ships without a mailbox because the email provider bills for each connected one even when it sits idle, and credit packs cost more per credit than upgrading, so the pricing page argues for the upgrade on its own.
08Key takeaways
- Log the real token count and dollar cost of every LLM call. Here, hidden thinking tokens outnumbered the visible answer about 30 to 1
- The biggest cost in an AI product may not be the AI. Here it was a per-mailbox fee from the email provider
- Have a separate call judge the draft. A model grading its own writing is too forgiving
- Park work that can't run yet instead of failing it. Campaigns resume on their own
- Keep a disproved analysis with a warning banner. The reversal is part of the record