Request body
OptionalcostCents?: numberOptionalidempotencyKey?: stringOptionalinputTokens?: numberOptionallatencyMs?: numberOptionalmodel?: stringOptionaloutputTokens?: numberOptionalproperties?: { [key: string]: unknown }Optionalprovider?: stringOptionaltimestamp?: stringFormat: date-time
OptionaltotalTokens?: numberEvent ingested successfully
Ingest multiple usage events
Record multiple usage events in a single request for efficient bulk ingestion.
Limits:*
Use cases:*
For quota enforcement and rate limiting, use POST /v1/track instead.
Request body
Events ingested successfully
List usage events
Retrieve a paginated list of usage events with optional filtering.
Use cursor-based pagination by passing the nextCursor from the previous response. You can filter events by customer, event type, or model.
Pagination:*
cursor parameter from the previous response's nextCursor fieldhasMore field indicates if there are more resultsOptionalcustomerId: stringFilter events by customer ID
OptionaleventType: stringFilter events by type (e.g., "model_call", "embedding")
Optionalmodel: stringFilter events by model name (e.g., "gpt-4", "claude-3")
Optionallimit: stringMaximum number of events to return (1-100, default: 50) (default: "50")
Optionalcursor: stringPagination cursor from the previous response
List of events
Ingest a usage event
Record a single usage event for metering and analytics.
This endpoint only records the event without checking quotas or rate limits. For quota enforcement and rate limiting, use
POST /v1/trackinstead.When to use this endpoint:*
When to use /v1/track instead:*