Skip to main content
The Usage API provides access to detailed usage metrics and billing information for the authenticated user. Track call minutes, API requests, and other consumption data across all your businesses.

Get usage count

Retrieve aggregated usage counts for a specific time period.
This endpoint returns summary statistics for your usage across all metrics.

Request

string
required
Start of the date range (ISO 8601 format)
string
required
End of the date range (ISO 8601 format)
number
Optional: Filter by specific business ID
array
Optional: Specific metrics to retrieve. Defaults to all metrics.Available metrics:
  • callMinutes - Total call duration in minutes
  • apiRequests - Number of API requests made
  • ttsCharacters - Characters sent to TTS providers
  • sttMinutes - Minutes of STT processing
  • llmTokens - LLM tokens consumed
  • embeddingTokens - Embedding tokens used
Example request:

Response

boolean
Whether the request succeeded
object
Usage count data
Example response:

Get usage history

Retrieve detailed usage records with pagination and filtering.
This endpoint returns individual usage records for granular analysis.

Request

number
Page number (1-indexed, default: 1)
number
Number of results per page (default: 50, max: 100)
string
Filter by start date (ISO 8601)
string
Filter by end date (ISO 8601)
number
Filter by specific business
string
Filter by metric type (see available metrics above)
string
Field to sort by: timestamp, amount, businessId
string
Sort direction: asc or desc
Example request:

Response

boolean
Whether the request succeeded
object
Paginated usage history
Example response:

Use cases

Billing dashboard

Display usage metrics and consumption trends

Cost tracking

Monitor usage to estimate costs and budget

Usage alerts

Set up alerts when usage exceeds thresholds

Business analytics

Analyze usage patterns across businesses

Error codes

Notes

Usage data is updated in near real-time but may have a delay of up to 5 minutes for recent activity.
For large date ranges, use the count endpoint for aggregated data and history for detailed breakdowns.
Historical usage data is retained for 12 months. Older records may not be available.