Skip to content

Usage Tracking

After each API request, the following fields are recorded:

  • input_tokens — prompt token count
  • output_tokens — completion token count
  • total_tokens — sum
  • latency_ms — provider + gateway total latency
  • status_code — HTTP status
  • cost_usd — spend in USD
  • model — canonical ID
  • api_key_prefix — first 12 characters of the key

Dashboard > Usage supports:

  • Date range (today, 7d, 30d, this month, last month)
  • Model filter
  • API key filter
  • Status code filter (success / error)

Click Download CSV in the top right. The same data source feeds the dashboard and the export — consistency guaranteed.

Terminal window
curl "https://llmtr.com/api/usage?from=2026-04-01&to=2026-04-30" \
-H "Authorization: Bearer sk_your_key"

Response:

{
"data": [
{
"timestamp": "2026-04-18T12:34:56Z",
"model": "openai/gpt-4o",
"input_tokens": 124,
"output_tokens": 587,
"total_tokens": 711,
"cost_usd": 0.00356,
"latency_ms": 1240,
"status_code": 200,
"api_key_prefix": "sk_abc..."
}
],
"meta": {
"page": 1,
"perPage": 25,
"total": 142
}
}

The overview dashboard shows:

  • Total tokens (last 30 days)
  • Total spend (USD)
  • Request count
  • Average latency
  • Most-used model