AIPricingLab is the drop-in backend for AI usage tracking, plan limits, and analytics. Track every prompt, image render, and agent step your end-users consume. Enforce per-plan quotas safely under concurrency. Watch real-time usage charts. Like PostHog — but for AI.
AIPricingLab is launching shortly — with a new name. Drop your email and we'll let you know when it's live.
We'll only email you at launch. No spam.
Most teams ship their first metered event in under ten minutes — without writing a single counter, cron job, or quota table.
Call apl.track(userId, "image.render", 1)from your backend after any AI action. Every prompt, image, embedding, agent step, or token-bundle becomes a metered event tagged with your end-user's ID and any metadata you want.
Build plans visually. Group events into limits with match rules — one image render can hit both premium_images and total_renders. Daily, weekly, monthly, or lifetime periods. Calendar-anchored or per-user.
reserve / commit / releaseholds quota atomically with a 60-second TTL so parallel requests can't overshoot. Auto-released on crash. The only safe way to gate AI calls under real load.
Stop wiring counters, periods, and rate-limits by hand every time you ship an AI feature. AIPricingLab is the drop-in primitive your billing, growth, and ops teams all depend on.
Track every AI action per end-user — LLM tokens, image renders, video seconds, agent steps. Composite events bundle prompt + completion tokens + tool calls into one billable line. Pipeline handles dedup and back-pressure at 200k events/sec.
Tiered, volume, package, and graduated quotas as composable blocks. Match rules over event type and metadata route a single event into many limit groups. Preview every customer's next billing period before shipping a price change.
reserve / commit / releasewith a 60-second TTL stops parallel requests from overshooting quota. Auto-released on crash or timeout. The only correct pattern under concurrency — built in.
Per-user, per-event, per-plan dashboards. Search the event log in real time. Typos and unmatched events surface automatically with a did you mean? panel powered by Levenshtein distance against your plan rules.
Threshold alerts, limit-reached events, and subscription changes stream in under 400ms p99. Signed payloads, automatic replay, idempotency keys — the parts you'd otherwise build yourself.
Works with OpenAI, Anthropic, Gemini, Mistral, Replicate, fal — anything you call. One typed TypeScript client for backend and browser. Zero runtime dependencies. Throws typed errors so you branch on limit_reached without parsing strings.
Hybrid analytics writes nothingto the visitor's browser — no cookie, no localStorage, no identifier. Pre-login traffic is aggregated server-side with a salted hash that rotates every 24h; the raw IP is discarded before any row is written. Built-in opt-out, erasure and data-export endpoints cover GDPR Art. 15 / 17 / 21 out of the box.
One TypeScript client for backend and browser. Use an sk_live_key on the server to track usage, reserve quota, and assign plans — or a pk_live_ key in the client to let a user read their own counters. Zero runtime dependencies.
track() records consumption against every matching limit groupreserve() / commit() / release() for concurrent calls without overshootAiPricingLabError — limit_reached, invalid_key, and friendsimport { createClient } from "@aipricinglab/sdk";
const apl = createClient({ apiKey: process.env.AIPRICINGLAB_KEY! });
// Record the image render against the user's plan
await apl.track("user_8FbKq2", "image.gemini-3.1-image", 1, {
variant: "4k",
});
// → counted against every limit group this event matchesBuild your AI side-project on the free tier. Scale to a real product without re-platforming. Cancel any time — your event data stays exportable forever.
Everything you need to know before dropping AIPricingLab into your AI product.
We're the drop-in backend for AI usage tracking, plan limits, and analytics. Whenever your end-user runs a prompt, image, or agent step, you call track()— we count it against their plan, enforce quotas, and expose dashboards. No counter tables, no cron jobs, no rate-limit code in your app.
Stripe bills you for usage. We meter your end-usersinside your app — per-plan quotas, atomic enforcement, real-time analytics. Think of us as the metering and limits layer that sits between your AI provider and your billing system.
All of them. AIPricingLab is provider-agnostic — OpenAI, Anthropic, Gemini, Mistral, Replicate, fal, your own self-hosted model, or anything else you call. You decide what an event is. We meter it.
One line of SDK code per AI action. Most teams ship their first metered event in under ten minutes. Read the quickstart for the full walkthrough.
Yes. The naive canUse → call → track pattern lets parallel requests overshoot quota. We expose reserve / commit / release with a 60-second TTL so two requests can never both pass the limit. Auto-released on crash.
Yes — free up to one million metered events per month. No credit card required. Your event data is yours, exportable forever, even if you cancel.
Free up to 1 million events per month. No credit card. Your data stays portable, always.