featureCode; Commet aggregates events for access, credits, balance, and billing.
Track an event
AI-model events use the same operation but send
model, inputTokens, and outputTokens instead of value.
Business event ID vs request idempotency
eventId identifies the consumption event in your system. Reuse it when the same event is retried.
Request idempotency protects one HTTP mutation and is passed through the SDK’s request options as idempotencyKey. It becomes the Idempotency-Key header. Do not put that transport key in the usage body.
Correct current-period usage
Useset when your source of truth needs to replace the current metered total:
value is the desired total, not a delta. Commet records a signed adjustment and preserves the original event trail. This operation applies only to the active metered period.