Billing components you can ship in minutes
Let users top up their balance with preset credit bundles one click, zero friction.
1import { CreditTopUpPolar } from '@ai-billing/nextjs'
2
3<CreditTopUpPolar userId="usr_test" />Display Polar credit consumption at a glance with a labeled progress bar.
1import { CreditUsagePolar } from '@ai-billing/nextjs'
2
3<CreditUsagePolar userId="usr_test" />Display Stripe credit consumption against a set budget, highlighted when over limit.
1import { CreditUsageStripe } from '@ai-billing/nextjs'
2
3<CreditUsageStripe stripeCustomerId="cus_test" budget={100} />Let users switch between supported AI models while keeping pricing context close to the action.
1import { ModelSelector } from '@ai-billing/nextjs'
2
3<ModelSelector staticModels={models} selectedModel={model} onSelect={setModel} />Show searchable model pricing so users can compare provider costs before they run a request.
1import { ModelPricing } from '@ai-billing/nextjs'
2
3<ModelPricing searchBoxVisible limit={12} />Buy Credits
Prices do not include tax. Tax will be added at checkout.
The billing layer AI products eventually need
Narev turns raw model usage into auditable credits, customer entitlements, payment-ready charges, and operational controls your team can trust.
Credit wallets and grant ledger
Model free, subscription, purchased, referral, and admin credits with balances, expiry, priority, and a full audit trail.
Policy engine for AI billing
Turn normalized model cost into product charges with margins, rounding, BYOK rules, free-tier behavior, and fallback credits.
Usage ledger and reconciliation
Capture every call with provider cost, charged credits, latency, billing destination status, retries, and replay support.
Priority consumption and debt recovery
Consume credits in deterministic order, allow controlled negative balances, and repay debt automatically when new grants arrive.
Subscription and prepaid credits
Support recurring grants, reset windows, weekly caps, five-hour blocks, purchased credits, and off-session auto top-up.
Organization billing controls
Share org wallets across members while preserving project, repo, feature, and delegated-credit attribution.
Streaming usage capture
Bill raw SSE streams, final usage chunks, disconnects, fallback lookups, and custom destinations without losing events.
Pricing snapshots
Pin model price lists, refresh providers safely, diff changes, and fall back when a provider is missing pricing data.
Admin and migration tooling
Grant or revoke credits, inspect customers, reconcile events, handle refunds, and import historical users and usage.
Optimizing cost? Then find the cheapest model based on user retention.
Expensive models are only worth it if they perform on your specific tasks. Build a custom leaderboard to find the cheapest model that actually works.

