# Usage Logs and Analytics

Filters call logs and token usage by provider, model, time and cost, and exports them.

- Repository: https://github.com/cheaper-inference/OmniRoute (83611 stars)
- Category: Business
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add cheaper-inference/OmniRoute --skill omni-usage-logs -g -a claude-code -y`
Codex: `npx skills add cheaper-inference/OmniRoute --skill omni-usage-logs -g -a codex -y`
Cursor: `npx skills add cheaper-inference/OmniRoute --skill omni-usage-logs -g -a cursor -y`
Gemini CLI: `npx skills add cheaper-inference/OmniRoute --skill omni-usage-logs -g -a gemini-cli -y`

## Description

Access detailed call logs and usage analytics. Filter by provider, model, time range, status, and cost. Export logs and aggregate token usage across all connections.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

<!-- generated by src/lib/agentSkills/generator.ts; manual edits will be overwritten -->

## Overview

Access detailed call logs and usage analytics. Filter by provider, model, time range, status, and cost. Export logs and aggregate token usage across all connections.

## Authentication

All requests require a valid Bearer token or session cookie. Obtain a token via `POST /api/auth/login` or configure `REQUIRE_API_KEY=false` for local development.

## Endpoints

### GET /api/usage/analytics

Get usage analytics

```bash
curl http://localhost:20128/api/usage/analytics \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
```

### GET /api/usage/call-logs

Get call logs

```bash
curl http://localhost:20128/api/usage/call-logs \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
```

### GET /api/usage/call-logs/filters

Get call log filter options

Distinct providers, models, accounts and API keys seen in call logs, plus every configured API key (id and name only). Feeds the Logs tab filter dropdowns.

```bash
curl http://localhost:20128/api/usage/call-logs/filters \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
```

### GET /api/usage/call-logs/{id}

Get a specific call log

```bash
curl http://localhost:20128/api/usage/call-logs/{id} \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
```

### GET /api/usage/{connectionId}

Get usage for a specific connection

```bash
curl http://localhost:20128/api/usage/{connectionId} \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
```

### GET /api/usage/history

Get usage history

```bash
curl http://localhost:20128/api/usage/history \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
```

### GET /api/usage/logs

Get usage logs

```bash
curl http://localhost:20128/api/usage/logs \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
```

### GET /api/usage/proxy-logs

Get proxy logs

```bash
curl http://localhost:20128/api/usage/proxy-logs \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
```

### GET /api/usage/request-logs

Get request logs

The rest: https://github.com/cheaper-inference/OmniRoute/blob/HEAD/skills/omni-usage-logs/SKILL.md
