# openrouter-analytics-schema

Fetches live OpenRouter analytics schema details, including metrics, dimensions, and filter rules. Useful when constructing usage or cost queries.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 355 installs · ★ 327 repo stars
- Author: OpenRouterTeam
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/OpenRouterTeam/skills/tree/HEAD/skills/openrouter-analytics-schema/SKILL.md
- Updated: 2026-10-24
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/openrouter-analytics-schema

## What it does

This skill pulls the latest structure of OpenRouter analytics data directly from `https://openrouter.ai/api/v1/analytics/meta` or runs `discover-schema.ts`. It reveals queryable items across cost categories, token totals, latency distributions, and cache performance without guessing field names.

Time windows vary by metric type. Standard volume and spend metrics accept ranges up to 367 days on daily buckets, whereas latency figures, token throughput, and hourly breakdowns cap out at 31 days. Requests exceeding the allowed window fail with HTTP 400 rather than partial output.

A regular API key will not work here: access requires a dedicated OpenRouter management key supplied via `--api-key <key>` or the `OPENROUTER_API_KEY` environment variable.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add OpenRouterTeam/skills --skill openrouter-analytics-schema -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/openrouter-analytics-schema/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/openrouter-analytics-schema/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add OpenRouterTeam/skills --skill openrouter-analytics-schema -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/openrouter-analytics-schema/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add OpenRouterTeam/skills --skill openrouter-analytics-schema -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/openrouter-analytics-schema/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install OpenRouterTeam/skills skills/openrouter-analytics-schema
```

2. **Manually: put the files in place**
- File: `.github/skills/openrouter-analytics-schema/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add OpenRouterTeam/skills --skill openrouter-analytics-schema -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/OpenRouterTeam/skills --path skills/openrouter-analytics-schema
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/openrouter-analytics-schema/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add OpenRouterTeam/skills --skill openrouter-analytics-schema -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/OpenRouterTeam/skills/tree/HEAD/skills/openrouter-analytics-schema/SKILL.md

## When to use it
- find available cost, token, and latency metrics
- check allowed breakdown dimensions for reporting queries
- verify time span limits before fetching analytics
- map user questions to the right metric and dimension pairs

## Example prompts
- Show available OpenRouter analytics metrics and dimensions
- Run `discover-schema.ts` to inspect the analytics schema
- Which grouping dimensions support the `request_count` metric?

## Similar
- [openrouter-cost-controls](https://affpapa.org/en/nevibecode/skills/openrouter-cost-controls.md) — skill · 1 install
- [openrouter-streaming-setup](https://affpapa.org/en/nevibecode/skills/openrouter-streaming-setup.md) — skill · 1 install
- [nano-banana-pro-openrouter](https://affpapa.org/en/nevibecode/skills/nano-banana-pro-openrouter.md) — skill · 9910 installs
- [pp-openrouter](https://affpapa.org/en/nevibecode/skills/pp-openrouter.md) — skill · 328 installs
- [openrouter-multimodal](https://affpapa.org/en/nevibecode/mcp/openrouter-multimodal.md) — MCP server · ★ 104 repo stars
- [cargo-analytics](https://affpapa.org/en/nevibecode/skills/cargo-analytics.md) — skill · 11600 installs

From the same set: [openrouterteam/skills](https://affpapa.org/en/nevibecode/by/openrouterteam/skills.md) — 16 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
