Connect AI usage to customer billing.
The AI Billing Pipeline
Common AI Pricing & Monetization Models
Pass through provider inference costs with an automatic multiplier (e.g. 1.35x for 35% margin), ensuring every request is profitable.
Users buy token or dollar credit packs upfront. VibezCheck decrements balances in real time and halts requests when credits reach zero.
Include a monthly AI allowance ($15 included compute), then bill overages automatically via Stripe Metered Billing.
Markup Rules & Billing Integration
TypeScript / AI SDKimport { streamText } from 'ai';
import { vibezcheck } from 'vibezcheck';
import Stripe from 'stripe';
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!);
// Configure model with custom retail margin markup
const result = streamText({
model: vibezcheck('openai/gpt-4o', {
customer: 'cus_stripe_12345',
pricing: {
markupMultiplier: 1.35, // 35% margin on top of provider rates
minCostPerCallUSD: 0.002, // Minimum fee per call
},
onUsage: async (event) => {
// event.cost.totalUSD -> Provider Cost (e.g. $0.00240)
// event.cost.retailUSD -> Customer Billed Price (e.g. $0.00324)
// Send to Stripe Metered Billing
await stripe.billing.meterEvents.create({
event_name: 'ai_inference_cost_microcents',
payload: {
stripe_customer_id: event.customerId,
value: Math.round(event.cost.retailUSD * 100_000), // micro-cents
},
});
},
}),
prompt: 'Generate an executive summary for this 20-page document',
});Metering engine, not a merchant of record
VibezCheck does not sit between your customers and your bank account. You retain 100% control over your tax compliance, merchant accounts, and invoicing platform.
VibezCheck provides the essential missing link: the high-resolution, model-aware computational meter that transforms tokens into verified dollars so your billing stack can bill accurately.
Frequently Asked Questions
Is VibezCheck a payment processor or merchant of record?
No. VibezCheck is the metering, pricing, and margin intelligence engine that runs in your application code. It computes costs and customer retail pricing at micro-cent resolution, then dispatches usage events into your existing billing provider (such as Stripe, Metronome, Lago, or your PostgreSQL database).
How do I guarantee positive gross margins on AI features?
By using VibezCheck pricing rules with markup multipliers (e.g. markupMultiplier: 1.4 for a 40% markup) or fixed fee markups. VibezCheck calculates provider cost and customer billed price simultaneously, ensuring that every request generates your required margin.
Can I enforce prepaid credit balances before generating AI output?
Yes. You can verify the customer credit balance before the call, set maxCostPerCallUSD or sessionBudgetUSD to the remaining balance, and halt execution automatically before unbacked tokens are consumed.
Can I export usage events directly to Stripe Metered Billing?
Yes. In the onUsage callback or database adapter, you can pass event.cost.retailUSD or event.usage.totalTokens directly to Stripe Meter Events API (stripe.billing.meterEvents.create).
Monetize your AI product with guaranteed margins
Calculate retail prices, export to Stripe, and stop subsidizing user compute.