Stop free-tier users burning your AI budget.
ProtAI is drop-in credit metering for your AI app. Per-user balances, spend alerts, and a kill-switch — live in three lines of code. Works with any AI provider.
Free for 1 project · No credit card · 5-minute setup
// before spending tokens on a user
const check = await protai.check(userId, "tokens");
if (!check.allowed) return showUpgrade(check);
// ... run your AI call as normal ...
// after: report what was spent
await protai.report(userId, "tokens", usage.totalTokens);The free-tier trap is real
One power user, one weekend
A single enthusiastic free-tier user can burn through $40+ of tokens before Monday. You find out from the invoice — not before.
Abuse looks like enthusiasm
Scripts, shared accounts, prompt-injection loops. Without per-user metering, you can't tell a fan from a freeloader until it costs you.
Building it yourself takes days
Balances, quotas, ledgers, alerts, Stripe top-ups — every AI founder rebuilds the same plumbing. Days you'll never get back.
Live in three steps
Create a meter
Name your unit — tokens, generations, minutes — and set a free monthly quota. Takes sixty seconds in the dashboard.
Add three lines of code
Wrap your AI call: check() before you spend, report() after. Works with any provider, any language with our SDKs.
Set your guardrails
Pick per-meter overage behavior — hard block or allow-and-alert — and arm the project kill-switch. Sleep well.
import { ProtAI } from "@protai/sdk";
const protai = new ProtAI(process.env.PROTAI_API_KEY!);
// gate the expensive call
const check = await protai.check(userId, "tokens");
if (!check.allowed) return showUpgrade(check); // reason: 'insufficient' | 'killed'
const usage = await openai.chat.completions.create({ /* ... */ });
// report what was actually spent
await protai.report(userId, "tokens", usage.usage.total_tokens);Everything between your users and your token bill
Per-user credits
Give every end user their own balance on any meter you define — tokens, generations, minutes, API calls. Free monthly quotas included, usage tracked to the unit.
Spend alerts + kill-switch
Get emailed the moment a user burns through 80% of quota — or when project-wide spend passes your threshold. One click freezes everything before the invoice lands.
Stripe credit packs
Sell top-ups directly: create a pack, share the payment link, and purchases land on the user's balance automatically via webhook. Heavy users fund themselves.
Pricing that costs less than one bad weekend
Flat monthly pricing. No per-call fees — ProtAI meters your usage, it doesn't run inference.
Starter
$19 /month
- 3 projects
- Unlimited meters
- 10,000 end users
- Email spend alerts
- Automatic kill-switch
- Stripe credit packs
Pro
$39 /month
- Unlimited projects
- Unlimited meters
- 100,000 end users
- Everything in Starter
- Priority support
Prices in USD. Cancel anytime.
Frequently asked questions
Does ProtAI work with my AI provider?
Yes. ProtAI is provider-agnostic — it never touches your model calls. You tell it how many units a user spent (tokens, generations, minutes, whatever you define) and it handles balances, quotas, and guardrails. OpenAI, Anthropic, Google, open-weight models, self-hosted — all the same integration.
Do I have to rewrite my AI code?
No. You wrap it: call check() before spending tokens on a user, and report() after. That's three lines with our JavaScript or Python SDK, or a plain HTTP call in any other language. Your existing prompts, models, and pipelines stay exactly as they are.
What happens when a user runs out of credits?
You decide per meter. Hard block returns allowed: false so you can show an upgrade prompt. Allow-and-alert lets usage continue but emails you immediately — useful for paying customers you don't want to interrupt mid-task.
How do paid credit packs work?
Create a pack in the dashboard (e.g. 1,000 generations for $9), share the Stripe payment link with your users, and completed purchases top up their balance automatically via webhook. No code on your side.
What does ProtAI cost me to run?
Nothing per API call. ProtAI meters your usage — it doesn't run inference — so our own costs are near zero, and we pass that on. Pricing is a flat monthly subscription based on projects and end users, not on how many checks you make.
Ship your AI app without the billing anxiety.
Set up your first meter in five minutes. Your future self — the one not staring at a surprise invoice — says thanks.