openrouter-usage-analytics

Installation
SKILL.md

OpenRouter Usage Analytics

Overview

OpenRouter provides usage data through three endpoints: GET /api/v1/auth/key (credit balance and rate limits), GET /api/v1/generation?id= (per-request cost and metadata), and response usage fields (token counts). This skill covers collecting metrics from these sources, building analytics pipelines, cost reporting, and performance dashboards.

Prerequisites

  • An OpenRouter API key (sk-or-v1-...) exported as OPENROUTER_API_KEY — see the openrouter-install-auth skill for setup
  • Python 3.8+ with the OpenAI SDK plus requests (used to fetch exact per-request cost from the generation endpoint); sqlite3 (stdlib) backs the analytics database
  • curl and jq for the Credit Balance Monitoring one-liner
  • HTTP-Referer / X-Title headers set on the client if you also want OpenRouter dashboard attribution

Instructions

Installs
1
GitHub Stars
2.8K
First Seen
13 days ago
openrouter-usage-analytics — jeremylongshore/tons-of-skills-marketplace