AIPricingLabQ&A
Q&A

How do I implement freemium for an AI product?

Define two plans (free, pro) with different limit groups. Assign free on signup. Gate AI calls with reserve / commit / release. On limit_reached, show an upgrade prompt. On Stripe checkout success, switch the user to pro via vevee.upsertSubscription.

Last updated: 2026-05-10

Two plans, two limit groups

In the dashboard: plan_free with image.render quota of 20/month; plan_pro with quota 500/month. Match rule on both: event_type = "image.render". Same code path, different quotas.

On signup, assign the free plan

Idempotent - safe to call on every login.

await vevee.upsertSubscription({
  userId: user.id,
  planId: "plan_free",
});

Gate AI calls and catch limit_reached

When a free user hits 20 renders, the next reserve returns allowed=false. Render an upgrade modal in your UI.

On Stripe checkout, upgrade them

Switch them to plan_pro from your Stripe webhook handler. Counters keep ticking; the higher cap unblocks them.

await vevee.upsertSubscription({
  userId: internalUserId,
  planId: "plan_pro",
});

Close the cycling exploit

Use onPlanChange: "block" so users can't free-trial → pro → cancel → free-trial again to keep getting fresh quotas.

Related questions