Tracking Your API Usage and Costs
I hate that feeling when I run a new automation tool and have no idea how much it is actually costing me. It is easy to lose track of credits when you are testing different models or tools. I want to see exactly where my money is going before I hit a surprise limit or get an unexpected bill from a provider.
If you feel the same way, I have good news. OpenClaw provides built-in ways to track your spending and see which features are hitting your wallet.
What You’ll Need
Section titled “What You’ll Need”- An active OpenClaw installation.
- API keys for your chosen providers (OpenAI, Anthropic, Google, etc.).
- Access to your configuration files or environment variables.
Quick Start
Section titled “Quick Start”You can check your costs in about 30 seconds using these commands:
- Check current session cost: Type
/statusin the chat. This shows your current model, context usage, and the estimated cost for the last reply. - Enable per-message footers: Type
/usage fullin the chat. This appends a usage footer to every single reply, including the estimated dollar cost. - Check provider quotas: Run
openclaw status --usagein your terminal. This shows your provider usage windows and quota snapshots. - View channel status: Run
openclaw channels listto see the health and usage of your active channels.
Where the Money Goes
Section titled “Where the Money Goes”OpenClaw picks up credentials from your auth-profiles.json, environment variables (like OPENAI_API_KEY), or your main config file. Once those keys are active, several features can trigger costs.
Core Responses and Media
Section titled “Core Responses and Media”Every time the model replies or calls a tool, it uses your provider credits. If you send images, audio, or video, OpenClaw summarizes or transcribes them before the main reply runs. Audio transcription is now auto-enabled if you have keys for OpenAI, Groq, or Deepgram.
Memory and Search
Section titled “Memory and Search”Semantic memory search uses embedding APIs if you use remote providers like OpenAI, Gemini, or Voyage. If you want to avoid these costs, I recommend setting memorySearch.provider = "local".
The web_search tool also uses keys. For example, Brave Search offers a generous free tier of 2,000 requests per month, but you still need a credit card on file for verification.
Background Tasks
Section titled “Background Tasks”Some usage happens behind the scenes:
- Compaction: The safeguard can summarize session history using your current model to save space.
- Model Probing: Running
openclaw models scanprobes OpenRouter models if that feature is enabled. - Talk Mode: If you use “Talk” mode with ElevenLabs, it will invoke their API using your
talk.apiKey.
Troubleshooting
Section titled “Troubleshooting”Costs are not showing up in chat
If you are using OAuth flows, OpenClaw hides the dollar cost. Cost estimation only appears when you use API-key authentication. Use /usage tokens if you just want to see the token count instead.
Unexpected embedding charges
Check your config for memorySearch.provider. If it is set to “openai” or “gemini”, you are paying for embeddings. Switch this to “local” to keep your memory processing on your own machine.
Brave Search tool is failing Brave requires a credit card for verification even on their free tier. If your key is valid but the tool fails, check your Brave API dashboard to ensure the account is verified.
Firecrawl fallback
If you use web_fetch without a FIRECRAWL_API_KEY, OpenClaw does not just stop. It falls back to a direct fetch and readability mode, which does not cost you any API credits.
If you need help setting up your keys or configuring these limits, chat with the AI Setup Assistant.
What’s Next
Section titled “What’s Next”OpenClaw Expert
Still stuck?
If this page didn't answer your case, ask OpenClaw Expert for step-by-step guidance.