All shelves / Mods / Usage
openrouter-balance
By hamzafer
openrouter-balance is a Claude Code usage mod by hamzafer.
Draws your OpenRouter credit above the prompt: the balance with a gauge, today's spend, and the model the money mostly went to.
Draws
Install
The marketplace name is claude-code-mods.
claude plugin marketplace add hamzafer/claude-code-mods claude plugin install openrouter-balance@claude-code-mods
It runs inside the Claude Code process. The side panel is only what the author's README names. Read the repo before you install, or run claude plugin validate on the plugin folder.
- Version
- 0.1.2
- License
- MIT
- Repo stars
- 381
- Last change
- 2026-10-15
What it can reach
- Draws in the session
- Reaches the network or an outside service
Claude Code 2.1.287 or later. The author says to restart after installing. Needs an OpenRouter key, from /config, else OPENROUTER_MANAGEMENT_KEY, else OPENROUTER_API_KEY, else the macOS Keychain item openrouter-key, and kept in memory only. With a management key, which cannot make model calls, the balance is real: OpenRouter reports the credits bought and used, and spend by model shows too. A regular API key shows the account balance when OpenRouter answers for it, and else its own spend today and this month and what its limit leaves; when the key's limit would run out before the account's credit, the line shows the key limit. The line is green from $5, yellow under $5, and red under $2. /openrouter-balance shows the balance, today, yesterday, the last 30 days, and spend, requests, and tokens by model, or, with a regular key, today, this week, this month, all time, its limit, and its budget. It refreshes every 5 minutes and after each turn, and a failed refresh keeps the last numbers, marked offline.
The marketplace, claude-code-mods, holds the mods in hamzafer's repo, openai-balance among them. This one installs on its own, or from the checklist that npx claude-code-mods@latest opens. Its own plugin.json names Jakub Krysmalski as its author. Watching what API calls cost is why this page files it under usage. openai-balance, in the same marketplace, draws your OpenAI API credit as an estimated balance, because OpenAI has no balance API. This one reads the real balance from OpenRouter. Today is the UTC day. OpenRouter reports spend by model for completed days only, so with a management key today is the usage now minus where it stood when the mod first saw the day, and a day first seen after 00:15 UTC reads since and the time instead.
Demo

What it hooks into
session.startWhen a session startsturn.completeWhen a turn endscommand.runWhen you run its slash command/openrouter-balanceui.renderDraws into the sessionAbovePrompt
Read from the on() calls in its hook modules. Open its source under Files to check what each one does.
Slash commands 1
/openrouter-balanceOpenRouter credit, spend today and spend by model
Files
The author's source, 3 files. They load when you open them.
Facts
- Author
- hamzafer
- Category
- Usage
- Marketplace
- claude-code-mods
- Folder
- mods/openrouter-balance
- Version
- 0.1.2
- License
- MIT
- Repo stars
- 381
- Last change
- 2026-10-15
- Language
- TypeScript
- Files
- 7