Back to list
dev_to 2026年4月24日

私の驚いた AI 請求が TokenBar を作動機にした理由

My surprise AI bill is why I built TokenBar

Translated: 2026/4/24 20:38:07
llmtoken-countingai-costmacos-menu-bardeveloper-tools

Japanese Translation

数ヶ月前、私は「待て、なぜそれがこのくらい高くなるのか?」と呆れ呆れるほどに請求書を見ていた。何か明らかに破れていたわけではない。サービスダウンも、エクスプロイトも、異常なトラフィック増もなかった。ただ、ビルディング、プロンプトのテスト、モデルの比較、そしてアプリ間を飛び跳ねながら、毎日 LLM を使っているだけだ。 問題は単純だった:私が作業をしていたとき、トークンの燃やし方について感覚がなかったのだ。 事後的にダッシュボードを確認することはできるが、それはロードトライプが終わった後に速度計を確認するのと同じだ。会計には有用だが、制御には役に立たない。 そこで私は TokenBar を作った。 ほとんどの AI ツールは、使用データを 2 つの悪い方のいずれかの形で提供する: プロバイダダッシュボードに埋もれているか、 1 つのアプリまたはプレイグラウンドの中だけで提供されている。 偶発的な実験をしているならそれで良いだろ。 私は 1 つのものを望んだ: 作業中に使用量をリアルタイムで見られる、macOS のメニューバーに設置されたトークンカウンター。 後でではなく。 ただ、今、私は注意しているのか、それとも金を燃やしているのかという、動く感覚。 最大の勝利は抽象的な最適化ではなかった。それは行動だった。 使用量が可視化されるにつれ、私はすぐにパターンに気づき始める: あまりに曖昧なプロンプトを繰り返す 小さくて十分であれば大きなモデルを使う 理由なく長文脈が蓄積させる バックグラウンドのワークフローが繰り返し呼び出しているのを忘れている これは単一のリクエストに対しては劇的ではない。 それが AI 支出の厄介な部分だ。個々の瞬間には安価に見えて、総額では高価になる。 私はソロデベロッパーとして、同じ教訓を何度回し見続けている。 コストが不可視なら、それは上昇し続けるのだ。 これはクラウドインフラにも当てはまる。 ダッシュボードはレポートには優れている。 アドバイスよりも、可視性が行動を変える速度の方が速い。 多くのビルダーは、トークン経済学の強い直感を持つ前に AI 機能を追加している。 しかし、使用量が少しでも増えると、その盲点の高価なものになる。 あなたは巨大な財務スタックを必要としない。 私が TokenBar から望んだものは、使用量に対して微小な環境意識の部品だった。バッテリー残量や Wi-Fi ステータスのように、あなたの画面の隅に置かれるもの。 私の提案は単純だ: 判断が行われる場所で、近くでトークンの使用量をトラッキングする それがメニューバーアプリなら尚良い。 月額の請求書があなたがその教訓を教えるのを待つのは良い。 私はこの教訓を高価な方法で学ぶのを嫌って TokenBar を作った。

Original Content

A few months ago I had one of those dumb founder moments where you stare at a bill and think: wait, how did it get that high? Nothing was obviously broken. No outage, no exploit, no wild traffic spike. I was just using LLMs all day while building, testing prompts, comparing models, and bouncing between apps. The problem was simpler: I had no feel for token burn while I was working. I could check dashboards after the fact, but that is like checking your speedometer after the road trip is over. Useful for accounting, useless for control. So I built TokenBar. Most AI tooling gives you usage data in one of two bad forms: buried in provider dashboards surfaced only inside one app or one playground That is fine if you are doing occasional experiments. I wanted one thing: a live token counter sitting in the macOS menu bar so I could see usage while I worked Not later. Just a running sense of: am I being careful right now, or am I lighting money on fire? The biggest win was not optimization in the abstract. It was behavior. Once usage became visible, I started catching patterns immediately: retrying prompts that were too vague using a large model when a smaller one was enough letting long context accumulate for no reason forgetting that a background workflow was making repeated calls None of this is dramatic on a single request. That is the annoying part about AI spend. It often feels cheap in the moment and expensive in the aggregate. I keep relearning the same lesson as a solo dev: if a cost is invisible, it will drift upward It is true for cloud infra. Dashboards are great for reporting. Visibility changes behavior faster than advice does. A lot of builders are adding AI features before they have a strong instinct for token economics. But once usage grows even a bit, the blind spot gets expensive. You do not need a giant finance stack. That is what I wanted from TokenBar: a tiny piece of ambient awareness for AI usage, the same way battery percentage or Wi Fi status sits in the corner of your screen. My suggestion is simple: track token usage close to where decisions happen If that is a menu bar app, great. Just do not wait until the monthly bill teaches the lesson for you. I built TokenBar because I got tired of learning that lesson the expensive way.