DEV Community

Habeeb Rahman
Habeeb Rahman

Posted on

How to See What Your OpenClaw AI Assistant Actually Costs Per Conversation

I've been running OpenClaw for a few months — it's become my daily AI assistant across WhatsApp and Telegram, handling emails, research, calendar stuff. It's genuinely great.

But at the end of month one, I opened my Anthropic billing dashboard and saw $43.

I had no idea where it came from. Which conversations? Which agent? The long research session, or just daily chit-chat? No clue.

This is a known issue in the OpenClaw community — there are open feature requests for native token tracking and a CLI usage command that haven't shipped yet. So I went looking for a workaround.

The Problem With API Billing Dashboards

The Anthropic and OpenAI dashboards show your total spend, but they're aggregated (no per-conversation breakdown), delayed (often 24+ hours behind), and only model-level (you can see "Claude Sonnet cost $31" but not which feature or session drove that).

If you're running a personal AI assistant that touches multiple models — Anthropic for complex tasks, a local Ollama model for simple ones — you have zero visibility into what's costing money vs what's free.

The Fix: One Import

burn0 is a tiny Node.js library that solves this. It patches fetch and node:http at the runtime level, so it sees every outbound API call your app makes.

npm install @burn0/burn0
Enter fullscreen mode Exit fullscreen mode

Then at the top of your entry file:

import "@burn0/burn0";
Enter fullscreen mode Exit fullscreen mode

Now every API call to Anthropic, OpenAI, Ollama, or any of 50+ other services gets intercepted, and you see real-time cost breakdowns in your terminal:

burn0 > $0.04 today (12 calls) -- anthropic: $0.031 | openai: $0.009
Enter fullscreen mode Exit fullscreen mode

Why This Works Well With OpenClaw

OpenClaw is Node.js — burn0 slots right in.

It tracks local models too. OpenClaw supports Ollama and other local models. burn0 shows these as $0.00, so you can see the real dollar savings from routing locally vs cloud.

It reads actual token counts, not estimates. Token counts come directly from each API response's metadata — exact numbers, not guesses based on character counts.

Zero changes to OpenClaw. Works at the HTTP layer, no fork needed. When native tracking ships, remove the import.

Privacy-first. Runs entirely locally. Never reads request or response bodies — only metadata. Nothing leaves your machine.

What It Looks Like in Practice

During a typical OpenClaw session:

burn0 > anthropic/claude-sonnet  ->  $0.023  (in: 1847 / out: 312)
burn0 > anthropic/claude-haiku   ->  $0.001  (in: 423 / out: 89)
burn0 > openai/gpt-4o-mini       ->  $0.0004 (in: 156 / out: 44)
burn0 > localhost (ollama)        ->  $0.000  (in: 891 / out: 203)
Enter fullscreen mode Exit fullscreen mode

The Sonnet call cost 23x more than Haiku, and the Ollama call was free. Over a week, this makes it obvious which workflows are worth routing to cheaper models.

Getting Started

npm install @burn0/burn0
Enter fullscreen mode Exit fullscreen mode

Add one line to your entry point and you're done.

  • GitHub: burn0
  • Website: burn0.dev
  • MIT licensed, free forever, no account required

If you're running OpenClaw and curious what it's actually costing you per day, give it a try. Would love to hear what you find.

Top comments (0)