{
 "schema_version": 1,
 "generated": "2026-10-23",
 "id": "hamzafer-claude-code-mods--track-openai-api-credit-in-status-bar",
 "repo": "hamzafer/claude-code-mods",
 "repo_url": "https://github.com/hamzafer/claude-code-mods",
 "repo_slug": "hamzafer-claude-code-mods",
 "title": "Track OpenAI API credit and spend above the prompt",
 "page_title": "How to track OpenAI API credit and spend above the prompt with Claude Code Mods",
 "summary": "See an estimated OpenAI balance, today's spend and the last call without leaving Claude Code.",
 "who": "A developer who pays for OpenAI API usage and wants to watch credit drain while working with Claude Code.",
 "problem": "API credit can run down unnoticed, and it is not clear which model or call used most of the money.",
 "outcome": "A balance gauge, today's spend, the model that took most of the money and the last call appear in a band above the prompt.",
 "steps": [
  "Get an OpenAI organization Admin key, which the README says this mod requires.",
  "Run `npx claude-code-mods@latest`, tick openai-balance in the checklist, and press Enter.",
  "Restart Claude Code.",
  "Type `/openai-balance` to open the balance view.",
  "Check that the estimated balance, today's spend and the last call match your OpenAI usage page."
 ],
 "agent_prompt": "In the hamzafer/claude-code-mods repo, install the openai-balance mod using an OpenAI organization Admin key kept in <secret-store>. Run /openai-balance in Claude Code and expect an estimated balance with a gauge and today's spend; verify the figures roughly match the OpenAI dashboard.",
 "agents": [
  "claude-code"
 ],
 "difficulty": "Intermediate",
 "time": "30 minutes",
 "basis": "readme",
 "caveat": "The balance is an estimate, as the mod's name and description say, so treat it as a guide and not the figure your OpenAI account shows.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "typescript",
 "requirements": [
  "Claude Code 2.1.287 or newer",
  "npx available on your computer (the README installs with npx claude-code-mods@latest)",
  "Chrome, a terminal that shows images, and the Spotify app only for the mods that need them (md-preview, now-playing)",
  "An OpenAI organization Admin key only for openai-balance"
 ],
 "risk": "sensitive",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "credentials",
   "notice": "This mod needs an OpenAI organization Admin key, so store the key in a secret manager and never paste it into a prompt or a shared file."
  }
 ],
 "best": false,
 "score": 0.6,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/hamzafer-claude-code-mods/track-openai-api-credit-in-status-bar/",
 "md": "https://dedupedai.com/use-cases/hamzafer-claude-code-mods/track-openai-api-credit-in-status-bar/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/hamzafer-claude-code-mods--track-openai-api-credit-in-status-bar.json",
 "api_version": "v1"
}
