API Reference
Log In
API Reference

Get usage by model over time

Returns, for each time bucket in the window, the request count, total cost in USD and total tokens per model.

Bucket size by period: HOUR 5 minutes, EIGHT_HOURS 30 minutes, TWENTY_FOUR_HOURS 2 hours, SEVEN_DAYS 12 hours, THIRTY_DAYS 1 day, NINETY_DAYS 1 week, SIX_MONTHS and TWELVE_MONTHS 1 calendar month. Buckets are cut in UTC, starting at the beginning of the window and stepping forward by the bucket size. For SIX_MONTHS and TWELVE_MONTHS the window begins at midnight UTC on the first of the month; for shorter periods it begins at the time of the request minus the period. With a custom start and end, the bucket size follows the length of the range: 1 hour under 2 days, 1 day under 90 days, 1 week under 365 days, otherwise 1 month, starting at start. Buckets are listed newest first.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
string
required

ID of the team that owns this data.

string
enum

Predefined time window to aggregate results. Defaults to THIRTY_DAYS.

string

Optional agent filter. Use to filter by specific agent (e.g., 'claude-code' for Claude Code metrics). Omit to include all agents.

string

Start of a custom date range in ISO 8601 format (e.g., 2025-09-01T00:00:00Z). Must be provided together with end. When both are provided, the period parameter is ignored.

string

End of a custom date range in ISO 8601 format (e.g., 2025-09-30T23:59:59Z). Must be provided together with start. When both are provided, the period parameter is ignored.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
*/*