Documentation Index
Fetch the complete documentation index at: https://docs.toktra.dev/llms.txt
Use this file to discover all available pages before exploring further.
GET /v1/usage
Returns a cursor-paginated usage summary broken down by user, model, and time period. Use this endpoint to build reports, power dashboards, or feed data into external analytics systems.Query parameters
Aggregation period for usage records.Allowed values:
hourly, daily, weekly, monthlyStart of the date range (inclusive). ISO 8601 date format:
YYYY-MM-DD.End of the date range (inclusive). ISO 8601 date format:
YYYY-MM-DD.Filter results to a single user by their UUID.
Filter results to a specific model name (e.g.,
gpt-4, claude-3-opus).Opaque pagination cursor. Pass
next_cursor from the previous response. Omit for the first page.Items per page. Min
1, max 100.Response
Returns a paginated envelope where each item is aUsageSummary object.
Array of usage records for the requested period and filters.
Cursor to pass on the next request.
null on the last page.true if more pages exist.Total number of matching records.
Examples
Error responses
| Status | Error | Description |
|---|---|---|
401 | unauthorized | Invalid or expired token |
429 | rate_limited | Rate limit exceeded |