Charge for AI usage before it charges you.
Sell credit packs, set limits per plan and top up automatically when a balance runs low. Your users always see what they have left.
What it isBuildBase is one SDK and console for React apps with credits, usage limits, billing and sign-in built in.
100credits left
- Bought a pack+100Balance after: 100 credits.
- Generated 60 images-60Balance after: 40 credits.
- Balance running low-30Balance after: 10 credits.
- Auto top-up+90Balance after: 100 credits.
Example numbers. Your packs, prices and limits are yours to set.
How a request gets paid for
The same path every time a user runs your AI feature.
- Step 1
Check
Your server asks BuildBase whether the workspace has the credits or quota for this request.
- Step 2
Run
The AI call runs only after the check passes, so nobody gets a free request.
- Step 3
Deduct
Credits are consumed and the user's balance updates at once.
- Step 4
Top up
When a balance runs low, a workflow can warn the user, or auto top-up buys the next pack.
What AI features cost when nobody meters them
Every request costs you money. Without credits or limits, your best users are also your most expensive ones.
Without it: A way to sell usage, not only a monthly plan
Already covered: Credit packs bought through your own Stripe
Without it: A limit on what Free users can run
Already covered: Usage limits per plan, checked before the request runs
Without it: A balance users can see and trust
Already covered: Balances that update the moment credits are used
Without it: A top-up before users hit zero
Already covered: Auto top-up buys the next pack when a balance runs low
Without it: Promotional credits without a spreadsheet
Already covered: Grants that expire on a schedule
Usage billing for AI, already built
Credit packs
Sell packs on your own Stripe, so heavy users buy more instead of costing you more.
Credits moduleLimits per plan
Set how much each plan may use, so your free plan stays affordable to run.
Billing moduleA balance users can see
Balances update as credits are consumed, so users always know what they have left.
Credits moduleAuto top-up
The next pack is bought when a balance runs low, so work does not stop halfway.
Credits moduleGrants that expire
Give promotional credits on a schedule, so a launch offer costs what you planned.
Credits moduleOverage on Stripe meters
Usage past an allowance can be reported to Stripe Billing Meters, so a big month bills correctly.
Billing module
Building credits yourself
Credit packs, plan limits, top-ups and payment events, built with an AI coding agent and kept running, against setting them up here.
Plan
Compared with building these 3 modules yourself with an AI coding agent: Credits, Billing, Webhooks.
You keep, over 1 year
$7,295
- Build it yourself
- $7,905
- BuildBase
- $610
A year of Launch costs the same as 3 h 10 min of your time. See what each plan includes.
Pick your own modulesCredits in three steps
Create your packs
In the console, define your credit packs, the limit each plan includes and when to top up.
Console: Credits - Credit pack
- Starter pack
- Plan limit
- ai-generations, monthly
- Auto top-up
- On when low
- Grant
- Launch offer, expires
Check before you spend
On your server, before each AI request, check the quota and consume the credits it uses.
app/api/generate/route.tsTSXimport BuildBase from '@buildbase/sdk'; const bb = BuildBase({ serverUrl, orgId, getSessionId }); // Record usage and check quota const usage = await bb.usage.record(workspaceId, { quotaSlug: 'api-calls', quantity: 1, }); if (usage.available <= 0) { return Response.json( { error: 'Quota exceeded' }, { status: 429 } ); } // Consume credits const result = await bb.credits.consume( workspaceId, { amount: 10, description: 'AI generation' } );Show the balance
Show what is left, and a prompt to buy more when it runs low, from the same SDK.
components/ai-feature.tsxTSXimport { useCreditBalance, useConsumeCredits, useExpiringCredits, WhenCreditsExhausted, WhenCreditsLow, } from '@buildbase/sdk/react'; function AIFeature({ workspaceId }) { const { balance } = useCreditBalance(workspaceId); const { consumeCredits } = useConsumeCredits(workspaceId); const { expiringCredits } = useExpiringCredits(workspaceId, 7); const handleGenerate = async () => { try { await consumeCredits({ amount: 10, description: 'AI generation' }); // proceed with generation } catch (err) { if (err.code === 'INSUFFICIENT_CREDITS') { // err.available and err.requested are available } } }; return ( <> <p>Credits: {balance?.available}</p> {expiringCredits > 0 && <p>{expiringCredits} credits expire soon</p>} <WhenCreditsLow threshold={10}> <p>Running low — buy more credits.</p> </WhenCreditsLow> <WhenCreditsExhausted> <p>No credits left.</p> </WhenCreditsExhausted> <button onClick={handleGenerate}>Generate (10 credits)</button> </> ); }
Running in production on six products today, all of them ours.
- OnceBooks(opens in a new tab)Personalised children's books
- PlugNode(opens in a new tab)Visual AI workflow builder
- AgentCenter(opens in a new tab)Mission control for AI agents
- Imejis(opens in a new tab)Template-based image generation API
- RemoteWait(opens in a new tab)Virtual queue system
- LinkTracer(opens in a new tab)Creator link analytics
Shipping every week: 87 changelog entries in the last 30 days. Newest, 20 November 2026: Workflow steps no branch reaches are skipped, and error paths run only on failure
No fee on your credit sales. Your users' payments go to your own Stripe with a 0% platform fee. BuildBase starts at $0, and Launch is $19 a month.
One price for the whole backend
Start on Free, with paid plans from $19/mo. The plans differ in how much you can run and in some of the features they include, and the full comparison lists every one.
- The 6 core modules on every plan, with higher limits and more features as you move up.
- A Free plan at $0 that stops at its allowance and never bills.
- Paid plans start with a 7-day free trial, no credit card.
- Users, emails and webhook deliveries are allowances, not meters. Going over does not produce a bill.
- Three things bill over on the paid plans: workflow runs at $0.25, $0.15 or $0.10 per 1,000 runs on Launch, Grow and Scale, web analytics events at $2 per 100,000 events, and storage at $0.10 per GB-month.
- Pay yearly and get twelve months for the price of ten.
Prices in USD. Verified 31 October 2026.
Questions
About credits for ai apps on BuildBase.
Is this a full usage-metering platform?
No. Credits and quotas are built for an app's own pricing: packs, limits per plan, grants, top-ups and overage on Stripe Billing Meters. If you need event-time metering with corrections or aggregations other than a sum, a dedicated metering tool fits better.
Can I mix a subscription with credits?
Yes. Plans carry their own limits, and users can buy credit packs on top of their subscription.
Do you take a fee on credit sales?
No. Payments through your own Stripe account carry a 0% platform fee. Stripe's own fees apply as usual.
What happens when a user runs out?
The check fails before the request runs, so you never pay for a request nobody paid for. Your app shows a prompt to buy more, or auto top-up buys the next pack before the balance reaches zero.
What does BuildBase itself cost?
The Free plan is $0 and stops at its allowance instead of billing you. Paid plans start at $19 a month with a 7-day trial and no card.
Read more
- Charge for your appPlans, free trials, credits and usage limits on your own Stripe account with a 0% platform fee. Your app asks one question: can this customer do this?
- MCP server for your appOne command adds an MCP server with ready tools for workspaces, billing and credits, sign-in for AI agents, and the discovery files agents look for.
- Trial and payment emailsWelcome emails, trial-ending reminders and failed-payment rescues, triggered by what users do in your app and in billing. No mail queue to write.
- What is usage-based billing?
- Metered vs seat-based billing
- Credits and usage limits for an AI app you built with a prompt
- The credits module
- All use casesEvery job BuildBase covers, one page each.
Make every AI request pay for itself
Credit packs, limits and top-ups on your own Stripe. Start on the Free plan and turn credits on when your AI feature ships.