Count
Number of matching eventsUseful for requests, jobs, generated items, or other per-action billing.
Ruba product infrastructure
Record activity, turn it into a customer quantity, and price that quantity at renewal.
Your application reports what happened. A meter decides what counts and how it aggregates. A metered price turns the result into an invoice line.
Live ledger engine
The event remains the immutable source record while the meter and price define its commercial meaning.
Capability matrix
Several meters can read the same event stream, so pricing can evolve without new instrumentation.
Useful for requests, jobs, generated items, or other per-action billing.
Add tokens, bytes, seconds, or another numeric property.
Measure values such as typical size, minimum use, or peak concurrency.
Charge by unique user, project, repository, document, or another key.
Execution workflow
Send an immutable event with the customer ID and relevant metadata.
The matching customer meter updates as qualifying events arrive.
Ruba reads the final quantity for the subscription billing cycle.
The metered price converts usage into the next invoice amount.
Tax, discount, renewal, and payment behavior continue through the normal order flow.
Deep dive specifications
Capture prompt and completion usage from compatible model responses, including Vercel AI SDK flows.
Measure chunks, bytes, or elapsed duration from a streaming response.
Record transferred bytes or object operations for uploads and downloads.
Measure wall-clock time spent inside a function, job, or session.
Post through the SDK when a specialized helper does not fit the source.
Accept usage records from direct SDK calls or supported strategies.
Maintain a current per-customer value as activity arrives.
Bill the measured quantity through a product’s metered price.
Read active meters and balances together through the API.
Ruba exposes current usage through the API and Customer Portal, but it does not block product access when a quota is crossed. Your application decides whether to stop, prompt for an upgrade, draw prepaid credits, or let the amount become billable overage.
Build with Ruba
Define its meter, connect a price, and use the measured result at renewal.