Skip to main content
An event is one timestamped record of something a buyer consumed inside your application. Your application sends these records to Ruba, and meters turn them into billable quantities. Common examples include tokens processed, video minutes streamed, or storage uploaded. Send events through the ingestion endpoint. Each record carries:
  • name: the activity category, such as ai_usage or file_uploaded.
  • customer_id or external_customer_id: the buyer responsible for the activity.
  • metadata: numbers and labels that a meter can filter or aggregate.
For example, this record captures one model request and its token counts:

Send events with the Ruba SDK

Each event identifies its type, customer, and any metadata required by the meter.
TypeScript
Ingestion does not enforce a meter-credit balance. Your application decides whether a customer may continue an action after reading that balance.

Operating rules

Events cannot be edited

An accepted event is permanent: it cannot be updated or deleted. Use a new correcting event when your model requires an adjustment.

Late timestamps do not reopen invoices

timestamp may point into the past for queue replay or batch delivery. Dashboards and the eventual invoice line date range use that supplied time, but billing-period assignment uses the time Ruba received the event. An event received in the current cycle therefore stays in the current cycle even when its timestamp belongs to an older one. Ruba does not issue retroactive usage invoices or credits for late ingestion.