Skip to main content

Historical Token Usage

1 min read
get/team/token-usage/historical
Request example
Response
get/team/token-usage/historical

Returns historical token usage on a month-by-month basis. The endpoint can also breaks usage down by API key optionally.

Authorization

Authorizationstringheaderrequired#
Bearer authentication header of the form Bearer <token>, where <token> is your API key.

Query parameters

byApiKeyboolean#
Get historical token usage by API key

Default: false

Responses

application/json
Successful response
successboolean#
periodsobject[]#
Show child attributes
startDatestring#
Start date of the billing period
endDatestring#
End date of the billing period
apiKeystring#
Name of the API key used for the billing period. null if byApiKey is false (default)
totalTokensinteger#
Total number of tokens used in the billing period