Openrouter usage
Track OpenRouter API spending — credit balance, per-model cost breakdown, and spending projections from OpenClaw session logs.From its SKILL.md
npx -y skills add aAAaqwq/AGI-Super-Team --skill openrouter-usageAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
1.7 KB, 363 tokens by cl100k_base, as published. Nobody here has run it
openrouter-usage
- Author: Daniel Li
- Copyright © Daniel Li. All rights reserved.
Track your OpenRouter spending directly from your OpenClaw agent. Shows credit balance, per-model cost/token breakdown, and spending projections.
Trigger
Use when the user asks about OpenRouter credits, costs, spending, balance, usage, billing, or the /usage command.
Commands
Full report (recommended — combines everything)
openrouter-usage report # credits + today's usage + projection
openrouter-usage report --week # credits + last 7 days
openrouter-usage report --month # credits + last 30 days
Credit balance only
openrouter-usage credits
Per-model breakdown only
openrouter-usage sessions --today
openrouter-usage sessions --week
openrouter-usage sessions --month
openrouter-usage sessions --date 2026-02-25
openrouter-usage sessions --from 2026-02-01 --to 2026-02-15
Filtering and output
openrouter-usage report --agent main # specific agent only
openrouter-usage report --format json # JSON output
openrouter-usage sessions --today --utc # use UTC instead of local timezone
Notes
- API key auto-discovered from OpenClaw auth store or
OPENROUTER_API_KEYenv var. - Session parsing is fully local — reads
~/.openclaw/agents/*/sessions/*.jsonl. - Date filters use local timezone by default. Pass
--utcto override. - Zero dependencies beyond Python 3 stdlib.
What ships with it: 4 files
26.6 KB alongside SKILL.md, 2 of them executable
scripts/
- openrouter_usage.pyruns18.8 KB
- install.shruns3.4 KB
- LICENSE1.0 KB
- README.md3.3 KB