Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>OpenAI Cost TrackerNew to Visual Studio Code? Get it now.
OpenAI Cost Tracker

OpenAI Cost Tracker

ramoncardena

|
1 install
| (0) | Free
Track usage and cost of OpenAI API calls within VS Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

OpenAI Cost Tracker

Icon

Version License: MIT VS Code API

Track your OpenAI API usage and costs directly within Visual Studio Code. This extension helps developers monitor their API consumption in real-time, preventing unexpected bills and helping manage budgets effectively.

✨ Features

  • 📊 Real-time Cost Tracking: Discrete status bar item showing cost for Today or the Current Month.
  • 📈 Detailed Statistics Panel: Visualize your daily spending with interactive bar charts giving you deep insights into your usage patterns.
  • 🔒 Secure: API keys are securely stored using VS Code's native SecretStorage API.
  • ⚡ Instant Access: Extension activates automatically on startup.
  • ⚙️ Configurable: Customize refresh intervals and views to suit your workflow.

🚀 Getting Started

  1. Install the extension.
  2. Use the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and run: OpenAI Cost Tracker: Set API Key
  3. Enter your OpenAI User API Key (Legacy).

    Note: Requires a User Key with appropriate permissions to read billing usage (Project keys limit access).

  4. The Status Bar on the bottom right will immediately update with your usage: ✨ Today: $0.12.

🕹️ Usage

Status Bar

  • Click the status bar item to open the Quick Menu.
  • Switch View: Toggle between "Today's Cost" and "Month's Cost".
  • View Detailed Stats: Opens the full-screen chart visualization.
  • Refresh: Force an immediate update from the API.

Detailed Stats

Select "View Detailed Stats" to open a Webview panel. This panel loads instantly and fetches your daily breakdown for the current month, rendering it as a beautiful chart.

⚙️ Settings

This extension contributes the following settings:

  • openaiCostTracker.refreshInterval: Frequency in minutes to auto-refresh cost data (default: 60).

📋 Requirements

  • VS Code v1.85.0 or higher.
  • OpenAI API Key (User Key recommended for Organization Usage access).

📝 Release Notes

0.0.2

  • New: Detailed Usage Stats with Charts!
  • New: Neon-style Extension Icon.
  • Improved: Instant loading UX.
  • Improved: Auto-activation on startup.

0.0.1

  • Initial release with secure key storage and basic status bar tracking.

Enjoying the extension? Give it a ⭐ on GitHub!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft