Skip to main content

Install

npm i @burn0/burn0
The setup wizard runs automatically after install. You can skip it and configure later with npx burn0 init.

Add the import

Add this as the first import in your app’s entry file (before any SDK imports):
import '@burn0/burn0'  // Must be first!

import express from 'express'
import OpenAI from 'openai'
// ... rest of your app
burn0 must be imported before any API SDK (OpenAI, Anthropic, etc.). It patches fetch and http globally — if an SDK initializes first, its calls won’t be tracked.

Run your app

npm start
You’ll see costs appear in your terminal as API calls happen:
  burn0 ▸ $0.0038 today (3 calls) ── openai: $0.0035 · resend: $0.0003
When you stop the app (Ctrl+C):
  burn0 ▸ session: $0.0038 (3 calls, 2m 15s) ── today: $0.0038 ── ~$3.42/mo

Check your costs

npx burn0 report
  burn0 report ── last 7 days

  Total: $12.47 (342 calls)

  openai         $8.32   ██████████████░░░░░░  67%
  anthropic      $3.15   ██████░░░░░░░░░░░░░░  25%
  google-gemini  $0.85   ██░░░░░░░░░░░░░░░░░░   7%
  resend         $0.15   ░░░░░░░░░░░░░░░░░░░░   1%

  ── projection ─────────────────────────────
  ~$53/mo estimated (based on last 7 days)

Optional: Connect to the dashboard

For team visibility and historical data, connect a free API key:
1

Sign up

Go to burn0.dev/login and sign in with GitHub.
2

Create an API key

Navigate to Dashboard → API Keys → Create new key.
3

Add to your project

npx burn0 connect
Paste your API key when prompted.
4

See costs in the dashboard

Visit burn0.dev/dashboard to see costs across all your projects.

Next steps

CLI Reference

All CLI commands

Track features

Attribute costs to specific features

Dashboard

Visual cost breakdown

Supported services

50+ services tracked