OpenRouter Usage for Trae/VS Code
This extension allows you to track your OpenRouter credit usage directly from the status bar.
Features
- Real-time Usage Tracking: Shows your remaining OpenRouter credits in the status bar.
- Auto-Refresh: Automatically updates usage every 5 minutes (configurable).
- Easy Configuration: Set your API key via a command.
How to Use
- Install the extension.
- Run the command
OpenRouter: Set API Key (or openrouter-usage.setApiKey) from the Command Palette (Ctrl+Shift+P / Cmd+Shift+P).
- Enter your OpenRouter API Key. You can get one from openrouter.ai/keys.
- The status bar will update to show your remaining credits.
Configuration
You can configure the following settings in your settings.json:
openrouterUsage.apiKey: Your OpenRouter API Key.
openrouterUsage.refreshInterval: Interval in seconds to refresh usage data (default: 300 seconds / 5 minutes).
Debugging
If you encounter issues, you can view logs by running the command OpenRouter Usage: Show Logs or checking the "OpenRouter Usage" output channel.
| |