OpenRouter Usage Monitor for Openclaw

A dedicated tool for monitoring real-time OpenRouter API spend, model activity, and account balances directly within your agent workflow.

rosseyre
v1.1.3
Feb 12, 2026
1
2.4k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install openrouter-usage

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 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 Monitor?

The OpenRouter Usage Monitor is a specialized skill designed to provide developers with immediate visibility into their Large Language Model (LLM) expenditures. By leveraging the OpenRouter API, this tool fetches live totals for daily, weekly, and monthly spending, alongside account balance details. It bridges the gap between coding and budget management, ensuring that users of Openclaw Skills can maintain financial oversight without leaving their development environment.

This skill is essential for anyone scaling AI applications who needs to track per-model performance and historical data to optimize their API usage. By automating the retrieval of financial metrics, it allows developers to focus on building rather than manually checking dashboards.

OpenRouter Usage Monitor Use Cases

  • Monitoring daily and monthly API spending to prevent budget overruns.
  • Checking the remaining account balance to ensure uninterrupted service for AI agents.
  • Analyzing model-specific costs over a 7-day period to identify the most expensive LLMs.
  • Auditing historical activity to optimize model selection based on cost-efficiency.
  • Providing real-time cost transparency within an Openclaw Skills integrated environment.

How OpenRouter Usage Monitor Works

  1. The skill initializes by checking for the presence of the OPENROUTER_API_KEY and the optional OPENROUTER_MGMT_KEY in the environment or local configuration.
  2. It executes a Python script or a fallback curl command to query the OpenRouter auth endpoint for real-time totals (Today, Week, Month).
  3. If a Management Key is provided, the skill queries the activity endpoint to retrieve a granular breakdown of spend per model for the last 7 days.
  4. The data is parsed, formatting the UTC-based historical data and live totals into a readable summary.
  5. The final report is returned to the user, highlighting current balance and model-specific expenditures.

OpenRouter Usage Monitor Setup

To get started with this skill, you need to provide your OpenRouter credentials. You can set these as environment variables or within a credentials.env file in the skill directory.

export OPENROUTER_API_KEY=your_key_here
export OPENROUTER_MGMT_KEY=your_mgmt_key_here

Ensure that Python 3 is installed for the primary execution path. If Python is unavailable, the skill will attempt to use curl and jq for data retrieval. This flexibility is a hallmark of robust Openclaw Skills.

OpenRouter Usage Monitor Data Schema & Taxonomy

The skill processes and displays data across several key metrics to provide a full financial overview:

Metric Description Source
Live Totals Current spend for Today, Week, and Month /auth/key
Balance Current credit balance and total limit /auth/key
Per-Model Spend Historical cost breakdown for individual LLMs /activity
Model Activity Number of requests (N) per model (7d) /activity

Note: Live totals reflect current activity, while per-model data reflects completed UTC days for maximum accuracy in Openclaw Skills reports.

OpenRouter Usage Monitor Advanced Features

  • Multi-layer fallback system: Uses Python 3 as the primary driver with a robust curl/bash fallback for environments with limited runtimes.
  • Granular model auditing: Deep-dive into specific model costs to help refine Openclaw Skills agent configurations for better ROI.
  • Management Key support: Enables the activity endpoint to provide detailed historical metrics beyond simple balance checks.
  • UTC rollover handling: Intelligently accounts for the lag between live usage and historical model-by-model reporting.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*