Case study · Creator economy / SaaS · 13 weeks

AI Pitch Engine for UGC Creators - 20x Cheaper AI, Same Quality

A three-app SaaS that helps UGC creators find verified brand contacts, write cold pitches that don't read like AI, send them from their own mailbox on a schedule, and pay through a credit and subscription stack whose prices come from measured costs.

  • 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
Client
Early-stage creator-economy SaaS
Industry
Creator economy / SaaS
Engagement
13 weeks
Timeline
Jun 2026 - Sep 2026

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.

Architecture: creator app and admin console call a same-origin API proxy to a FastAPI backend that talks to Gemini, Nylas and Stripe, with a five-minute campaign cron
Three apps, one backend, one database, and a cron that sends mail, advances sequences and grants monthly credits.

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

  1. 01Pitches that read like a person wrote them, checked before they reach an inbox
  2. 02Scheduled multi-step campaigns that never double-send and never fail silently
  3. 03A price ladder with healthy margins, built on measured costs rather than estimates
  4. 04Billing and credits that can be audited line by line

04Approach

How it was delivered: phased, with clear checkpoints and evidence at each step.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

Campaign engine: every five minutes claim up to 30 due recipients with row locks, check the send window and quota, write the step just in time, send from the creator's mailbox, and stop the sequence on reply
Recipients who can't send yet are parked with a reason, not failed. Tap to open full size.

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 pitches: hard prompt constraints, a separate self-critique call, deterministic cleanup in code, and a non-LLM quality score
Four layers between a draft and the inbox. Only two of them involve the model. Tap to open full size.

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

Email

  • 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
Cost of one pitch: $0.073 worst case and $0.0244 typical with thinking uncapped, $0.0012 with thinking at minimal; uncapped would cost 16 to 23 points of gross margin per tier
Measured from the real cost log on every call, not estimated. Tap to open full size.
A free user costs $0.04 a month with no mailbox and $2.07 with one; upgrading a tier costs $0.20 per credit while the smallest credit pack costs $0.33
Pricing decisions that came straight out of the cost measurements. Tap to open full size.
Business impact

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

Ready to start something similar? Start with one call.

A 30-minute call, no pitch deck. If it’s not a fit, I’ll point you to someone it is.

Book a free scoping call
What happens after you book
  1. A 30-minute call about your workflow
  2. A one-page scope with price and timeline, free
  3. You decide: build, or keep the scope and walk away