Stop building auth and billing.
Start building your AI product.
Every AI SaaS startup needs the same plumbing: streaming chat, credit-based metered billing, provider failover, and rate limiting. BreafIO gives you all of it on day one — so you can focus on what makes your AI product unique.
The AI SaaS Stack
Everything your AI startup needs — wired together and production-ready.
Streaming Chat
Real-time token streaming with the Vercel AI SDK. No spinner-then-dump UX — users see responses as they generate.
Credit Billing
Metered usage billing via Stripe. Reserve credits before the call, true up after. Never lose money on a long response.
Multi-Provider
Swap between OpenAI, Anthropic, or any OpenAI-compatible API with a single env variable. No vendor lock-in.
Rate Limiting
Per-user request and token limits. Protect your API budget from runaway scripts and abuse.
What You Can Build
The AI Starter Kit is the foundation for any AI-powered SaaS product.
The Billing Problem Every AI Startup Hits
You launch your AI product. Users love it. Then your OpenAI bill arrives. A single user running complex prompts for a week costs you more than they paid for a month of access. This is the #1 reason AI startups fail financially.
BreafIO's credit-based metered billing solves this at the infrastructure level. Users purchase credits upfront. Every API call reserves credits before execution and trues up after. If a response costs more credits than reserved, the user's balance is debited accordingly. If it costs less, the difference is refunded. You never serve a request you can't afford.
This is not a feature you bolt on later — it is baked into the data model from day one. Grants, consumptions, and adjustments are all rows in an append-only ledger. When a customer asks “where did my credits go?” you have the answer in seconds.
Why Not Just Use ShipFast or Supastarter?
ShipFast and Supastarter are excellent general-purpose SaaS starters. But neither ships with AI-specific infrastructure. You would need to build streaming chat, credit metering, provider failover, and token-level rate limiting yourself — which typically takes 2-4 weeks of focused development.
BreafIO's AI Starter Kit includes all of this out of the box. The chat route streams tokens via the Vercel AI SDK. The billing system uses reserve-then-true-up accounting. Rate limiting is per-user with configurable limits. And the whole thing is built on Next.js App Router with TypeScript and Prisma — the same tech stack you would choose anyway.
Your AI product deserves a real billing foundation.
Don't let metered billing be the thing that kills your startup. Get it right from day one.
FAQ
Does it work with OpenAI and Anthropic?
Yes. It ships with Anthropic SDK integration by default, but the provider layer is abstracted — swap to OpenAI or any OpenAI-compatible API by changing an environment variable.
Can I use a different database?
The default is Prisma + PostgreSQL, but the billing and rate limiting logic is framework-agnostic. You can adapt it to Supabase, Drizzle, or any ORM.
Is this a library or a full codebase?
Full codebase. You get the complete Next.js project with auth, billing, chat, and rate limiting wired together. Modify anything you want.
What if I outgrow the in-memory rate limiter?
The rate limiting module is designed with a swap point for Upstash Redis. The exact file and line are marked in the codebase.