post
https://api.tansohq.com/api/v1/client/events
Records a single usage event for billing and tracking. Events feed into invoice calculations for usage-based and hybrid plans.
Idempotency: Pass an eventIdempotencyKey to enable safe retries. If omitted, one is auto-generated. Duplicate keys return 409 Conflict.
Customer identification: Use customerReferenceId (your internal ID), stripeCustomerId (your Stripe customer ID), or customerId (Tanso UUID). Use one, not multiple.
Cost tracking: Optionally include costAmount to track provider costs (COGS) alongside usage. If omitted, Tanso calculates cost automatically using costInput (model + inputTokens/outputTokens for two-rate pricing) with fallback chain: account default cost config > global model pricing table.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…