openrouter-analytics
Review OpenRouter usage, analytics, and troubleshooting data via API. Use when the user asks for spend/usage monitoring, activity trends, per-key management reporting, or deep investigation of specific request IDs (latency, provider fallback, finish reason, token/cost breakdown).
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/plgonzalezrx8/openrouter-analyticsOpenRouter Analytics
Use this skill to pull management-level usage data and request-level troubleshooting details from OpenRouter.
Quick Start
Run from this skill folder:
cd ~/clawd/skills/openrouter-analytics
Management key operations (set OPENROUTER_MANAGEMENT_KEY):
python3 scripts/openrouter_analytics.py activity --limit 20
python3 scripts/openrouter_analytics.py activity --date 2026-02-18
python3 scripts/openrouter_analytics.py activity --from 2026-02-01 --to 2026-02-18 --summary --csv /tmp/activity.csv
python3 scripts/openrouter_analytics.py credits
python3 scripts/openrouter_analytics.py keys --limit 50 --summary
python3 scripts/openrouter_analytics.py report --from 2026-02-01 --to 2026-02-18 --format markdown
Request-level troubleshooting (set OPENROUTER_API_KEY):
python3 scripts/openrouter_analytics.py generation --id <generation_id>
Use --raw on any command to print full JSON.
Workflow
- Check macro activity
- Run
activityfor daily spend/traffic patterns.
- Run
- Check account-level usage
- Run
creditsto review consumed vs remaining credits.
- Run
- Find key-level consumers
- Run
keysto identify which keys are driving usage.
- Run
- Investigate incidents
- Run
generation --id ...for detailed logs on one request (latency, fallback providers, finish reason, token and cost details).
- Run
Notes
activity,credits,keys, andreportrequire a Management API key.generationuses a standard OpenRouter API key and requires the requestid.- The script auto-loads
~/.openclaw/.envand current-directory.envbefore execution. - Use
--retriesand--timeoutto tune robustness under transient API/network issues. - Keep generation IDs in your application logs to support reliable post-incident analysis.
Resources
- Endpoint reference and field guide:
references/endpoints.md - CLI helper script:
scripts/openrouter_analytics.py
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-plgonzalezrx8-openrouter-analytics": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
apple-remind-me
Natural language reminders that create actual Apple Reminders.app entries (macOS-native)
workflow-orchestrator
Structural parity skeleton for queue-driven orchestration in a workflow context.
web-markdown-navigator
Fetch webpages and return clean markdown instead of raw HTML. Use for URL reading, extraction, and summarization tasks where the user wants markdown output; use browser fallback for JS-heavy/SPA pages when extraction is thin.
openclaw-healthcheck-cron
Create and run a reusable OpenClaw deep healthcheck automation using a cron job plus a script. Use when setting up scheduled OpenClaw health audits, standardizing security/status checks, sanitizing environment-specific values for sharing, and packaging the setup for reuse.
excalidraw-creator
Create hand-drawn style Excalidraw diagrams, flowcharts, and architecture visuals as PNG images