The BurnGuard REST API is a JSON-over-HTTP API consumed by two clients: the BurnGuard dashboard frontend (which reads analytics, manages tokens, and updates settings) and the local proxy daemon (which posts usage records after each intercepted AI call). Every response body is wrapped in a consistent envelope so callers never need to guess the shape of a successful or failed response.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.
Base URL
/v1:
/health and /welcome endpoints live outside the version prefix and require no authentication.
Authentication
The API uses two authentication mechanisms depending on the caller. Dashboard session (users) After a successful OAuth or passkey login, the backend returns asession_id string. All protected dashboard endpoints require this value sent as a Bearer token:
Bearer session_ prefix specifically — any other prefix is rejected with 401 Unauthorized.
Sync token (proxy)
The local BurnGuard proxy authenticates to POST /v1/usage with a bg_... sync token created from the dashboard:
Response format
All responses — success and error — returnContent-Type: application/json.
Success
data field holds the endpoint-specific payload (object, array, or null for 204 responses).
Error
HTTP status codes
| Code | Meaning |
|---|---|
200 OK | Request succeeded; body contains data |
201 Created | Resource created; body contains data |
204 No Content | Request succeeded; no response body |
400 Bad Request | Malformed request body or missing required fields |
401 Unauthorized | Missing, expired, or invalid session / sync token |
403 Forbidden | Authenticated but not permitted to access this resource |
404 Not Found | Resource does not exist |
500 Internal Server Error | Unexpected server-side failure |
Available endpoints
| Group | Endpoints |
|---|---|
| Health | GET /health, GET /welcome |
| Auth — OAuth | GET /v1/auth/github, GET /v1/auth/github/callback, GET /v1/auth/google, GET /v1/auth/google/callback |
| Auth — Profile | GET /v1/auth/me |
| Auth — Passkeys | POST /v1/auth/passkey/login/begin, POST /v1/auth/passkey/login/finish, POST /v1/auth/passkey/register/begin, POST /v1/auth/passkey/register/finish |
| Usage Sync | POST /v1/usage |
| Tokens | GET /v1/tokens, POST /v1/tokens |
| Dashboard | GET /v1/dashboard/summary, GET /v1/dashboard/chart, GET /v1/dashboard/providers, GET /v1/dashboard/requests |
| Budget | GET /v1/budget, POST /v1/budget, PUT /v1/budget |
| Alerts | GET /v1/alerts/config, PUT /v1/alerts/config |
Endpoint group pages
Auth
OAuth sign-in via GitHub and Google, WebAuthn passkey registration and login, and the
/auth/me profile endpoint.Dashboard
Spend summary, daily chart data, per-provider cost breakdown, and the paginated request log.
Tokens
Create and list sync tokens that authenticate the local proxy to push usage records.
Budget
Read and update the cloud-stored monthly budget limit used for threshold alerts.
Alerts
Read and update Slack and Discord webhook URLs and per-threshold alert flags.
