An event is a signal from your application representing a billable action — an API call, a token consumed, a file processed, a message sent. You ingest events via the SDK or REST API, and Spaire aggregates them through meters to calculate charges.Documentation Index
Fetch the complete documentation index at: https://docs.spairehq.com/llms.txt
Use this file to discover all available pages before exploring further.
Event structure
Each event has:name— identifies the event type. Used in meter filters.externalCustomerIdorcustomerId— identifies which customer the event belongs to. UseexternalCustomerIdto match against your own user IDs.metadata— optional key-value pairs for additional data (e.g., token counts, model names, file sizes). Meters can filter and aggregate on these values.
Ingest events
Batch ingestion
You can send multiple events in a single request by adding more objects to theevents array. Batching reduces API calls and is the recommended approach when handling high event volumes.
Events are immutable
Once an event is ingested, it cannot be updated or deleted. Design your event schema carefully — especially the metadata keys and value types your meters will depend on.Spaire never blocks on balance
Spaire does not prevent event ingestion or block customer actions if a customer runs out of credit or exceeds their meter cap. You are responsible for checking balances and enforcing limits in your application before allowing usage. Check a customer’s current meter balance via Customer State or the Customer Meters API.Ingestion strategies
For common event sources, Spaire provides pre-built adapters that handle event formatting and ingestion automatically.LLM Strategy
Wrap AI SDK models to auto-track prompt and completion tokens.
S3 Strategy
Track S3 file upload events automatically.
Stream Strategy
Ingest from continuous event streams.
Delta Time Strategy
Track time-based usage with delta intervals.
What’s next
Meters
Define how events are filtered and aggregated into billable units.
Billing
How meter totals are added to subscription invoices.

