Daily token usage by service
const url = 'https://example.com/api/v1/usage/tokens/daily';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/v1/usage/tokens/dailyTotal daily token ConsumedQuantity per service, for the default tenant. Scoped to token usage: only enriched rows whose ConsumedUnit is “Tokens” appear. A row whose ConsumedQuantity is null (money-only rows — credits, undifferentiated call fees, unmatched usage) is skipped, never surfaced with a zero or fabricated quantity, and non-token FOCUS usage quantities are excluded. Ordering is deterministic: day ascending, then serviceName, then consumedUnit. Quantities are exact decimal strings — never floats — so a large token count loses no precision.
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Inclusive first calendar day (UTC) to include. Defaults to the full range of stored data.
Inclusive last calendar day (UTC) to include. Defaults to the full range of stored data.
Responses
Section titled “Responses”Daily token usage grouped by service and unit for the requested period, day-ascending.
object
The UTC calendar day.
FOCUS ServiceName.
FOCUS ConsumedUnit (always “Tokens” today).
Total ConsumedQuantity for the day/service/unit, as an exact decimal string — never a float.
Example
[ { "date": "2026-05-01", "serviceName": "OpenAI API", "consumedUnit": "Tokens", "consumedQuantity": "1500000" }]Invalid start or end date.