A comprehensive utility for tracking, analyzing, and optimizing AI API expenditures across major LLM providers to minimize unnecessary spending.
The fastest way to install a skill directly from the registry.
npx clawhub@latest install cm-api-cost-tracker
Copy the skill folder to one of these locations
~/.openclaw/skills/ <project>/skills/ Priority: Workspace > Local > Bundled
Copy this prompt to OpenClaw to install it automatically.
Help me install cm-api-cost-tracker using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).
Get the raw skill files in a ZIP archive.
The API Cost Tracker is a robust tool designed to provide granular visibility into your AI infrastructure spending. By parsing billing exports, usage logs, or direct API responses from providers like OpenAI, Anthropic, OpenRouter, and Google AI, it empowers developers to understand exactly where their budget is going. This utility is a core part of a professional Openclaw Skills setup, enabling teams to move beyond high-level billing summaries into detailed unit-cost analysis.
Beyond simple tracking, the tool identifies optimization opportunities by suggesting model downgrades, identifying caching potential, and highlighting prompt compression candidates. It serves as a financial audit layer for AI agents, ensuring that performance remains high while costs are kept under strict control through automated reporting and trend detection.
The API Cost Tracker requires Python 3.8 or higher and operates using only the standard library, requiring no external dependencies. To start using this with your Openclaw Skills, follow these steps:
# Analyze an OpenRouter activity export
python3 scripts/api_cost_tracker.py openrouter --file activity.json
# Analyze OpenAI usage from an environment key
export OPENAI_API_KEY='your_key_here'
python3 scripts/api_cost_tracker.py auto --days 30
The tool normalizes all incoming provider data into a consistent internal structure to ensure accurate cross-platform analysis:
| Attribute | Description |
|---|---|
| timestamp | The exact time the API request was initiated |
| model | The specific model identifier (e.g., gpt-4o, claude-3-5-sonnet) |
| tokens_in | Total number of input or prompt tokens |
| tokens_out | Total number of output or completion tokens |
| cost | The final calculated cost in USD based on the pricing database |
| metadata | Optional tags for feature-based or session-based tracking |
Loading
A framework that enables AI agents to monitor their own reasoning, detect biases, and improve decision quality through structured self-examination loops.

A high-fidelity extraction tool designed to transform unstructured academic papers into organized literature review tables.

A professional SEO optimization assistant providing real-time keyword research, content audits, and rank tracking using live API data.

A specialized diagnostic tool for identifying, analyzing, and remediating request blocking reasons within Alibaba Cloud DDoS Pro security environments.

A specialized security tool designed to identify and flag hardcoded secrets, API keys, and sensitive credentials within your source code.

Generate high-quality promotional videos and media content from images, audio, and clips using an AI-powered cloud rendering pipeline.








































