Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

openrouter-analytics

Skill by OpenRouterTeam

Answers questions about your OpenRouter usage data, including spend, request volume, model breakdown, latency and token use. Built for developers who want to query their analytics or cut their OpenRouter bill.

  • Score 69
  • 330 stars
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install openrouter-analytics

Built from the published package, never by AI.

git clone --depth 1 https://github.com/OpenRouterTeam/skills /tmp/skills && mkdir -p ~/.claude/skills && cp -r /tmp/skills/skills/openrouter-analytics ~/.claude/skills/openrouter-analytics

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install openrouter-analytics in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The openrouter-analytics skill lets an AI assistant query a user's OpenRouter usage data through the Analytics API. It covers spend, request volume, model and provider breakdowns, latency, token usage and cost optimization. The assistant discovers the available metrics and dimensions, maps a user's question to a query, runs it, and explains the results.

Queries need an OpenRouter management key, which is separate from regular API keys. The skill includes scripts for schema discovery, analytics queries and ready-made query templates. It can also pass individual generation IDs to the openrouter-generations skill for details. It is aimed at people who want to understand their OpenRouter spend and reduce their bill.

Written from the project's SKILL.md and checked against it.

What it can do

  • discover-schema.tsLists the available metrics, dimensions, filter operators and granularities.
  • query-analytics.tsRuns an analytics query with chosen metrics, dimensions, granularity and ordering.
  • suggest-queries.tsReturns pre-built query templates for common questions, including cost optimization.
  • Model breakdownRanks spend, requests and tokens by model, provider or API key.
  • Trend analysisShows usage over time in hour, day, week or month buckets.
  • Latency reportingReports average and percentile latency and throughput by provider.
  • Cost breakdownSplits spend into credits, BYOK, upstream, cache, data logging and web search.
  • Generation drill-downLists generation IDs so they can be inspected with the openrouter-generations skill.

What you need

  • OpenRouter management key
  • Node.js with npm
  • OPENROUTER_API_KEY environment variable or --api-key flag

Try asking

  • What was my OpenRouter spend this month?
  • Which models cost me the most on OpenRouter?
  • How can I reduce my OpenRouter bill?

Good to know

  • Regular API keys return a 403 error. A management key is required.
  • Generation and session dimensions are limited to a 31-day range.
  • Results capped at --limit are partial and should be raised or paginated before reporting totals.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/openrouter-analytics/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to openrouter-analytics

All alternatives →
kaggle-cliKaggle
94

Guides an assistant through the Kaggle CLI, covering competitions, datasets, notebooks, models, benchmarks, authentication and quota. It is for people who use the kaggle command-line tool.

AAA Skill 7.7k
bigquery-bigframesgoogle
94

Generates Python code that uses BigQuery DataFrames (BigFrames) for data processing, analysis and machine learning on BigQuery. It is meant for Python data tasks, and the source says to use bigquery-basics for SQL-first workflows.

AAA Skill 25k
data-loadingmicrosoft
94

Discovers connected data sources and proposes loading options when a workspace lacks the data a question needs. Suited to users who want to connect database, warehouse or cloud sources from the chat.

AAA Skill 18k
data-manager-api-setupgoogle
94

Guides developers through enabling the Data Manager API, setting up Application Default Credentials, and installing its client libraries. Built for developers who are getting started with the API and need local environment and access setup.

AAA Skill 25k
managed-airflow-dag-authoringgoogle
94

Guides authoring and validating Apache Airflow DAGs for Managed Service for Apache Airflow (MSAA), formerly Cloud Composer. Built for developers who create or extend Airflow DAGs in these environments.

AAA Skill 25k
data-feedsdavila7
94

Extracts structured JSON data from over 40 websites, including Amazon, LinkedIn, Instagram, TikTok, Facebook and YouTube. Built on Bright Data's Web Data APIs, it returns product details, profiles, reviews, posts and comments from a URL.

AAA Skill 34k

Compare with kaggle-cli, bigquery-bigframes or data-loading

openrouter-analytics: common questions

Which key do I need for OpenRouter analytics?

You need a management key from the management keys page in OpenRouter settings. Regular API keys will get a 403 error.

Can it show cost for individual requests?

Yes. Adding the generation_id dimension returns a row per generation, which can then be inspected with the openrouter-generations skill. This dimension is limited to 31 days.

What kinds of usage data can it report?

The source lists spend, request counts, token counts, latency, throughput, cache hit rates and cost breakdowns by model, provider, API key and time.

How do I install openrouter-analytics?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is openrouter-analytics free?

The code is public, but no licence file was found, so check the repository before commercial use.

Is openrouter-analytics safe to use?

It scores 69 of 100. Grades: maintenance A, licence F, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to openrouter-analytics?

Similar skills: kaggle-cli, bigquery-bigframes, data-loading, data-manager-api-setup.

openrouter-analytics Install

Add to stack

Loading.