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.
burnguard init generates a burnguard.yaml file in your project directory by walking you through an interactive setup wizard. Once the file exists, you can edit it manually at any time — BurnGuard reads it fresh on every burnguard start. The file controls every aspect of the proxy: the port it listens on, the budget limit it enforces, which AI providers to route to, where to send alerts, and whether to sync usage to BurnGuard Cloud.
Generating the config file
Run the setup wizard
burnguard.yaml to your current directory when finished.Edit manually (optional)
Open
burnguard.yaml in any text editor. Changes take effect the next time you run burnguard start.Full annotated example
burnguard.yaml
server section
The server block configures the proxy listener and local storage.
The TCP address and port BurnGuard listens on. Must include the leading colon (e.g.
":8080"). Your application sends requests to http://localhost:8080 when this is the default.Path to the SQLite database file used for persistent usage storage. BurnGuard creates this file automatically on first start. The path can be relative (resolved from the working directory) or absolute.
budget section
The budget block sets the hard monthly spend cap that BurnGuard enforces before forwarding any request.
Monthly spend cap in USD. When cumulative spend tracked in the SQLite database reaches this value, all further requests are blocked with HTTP 403 and never forwarded to the provider. Set to
0 to disable enforcement entirely (alerts will still fire if configured).providers section
The providers block is a map of provider names to their upstream base URLs. Each key becomes a path prefix on the proxy — requests arriving at /anthropic/... are forwarded to the anthropic entry’s base_url, and so on.
The upstream base URL for this provider. BurnGuard strips the provider path prefix and appends the remainder to this URL before forwarding. For example, a request to
/anthropic/v1/messages with base_url: https://api.anthropic.com is forwarded to https://api.anthropic.com/v1/messages.alerts section
The alerts block controls Slack and Discord webhook notifications and the budget fraction thresholds that trigger them.
A Slack incoming webhook URL. When a threshold is crossed, BurnGuard POSTs a JSON payload
{"text": "..."} to this URL. Leave empty to disable Slack alerts.A Discord webhook URL. When a threshold is crossed, BurnGuard POSTs a JSON payload
{"content": "..."} to this URL. Leave empty to disable Discord alerts. Both Slack and Discord can be active at the same time.A list of budget fractions (0.0 – 1.0) at which to fire an alert.
0.5 means 50% of budget.limit, 1.0 means 100%. Each threshold fires at most once per proxy session — restarting the proxy resets all triggered states. The recommended set is [0.5, 0.8, 1.0].Alert thresholds are tracked in memory, not in the database. Each threshold fires only once per proxy session. If you need alerts to re-arm after they have fired, restart the proxy with
burnguard start.sync section
The sync block controls whether the proxy ships usage records to BurnGuard Cloud for the web dashboard.
Set to
true to enable background syncing. When enabled, BurnGuard sends unsynced usage records to the cloud API at the configured interval and marks them as synced locally. Set to false (or omit the block) to keep everything local.The Bearer token sent in the
Authorization header of every sync request. Get your token by signing up at burnguard.run. Tokens start with bg_.The base URL of the BurnGuard Cloud API. The syncer appends
/v1/usage to this value when posting records. Only change this if you are running a self-hosted backend.How often (in seconds) the syncer wakes up to send unsynced records. At each tick, up to 100 unsynced records are batched and posted. The default of
60 means usage data reaches the dashboard within about one minute.