Usage Tracking
After each API request, the following fields are recorded:
input_tokens— prompt token countoutput_tokens— completion token counttotal_tokens— sumlatency_ms— provider + gateway total latencystatus_code— HTTP statuscost_usd— spend in USDmodel— canonical IDapi_key_prefix— first 12 characters of the key
Dashboard filters
Section titled “Dashboard filters”Dashboard > Usage supports:
- Date range (today, 7d, 30d, this month, last month)
- Model filter
- API key filter
CSV export
Section titled “CSV export”Click Download CSV in the top right. The same data source feeds the dashboard and the export — consistency guaranteed.
Programmatic access
Section titled “Programmatic access”Usage records are not queried with an API key. View them on Dashboard > Usage; you can export the same data with Download CSV.
The token counts of a single request come back in the usage field of that request's response. The field names follow the format of the endpoint you call: /v1/chat/completions returns prompt_tokens and completion_tokens, /v1/messages returns input_tokens and output_tokens.
Aggregate metrics
Section titled “Aggregate metrics”The cards at the top of Dashboard > Usage show, for the time range and filters you choose:
- Total tokens
- Total spend (USD)
- Request count
The Overview page shows your credit balance, this month's usage and spend, your number of active API keys and your recent requests.