Skip to main content
Cost Insights reads a reserved _cost object from event metadata and aggregates it into the Metrics API.

The _cost Property

TypeScript
amount is required and is expressed in cents, not dollars. 100 means $1.00, 0.5 means half a cent, and 0.001 means one hundredth of a cent. Precision supports 17 total digits and 12 decimal places. The currently accepted currency is usd.

Where this fits

One event can represent model inference, video processing, storage, an email provider, or any other customer-attributable expense. Keep the cost inside _cost; place dimensions such as vendor, model, tokens, duration, resolution, provider, or feature beside it in normal metadata.
Cost with context

Operating rules

Ingest the cost when it occurs so current metrics reflect the operation promptly. Preserve the precise amount instead of rounding small unit costs, and include enough non-cost metadata to explain what drove the expense later.