OpenRouter Usage Tracker for Openclaw

A utility for tracking OpenRouter API spending, credit balances, and per-model cost breakdowns directly from session logs.

lcajigasm
v0.1.0
Feb 26, 2026
2
967
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install openrouter-usage-info

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install openrouter-usage-info using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is OpenRouter Usage Tracker?

The OpenRouter Usage Tracker is a specialized tool designed to provide developers with transparent insights into their LLM expenditures. As a vital addition to your collection of Openclaw Skills, it bridges the gap between agent activity and billing by parsing local session data and fetching real-time account balances. This ensures that you can monitor token consumption and financial overhead without ever leaving your development environment.

By leveraging the efficiency of local session parsing, the skill offers a privacy-conscious way to audit usage. It allows users to see exactly which models are driving costs and provides projections to help manage monthly budgets effectively. Whether you are managing a single agent or a fleet of specialized assistants, this skill brings financial clarity to your AI workflows.

OpenRouter Usage Tracker Use Cases

  • Monitoring real-time OpenRouter credit balances during intensive development cycles.
  • Generating detailed cost reports for specific Openclaw Skills sessions to understand model ROI.
  • Auditing token usage across different agents to identify consumption bottlenecks.
  • Projecting future API spending based on historical usage patterns from local logs.

How OpenRouter Usage Tracker Works

  1. The skill triggers when it detects queries related to billing, credits, or usage statistics.
  2. It locates the OpenRouter API key from the OpenClaw auth store or the OPENROUTER_API_KEY environment variable.
  3. The tool scans local session logs stored in JSONL format within the OpenClaw agent directory structure.
  4. It aggregates token data and model identifiers to calculate precise costs based on OpenRouter's pricing.
  5. A formatted report is generated, displaying credits, usage breakdowns, and time-based projections.

OpenRouter Usage Tracker Setup

The skill requires an active OpenRouter API key. Ensure the key is accessible via your environment or the OpenClaw configuration.

# Run a full report for the current day
openrouter-usage report

# Check usage for the last 30 days
openrouter-usage report --month

OpenRouter Usage Tracker Data Schema & Taxonomy

The skill organizes and processes data according to the following structure:

Data Type Source Description
Session Logs ~/.openclaw/agents//sessions/.jsonl Local files containing raw token and model usage data.
Credit Data OpenRouter API Real-time balance information fetched via authenticated request.
Model Metadata Internal Mapping Correlation of model IDs to specific cost-per-token rates.
Filters CLI Arguments Support for --agent, --date, and --utc for refined reporting.

OpenRouter Usage Tracker Advanced Features

  • Multi-agent support allows for filtering usage reports to specific Openclaw Skills configurations.
  • Zero-dependency Python implementation ensures high performance and easy portability.
  • JSON output mode enables the piping of usage data into external data analysis or visualization pipelines.
  • Flexible date filtering supports custom ranges, enabling precise auditing for specific project milestones.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Bins openrouter-usage
Github Stars: 0
forks: 0

Featured*