Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Verifieddanny/BurnGuard/llms.txt

Use this file to discover all available pages before exploring further.

The dashboard endpoints power the BurnGuard web UI’s analytics views. They aggregate usage records stored by the proxy sync pipeline and return pre-computed summaries scoped to the authenticated user. All four endpoints require a valid session and accept no request body — query parameters control time windows and pagination where relevant.
All dashboard data is derived from usage records pushed by the local proxy via POST /v1/usage. If your proxy has not synced yet, most endpoints will return zeros or empty arrays rather than errors.

GET /v1/dashboard/summary

Returns a single aggregated summary of all-time spend and token usage for the authenticated user. Auth: Requires session — Authorization: Bearer session_<id>. Request: No parameters or body. Response:
total_spend
number
Total cost in USD across all synced usage records.
total_requests
number
Total number of AI API calls recorded.
total_input_tokens
number
Cumulative count of input (prompt) tokens across all requests.
total_output_tokens
number
Cumulative count of output (completion) tokens across all requests.
curl https://api.burnguard.run/v1/dashboard/summary \
  -H "Authorization: Bearer session_abc123"
{
  "data": {
    "total_spend": 12.47,
    "total_requests": 384,
    "total_input_tokens": 1024000,
    "total_output_tokens": 256000
  }
}

GET /v1/dashboard/chart

Returns daily spend totals for a rolling window of days. Use this data to render a time-series chart in the dashboard. Auth: Requires session — Authorization: Bearer session_<id>.
days
integer
Number of calendar days to look back. Defaults to 30. Recommended values: 7, 30, 90. Days with no recorded spend are omitted from the response array.
Response: Array of daily spend objects ordered by date ascending.
date
string
ISO 8601 date string (YYYY-MM-DD) for the calendar day.
cost
number
Total USD cost for that day.
curl "https://api.burnguard.run/v1/dashboard/chart?days=7" \
  -H "Authorization: Bearer session_abc123"
{
  "data": [
    { "date": "2025-01-13", "cost": 0.84 },
    { "date": "2025-01-14", "cost": 1.22 },
    { "date": "2025-01-15", "cost": 0.61 },
    { "date": "2025-01-16", "cost": 2.10 },
    { "date": "2025-01-17", "cost": 1.75 },
    { "date": "2025-01-18", "cost": 0.99 },
    { "date": "2025-01-19", "cost": 1.44 }
  ]
}
Days with zero spend do not appear in the response. When rendering a chart, fill missing dates with 0 to avoid gaps in the series.

GET /v1/dashboard/providers

Returns cost and request counts broken down by AI provider. Results are ordered by total cost descending so the most expensive provider appears first. Auth: Requires session — Authorization: Bearer session_<id>. Request: No parameters or body. Response: Array of provider breakdown objects.
provider
string
Provider identifier as recorded by the proxy — e.g. "openai" or "anthropic".
cost
number
Total USD cost for this provider across all time.
requests
number
Total number of API calls routed to this provider.
curl https://api.burnguard.run/v1/dashboard/providers \
  -H "Authorization: Bearer session_abc123"
{
  "data": [
    { "provider": "anthropic", "cost": 8.34, "requests": 210 },
    { "provider": "openai",    "cost": 4.13, "requests": 174 }
  ]
}

GET /v1/dashboard/requests

Returns the most recent usage records for the authenticated user, ordered by timestamp descending. Use this to populate the request log table in the dashboard. Auth: Requires session — Authorization: Bearer session_<id>.
limit
integer
Maximum number of records to return. Defaults to 20. Increase to paginate through more history.
Response: Array of usage record objects.
id
number
Internal numeric ID of the usage record.
user_id
number
ID of the user who owns this record.
sync_token_id
number
ID of the sync token used when this batch was uploaded.
timestamp
string
ISO 8601 timestamp of when the AI API call was made on the proxy side.
provider
string
Provider name — "openai" or "anthropic".
model
string
Model identifier as reported by the provider (e.g. "gpt-4o", "claude-3-5-sonnet-20241022").
input_tokens
number
Number of input (prompt) tokens consumed by this request.
output_tokens
number
Number of output (completion) tokens produced by this request.
cache_creation_tokens
number
Tokens used to create a prompt cache entry (Anthropic prompt caching). Zero if not applicable.
cache_read_tokens
number
Tokens read from a prompt cache hit (Anthropic prompt caching). Zero if not applicable.
cost
number
Calculated USD cost for this single request.
request_path
string
The upstream API path that was proxied (e.g. /v1/messages, /v1/chat/completions).
synced_at
string
ISO 8601 timestamp of when this record was received and stored by BurnGuard Cloud.
curl "https://api.burnguard.run/v1/dashboard/requests?limit=5" \
  -H "Authorization: Bearer session_abc123"
{
  "data": [
    {
      "id": 1024,
      "user_id": 42,
      "sync_token_id": 3,
      "timestamp": "2025-01-19T14:32:01Z",
      "provider": "anthropic",
      "model": "claude-3-5-sonnet-20241022",
      "input_tokens": 1200,
      "output_tokens": 340,
      "cache_creation_tokens": 0,
      "cache_read_tokens": 0,
      "cost": 0.0052,
      "request_path": "/v1/messages",
      "synced_at": "2025-01-19T14:35:00Z"
    }
  ]
}

Build docs developers (and LLMs) love