What is api-cost?
api-cost is a Claude Code mod by Fabax that shows what each request, the session and the billing month would cost at Claude API list prices, read from the transcripts. It is listed under Cost & usage and has no public popularity data yet.
| Type | Claude code mod |
|---|---|
| Author | Fabax |
| Repository | Fabax/claude-mod-api-cost |
| Popularity | no public popularity data yet |
| Category | Cost & usage |
| Security | High risk (56/100) |
| Rank | #5,888 of 9,397 Claude Code mods; #1,084 in Cost & usage |
| Last commit | 2026-11-30 |
| Hooks | 8 events |
| Sees | every prompt |
| Draws on | AbovePrompt, CommandOutput |
Is api-cost safe to install?
api-cost scores 56/100 on the MCPMods security check: High risk. Things to review: sends data over the network; starts processes outside the sandbox; watches every prompt or event. It passed 3 of 8 checks.
Mod footprints come from claude plugin validate, which lists every event a mod hooks and every API call it makes without running it.
| Check | Result |
|---|---|
| Sends data over the network | Review |
| Starts processes outside the sandbox | Review |
| Writes no files or config | Pass |
| Doesn't read environment variables | Pass |
| Watches every prompt or event | Review |
| Doesn't drive Claude | Pass |
| Validator reported problems | Note |
| No license detected | Note |
API calls in its code
| Call | What it means |
|---|---|
$.clock.now | |
$.clock.sleep | |
$.command.register | |
$.http.fetch | network requests |
$.process.run | runs processes |
$.session.id | |
$.session.usage | |
$.state.get | |
$.state.set | |
$.store.delete | keeps its own state |
$.store.get | keeps its own state |
$.store.keys | keeps its own state |
$.store.set | keeps its own state |
$.ui.resolve | draws interface |
$.ui.status | draws interface |
$.ui.toast | draws interface |
How do I install api-cost?
- Check your Claude Code version. Mods need Claude Code 2.1.287 or later and are on by default.
claude --version
- Read its footprint. This lists every event it hooks and every API call it makes, without running it.
git clone https://github.com/Fabax/claude-mod-api-cost claude plugin validate ./claude-mod-api-cost/.
- Install it. Run this in your terminal, then /reload-plugins in an open session.
claude plugin marketplace add Fabax/claude-mod-api-cost && claude plugin install api-cost@api-cost
Or ask Claude to set it up
Paste this into Claude Code and it installs api-cost for you:
Install the "api-cost" Claude Code mod from https://github.com/Fabax/claude-mod-api-cost. Run claude plugin validate on it first and show me what it can access before you enable it.