If you use the Anthropic API directly or through Claude Code, your monthly bill is invisible until it arrives. The Anthropic Console shows usage delayed by a few hours and only in aggregate. There is no native way to see, in the moment, what the current session is costing or how close you are to your monthly budget. For a heavy Claude Code user running long agent loops, this is the difference between knowing and finding out.
Claude Battery is a native Mac and iPhone app that closes the gap. It pulls your Claude API usage in real time, breaks down input tokens versus output tokens versus cache hits, shows cost in USD, and surfaces all of this in a Mac menu bar icon and an iPhone home screen widget. It is free on the App Store.
How to Use Claude Battery
Download Claude Battery from the Mac App Store or the iOS App Store. The app supports both platforms with the same Anthropic API key.
On macOS, Claude Battery lives in your menu bar. Click the icon to see your current session's token count, your daily total, and an estimated cost in USD. The icon itself shows a small fill gauge — like a battery icon — that depletes as your monthly budget is consumed.
On iOS and iPadOS, the app provides a home screen widget in three sizes. The small widget shows your daily total. The medium widget adds the monthly cumulative. The large widget shows a sparkline chart of daily usage across the current month.
Setup requires an Anthropic API key with billing read access. Open the Anthropic Console, generate a read-only API key, and paste it into Claude Battery Settings. The key is stored in your device's secure keychain — never in plaintext, never on a remote server. The app polls the Anthropic usage API on a schedule (every few minutes by default) and caches the response locally.
What the app tracks: input tokens, output tokens, cache read tokens, cache write tokens, and the resulting cost in USD at Anthropic's current pricing. The breakdown is important because input and output tokens are priced differently — output is typically four to five times more expensive per token than input.
The session view shows tokens used in the current conversation or workflow, refreshed in near real-time. The daily view shows your cumulative usage for today. The monthly view aggregates everything since the first of the month, with a per-day breakdown chart that makes cost spikes easy to spot.
You can configure a monthly budget threshold in Settings. When your cumulative monthly spend reaches a configurable percentage of that budget (90% by default), the app sends a system notification.
How to Control Claude API Costs
The first rule of cost control is understanding the pricing structure. Anthropic charges differently for input tokens, output tokens, cache read tokens, and cache write tokens. As of mid-2026, the relative costs roughly follow this pattern: cache reads are the cheapest (typically 10% of base input cost), input tokens are the second cheapest, cache writes are slightly more expensive than input, and output tokens are the most expensive (four to five times input). Claude Battery shows the breakdown directly so you can see which category is driving your bill.
The biggest single lever is prompt caching. If you send the same system prompt repeatedly — common in agent loops, batch processing, and Claude Code workflows — mark the static prefix with the cache_control parameter. The first request writes the cache (slight overhead). Every subsequent request within the cache TTL reads from the cache at 10% the cost of re-reading raw input. Claude Battery's session view shows your cache hit rate so you can verify it is working.
The second lever is output length. Output tokens are the dominant cost in most workflows because they are the most expensive and there is usually no way to cache them. You can reduce output by setting max_tokens, by adding "respond concisely" or "answer in one sentence" to your prompts, or by structuring your work so the model produces minimal output and you parse the rest from tool calls.
The third lever is model selection. Haiku 4.5 is roughly twenty times cheaper per token than Opus 4.7. For classification, routing, simple tool dispatch, and any task where you do not need top-tier reasoning, Haiku is the right choice. Reserve Opus for complex multi-step reasoning, code generation in unfamiliar codebases, and tasks where the cost of a wrong answer exceeds the cost of running the better model.
The fourth lever is batch processing. The Anthropic Batch API runs jobs asynchronously within 24 hours at 50% off the standard token price. For workflows that do not need real-time response — nightly data enrichment, bulk classification, scheduled report generation — the batch endpoint cuts your bill in half with no other changes.
The discipline is to check Claude Battery's daily chart at the end of each week. Spot the spikes. Identify which session or workflow caused them. Then apply the lever that fits: caching for repeated prompts, max_tokens for verbose models, Haiku for simple tasks, batch for non-urgent work.
How Claude Battery Compares to Other Token Trackers
There are a handful of ways to see your Claude API usage. Most are either delayed, web-only, or both.
| Tool | Platform | Real-time | Cost tracking | Cache monitoring | Free |
|---|---|---|---|---|---|
| Claude Battery | Mac + iPhone | Yes | Yes | Yes | Yes |
| Anthropic Console | Web | Delayed | Yes | Yes | Yes |
| LangSmith | Web | Yes | Yes | Partial | Freemium |
| Custom logging | DIY | Depends | DIY | DIY | DIY |
The Anthropic Console is the official source but is web-only and has a delay before usage appears. LangSmith is a heavy observability platform that works across providers but adds significant overhead for a simple cost-monitoring use case. Custom logging is the most flexible but requires you to build and maintain the pipeline.
Claude Battery occupies a specific niche: a native app that is always visible, requires no integration into your code, and surfaces the four metrics that matter (tokens, cost, daily total, monthly cumulative) directly on the surfaces you already look at — menu bar on Mac, home screen on iPhone.
Frequently Asked Questions
What is Claude Battery and how does it work?
Claude Battery is a native app for Mac and iPhone that monitors your Claude API usage in real time. It connects to the Anthropic API using your API key and displays token counts, session costs, and monthly spend in a menu bar icon on Mac or a home screen widget on iPhone. The app polls the Anthropic usage API on a schedule and caches the response locally.
Is my API key safe in Claude Battery?
Claude Battery uses your API key locally to query the Anthropic usage API. The key is stored in your device's secure keychain — the same encrypted store iOS and macOS use for passwords and other secrets — and is never transmitted to any third-party server. The app talks only to Anthropic's API. Use a read-only API key for additional safety.
Does Claude Battery work with Claude Code?
Yes. Claude Code uses the same Anthropic API endpoints, so all token usage from Claude Code sessions appears in your Claude Battery usage data alongside any direct API usage. If you mix Claude Code with other Anthropic-based tools (Cursor, custom scripts, agent frameworks), all of it consolidates into the same view.
Can I set a spending alert?
Yes. Claude Battery lets you set a monthly USD budget threshold. You receive a notification when your cumulative spend approaches the limit (90% by default, configurable). This is particularly useful for Claude Code users running long agent loops where it is easy to accidentally consume large amounts of tokens overnight.
Download Claude Battery
Claude Battery is free on the App Store. It works on macOS 14 and newer and iOS 16 and newer. The same Anthropic API key works across both apps via iCloud sync.