Docs

Platform

Coding agents

Connect Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Kiro, Cline, Continue, Windsurf and other AI coding tools. See their usage, output and cost per tool, team and developer.

Related guide: AI coding tool costs

AI coding tools report their usage to Token Meter separately from the API calls your own apps make. This page shows how to connect each tool and where its numbers appear. Everything lands in the Coding tools view of the sidebar (the second icon at its top): Connect (data sources), AI tools, Agent usage, Seat management, Team and People.

Before you start

  • To connect OpenTelemetry, a vendor analytics API or GitHub, you need to be an Owner or Admin of the workspace. Any member can set up the Token Meter agent on their own machine.
  • To send Claude Code or Codex through the Router, each developer needs a Token Meter key (it starts with tl_live_). Owners, Admins and Team leads create keys under Governance › API keys.
  • For a vendor feed, admin access to that tool's own console (for example the Cursor team admin page, or owner rights on your GitHub organization).
  • For OpenTelemetry tools, a terminal on the machine where the tools run.

Counts only

Token Meter reads sessions, prompts, tokens, lines, commits, credits and accept or reject decisions. Prompts, code, diffs and conversation content are never stored.

How data arrives

Each tool reports in whatever way it supports. There are four routes.

RouteWhere you set it upBest for
Vendor analytics APICoding tools › Connect › All data sources, the tool's row; or Settings › Connections for Anthropic and OpenAI keysCursor, GitHub Copilot, Claude Enterprise, Windsurf, Claude Code (Anthropic Admin key), Codex (ChatGPT Enterprise)
OpenTelemetryCoding tools › Connect › All data sources, Connect on the Any OpenTelemetry tool row, then Open OpenTelemetry setupClaude Code on any plan, Codex, Gemini CLI, VS Code Copilot Chat, Kiro Enterprise, Cline Enterprise, Continue, and any tool that reports the standard GenAI token metric
Token Meter agentCoding tools › Connect (each developer, on each machine)Token usage per developer, and which committed lines came from AI
RouterEach developer points the tool at the router: Claude Code at https://router.timewastevc.com (no /v1), and Codex, Cline and Continue at https://router.timewastevc.com/v1Claude Code, Codex, Cline and Continue, with exact tokens and cost for every request

Commits, lines and merged pull requests for every tool also come from the GitHub connection (Coding tools › Connect › All data sources › GitHub). A commit with an AI co-author marker counts as that tool. One without counts as human. GitLab and Bitbucket are not supported. See AI Impact.

When a vendor API and OpenTelemetry or the Token Meter agent describe the same tool, person and day, the vendor row wins. When OpenTelemetry and the Token Meter agent both describe Claude Code, Codex, Gemini CLI or Copilot for the same person and day, OpenTelemetry wins: its tokens for each model it reports, and its commits and lines when it reports any. The other is left out of every figure, so connecting both does not double count.

"Same person" means the same email. The Token Meter agent names people by their git email and Claude Code's OpenTelemetry by the email of their Claude account. If those differ, link them in Settings › Members › Advanced › Same person, two emails so the work is counted once.

One route per tool for the Router

The Router is the exception. A request sent through the Router and also reported by the tool's own OpenTelemetry export, data events or the Token Meter agent counts twice. Pick one route per tool.

Who can do what

PageWho can open it
Connect (this machine's agent and keys)Every member
All data sources, OpenTelemetry setup, JiraAdmins and owners
GitHub (from All data sources)Admins and owners
Settings › Connections (Anthropic Admin key, OpenAI connection)Admins and owners
Agent usageTeam leads and above. Team leads see their own teams only.
TeamTeam leads and above
People › All peopleTeam leads and above. Team leads see their own teams only.
People › Your usageEvery member, own data only
AI toolsAdmins and owners
Seat managementAdmins and owners

Tool by tool

ToolHow it connectsWhat you getNot available
Claude CodeAnthropic Admin key under Settings › Connections; OpenTelemetry on any plan (Pro, Max, Team, Enterprise or a Console API key); or the RouterSessions, lines added and removed, commits, PRs, tokens and estimated cost by model, edit accepts and rejects, terminal type, per personThe Admin API does not cover Claude Code run through Bedrock, Vertex or Foundry
Claude EnterpriseAnalytics API key on the Claude Enterprise row of Coding tools › Connect › All data sourcesPer person: Claude Code sessions, lines, commits, PRs and edit accepts, plus claude.ai chat and Cowork activity (shown as Claude chat and Cowork). Assigned seat counts on Seat management.Needs an Enterprise plan. Data starts 2026-01-01 and is about a day behind. Claude Code through Bedrock is not covered.
CodexOpenTelemetry on any plan; your OpenAI connection under Settings › Connections, with a ChatGPT workspace ID; or the RouterOver OpenTelemetry: sessions, prompts, tokens and estimated cost by model, tool accepts and rejects, per person. From the usage API: threads, prompts and credits by client (CLI, web and so on), tokens, and cost where ChatGPT reports it, per person.No lines or commits. Over OpenTelemetry, people signed in with an API key show as anonymous account IDs unless you set user.email.
CursorTeam API key on the Cursor row of Coding tools › Connect › All data sourcesLines added by AI (accepted suggestions), accepts and rejects, prompts by agent, composer, chat and inline edit, who uses Tab. On Enterprise, exact per-commit AI lines from AI Code Tracking.No cost, no tokens, no sessions. No OpenTelemetry export.
GitHub CopilotGitHub organization and token on the GitHub Copilot row of Coding tools › Connect › All data sources. VS Code Copilot Chat can also send OpenTelemetry.Lines added and prompts by feature (completion, agent, chat, CLI), accepted suggestions and AI credits per person. Over OpenTelemetry: tokens by model.Usage metrics are about two days behind. People are named by GitHub login.
Gemini CLIOpenTelemetry, through a Collector on the developer's machineSessions, tokens by model, tool accepts and rejectsPartly supported: no lines or commits. Cost is a list-price estimate from its tokens
KiroKiro Enterprise's daily OpenTelemetry exportCredits, messages and conversations per person and client (IDE, CLI, plugin), a day behindNo tokens
ClineCline Enterprise's OpenTelemetry logs, or the RouterTasks (as sessions), prompts, tokens and cost by modelOver OpenTelemetry, people show as anonymous IDs and are not linked to members
ContinueContinue's data destination, or the RouterTokens by model and providerPeople show as anonymous IDs
WindsurfService key on the Windsurf row of Coding tools › Connect › All data sourcesCredits used per person per dayEnterprise plans with individual-level analytics on. Nothing else is reported.
Any other toolOpenTelemetry, if it reports gen_ai.client.token.usageTokens by model and person, shown as Other toolsNo sessions, lines or commits
DevinNot supported yetNothing

Coding tools › Connect › All data sources lists every source you can connect, one row each, with how it reports and its state (Syncing, Needs attention or Waiting for first sync). Choose Connect or Manage on a row to set it up. To ask for another tool, use Tell us which one in the note at the bottom of the page.

Token Meter agent (every developer)

The Token Meter agent runs on a developer's machine. It reports their AI coding tools' token usage and which committed lines came from AI. Usage sent with a key counts as the key owner's. It recognises Claude Code, Codex, Cursor, GitHub Copilot, Windsurf and Gemini CLI. Anything else shows as Other tools.

  1. In the dashboard, open Coding tools › Connect (the page is titled Data sources). It opens on Set up this machine, with the Token Meter agent card (View setup). Your keys are listed under Your keys once you have one.
  2. Choose Create key. Name it after the machine, for example "Work laptop". The key starts with tlgitai_ and is shown once, so copy it now.
  3. On that machine, open a terminal and run the command the page shows. It needs Node.js 18 or newer, and works on macOS, Linux and Windows. It asks before it installs the Token Meter agent. It replaces any other server the machine was sending to.
Shell
npx @tokenmeter/agent connect --url https://ingest.timewastevc.com --key tlgitai_<your agent key>
  1. Check it with npx @tokenmeter/agent status. The server line should show https://ingest.timewastevc.com. After you next use an AI tool, the activity log shows "metrics upload batch result" with no errors. On the dashboard, the key's status turns to Uploading.

For scripted or managed rollouts (no one at the keyboard), add --yes so it installs without asking. Pass the key in the AISCALE_KEY environment variable to keep it out of shell history.

macOS / Linux
TOKENMETER_KEY=tlgitai_<your agent key> npx @tokenmeter/agent connect --url https://ingest.timewastevc.com --yes
Windows PowerShell
$env:TOKENMETER_KEY = "tlgitai_<your agent key>"
npx @tokenmeter/agent connect --url https://ingest.timewastevc.com --yes
  • Only agent keys work here. Your tl_live_ ingest key is refused.
  • A key expires after 90 days. To rotate, make a new one and revoke the old one.
  • Each member can hold up to 5 live keys.
  • A key that has not uploaded for 3 days shows as Quiet 3+ days. Admins see Everyone's keys. An "Agent key quiet" rule under Alerts › Rules sends a notice when a key goes quiet, and clears it when uploads resume.
  • Your account needs an email address to own a key.

OpenTelemetry

OpenTelemetry is an open standard many tools use to report usage. Claude Code, Codex, Gemini CLI, VS Code Copilot Chat, Kiro and Cline can send their numbers to Token Meter this way. Continue uses the same token on its own address.

The addresses Token Meter accepts

WhatAddress
Base address (most tools add the rest themselves)https://ingest.timewastevc.com/v1/otlp
Metricshttps://ingest.timewastevc.com/v1/otlp/v1/metrics
Logs (Cline, Codex)https://ingest.timewastevc.com/v1/otlp/v1/logs
Continue data eventshttps://ingest.timewastevc.com/v1/connectors/continue

Tools built on the standard OpenTelemetry exporter add /v1/metrics or /v1/logs to the base address on their own. Each tool below says which address to use. Self-hosted deployments: use the address your setup page shows.

Create an OpenTelemetry key

  1. In the dashboard, open Coding tools › Connect › All data sources, choose Connect on the Any OpenTelemetry tool row, then Open OpenTelemetry setup. Choose Create key.
  2. Name it after a group of machines or teams, for example "Dev laptops". One key per group lets you see what is reporting, and revoke one without touching the rest.
  3. Copy the key. It starts with tlotel_ and is shown once. The setup blocks on the page fill in with it. Your tl_live_ ingest key and agent keys do not work here.
  4. Set up each tool as shown below.
  5. Use the tool for a few minutes. In the Connectors table, the key's Last data changes from Nothing received yet to a time. People (30d) counts who reported. Revoke a key there to stop it at once.

Claude Code

Claude Code can send straight to Token Meter. Add this env block to your Claude Code user settings file. If the file already has an env block, add these lines inside it.

  • macOS and Linux: ~/.claude/settings.json
  • Windows: %USERPROFILE%\.claude\settings.json
settings.json
{
  "env": {
    "CLAUDE_CODE_ENABLE_TELEMETRY": "1",
    "OTEL_METRICS_EXPORTER": "otlp",
    "OTEL_EXPORTER_OTLP_PROTOCOL": "http/protobuf",
    "OTEL_EXPORTER_OTLP_ENDPOINT": "https://ingest.timewastevc.com/v1/otlp",
    "OTEL_EXPORTER_OTLP_HEADERS": "Authorization=Bearer tlotel_<your connector token>",
    "OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE": "delta"
  }
}

Restart Claude Code. It sends its numbers about once a minute. Claude Code ignores these settings in a project's .claude/settings.json, so use the user file. To roll this out to everyone, put the same block in Claude Code's managed settings. Delta (the setting in the last line) is already Claude Code's default.

Run an OpenTelemetry Collector (for Gemini CLI, Copilot Chat and other tools)

Some tools cannot add your token, or they send running totals that Token Meter does not accept. For these, run the OpenTelemetry Collector on the same machine. The Collector is a small free program from the OpenTelemetry project. Tools send to it, and it adds your token, turns running totals into per-period amounts (called "delta"), and forwards everything to Token Meter. It only listens on your own machine (localhost), so nobody else on your network can send through it. On the OpenTelemetry setup page, the Collector card is under Advanced.

  1. Open a terminal in a folder you keep, for example a new folder named otel. Download and unpack the Collector's "contrib" edition. You need contrib: the plain edition lacks the delta converter.
macOS
# Apple silicon. On an Intel Mac, use darwin_amd64 instead of darwin_arm64.
curl -fLO https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.165.0/otelcol-contrib_0.165.0_darwin_arm64.tar.gz
tar -xzf otelcol-contrib_0.165.0_darwin_arm64.tar.gz
Linux
# On an ARM machine, use linux_arm64 instead of linux_amd64.
curl -fLO https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.165.0/otelcol-contrib_0.165.0_linux_amd64.tar.gz
tar -xzf otelcol-contrib_0.165.0_linux_amd64.tar.gz
Windows PowerShell
curl.exe -fLO https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.165.0/otelcol-contrib_0.165.0_windows_amd64.tar.gz
tar -xzf otelcol-contrib_0.165.0_windows_amd64.tar.gz
  1. In the same folder, save this file as collector.yaml. Copy it exactly. It reads your token from an environment variable, so the token is not written in the file.
collector.yaml
receivers:
  otlp:
    protocols:
      grpc:
        endpoint: localhost:4317
      http:
        endpoint: localhost:4318

processors:
  cumulativetodelta: {}
  batch: { send_batch_size: 5000, send_batch_max_size: 5000 }

exporters:
  otlphttp:
    endpoint: https://ingest.timewastevc.com/v1/otlp
    headers:
      Authorization: "Bearer ${env:TOKEN_METER_OTEL_TOKEN}"

service:
  pipelines:
    metrics:
      receivers: [otlp]
      processors: [cumulativetodelta, batch]
      exporters: [otlphttp]
  1. Set your connector token and start the Collector.
macOS / Linux
export TOKEN_METER_OTEL_TOKEN="tlotel_<your connector token>"
./otelcol-contrib --config=collector.yaml
Windows PowerShell
$env:TOKEN_METER_OTEL_TOKEN = "tlotel_<your connector token>"
.\otelcol-contrib.exe --config=collector.yaml
  1. Within a few seconds the Collector prints "Everything is ready. Begin running and processing data." Leave this window open while you use the tools. To keep it running after restarts, install it as a service; the OpenTelemetry Collector documentation explains how for each system.
  2. Set up each tool below to send to the Collector.

The Collector forwards metrics only. A tool may log that the Collector refused its logs or traces. That is expected and harmless. Version 0.165.0 is shown; any newer contrib release also works.

Gemini CLI

With the Collector running, add this telemetry block to your Gemini CLI user settings file. If the file already exists, add the block inside its outer braces. Then restart Gemini CLI.

  • macOS and Linux: ~/.gemini/settings.json
  • Windows: %USERPROFILE%\.gemini\settings.json
settings.json
{
  "telemetry": {
    "enabled": true,
    "target": "local",
    "otlpEndpoint": "http://localhost:4317",
    "otlpProtocol": "grpc",
    "logPrompts": false
  }
}

logPrompts: false keeps prompt text out of Gemini CLI's own logs. Token Meter would not store it either way.

VS Code Copilot Chat

  1. With the Collector running, open VS Code.
  2. Open the Command Palette (Ctrl+Shift+P, or Cmd+Shift+P on a Mac) and run Preferences: Open User Settings (JSON).
  3. Add these three lines inside the outer braces, then save. Copilot Chat starts sending right away.
VS Code settings.json
{
  "github.copilot.chat.otel.enabled": true,
  "github.copilot.chat.otel.exporterType": "otlp-http",
  "github.copilot.chat.otel.otlpEndpoint": "http://localhost:4318"
}

Don't change Copilot Chat's service name (the OTEL_SERVICE_NAME variable). Token Meter knows the tokens are Copilot's by its default name, copilot-chat. Under any other name they show as Other tools.

Other tools

Point the tool's OpenTelemetry export at the Collector: http://localhost:4318 over HTTP, or http://localhost:4317 over gRPC. Token Meter reads only the standard gen_ai.client.token.usage metric from these tools, and shows them as Other tools.

Kiro (Enterprise)

Kiro sends from AWS once a day at 02:00 UTC, for the previous day. Nothing is sent when you save the settings. You set it up in the AWS console and the Kiro console, in the same AWS Region as your Kiro profile.

  1. In AWS KMS, create a symmetric customer managed key. The default aws/secretsmanager key does not work. Add this statement to the key policy, with your Region in place of <region>:
KMS key policy statement
{
  "Sid": "AllowKiroDecryptViaSecretsManager",
  "Effect": "Allow",
  "Principal": {
    "Service": "q.amazonaws.com"
  },
  "Action": [
    "kms:Decrypt",
    "kms:DescribeKey"
  ],
  "Resource": "*",
  "Condition": {
    "StringEquals": {
      "kms:ViaService": "secretsmanager.<region>.amazonaws.com"
    }
  }
}
  1. In AWS Secrets Manager, store a new secret. Choose Other type of secret, switch to Plaintext, and paste this, with your connector token. Pick the KMS key from step 1 for encryption.
Secret value
{
  "OTEL_EXPORTER_OTLP_ENDPOINT": "https://ingest.timewastevc.com/v1/otlp/v1/metrics",
  "OTEL_EXPORTER_OTLP_HEADERS": "Authorization=Bearer tlotel_<your connector token>"
}
  1. On the secret, add this resource policy:
Secret resource policy
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowKiroGetSecretValue",
      "Effect": "Allow",
      "Principal": {
        "Service": "q.amazonaws.com"
      },
      "Action": "secretsmanager:GetSecretValue",
      "Resource": "*"
    }
  ]
}
  1. In the Kiro console, choose Settings. Under Kiro user activity reports, choose Edit.
  2. Choose the OpenTelemetry (OTel) format, paste the secret's ARN, select HTTP/protobuf, and choose Enable.

Use the full metrics address shown in the secret. Kiro sends to the address exactly as given, as its own examples for HTTP destinations show. Kiro retries a failed day up to three times and does not resend it later, and it does not report failures, so check Last data the day after you enable it. A resent day replaces the stored day, so Kiro's retries never count twice.

Cline (Enterprise)

Cline reports usage as log events. In the Cline dashboard (app.cline.bot), open your organization's settings and its Remote Configuration. Turn on OpenTelemetry and set these fields:

Cline Remote Configuration
OpenTelemetry:  On
Logs:           On (metrics can stay off)
Endpoint:       https://ingest.timewastevc.com/v1/otlp
Protocol:       HTTP/protobuf
Header key:     Authorization
Header value:   Bearer tlotel_<your connector token>

Enter the header as a key and a value in the headers section. Cline adds /v1/logs to the endpoint itself. The full logs address, https://ingest.timewastevc.com/v1/otlp/v1/logs, also works.

Codex

Codex reports usage as log events, on any plan. Add this to the Codex config file on each machine, or to your managed Codex configuration to roll it out to everyone. The file is ~/.codex/config.toml on macOS and Linux, and %USERPROFILE%\.codex\config.toml on Windows. If the file already has an [otel] section, replace it. Then restart Codex.

~/.codex/config.toml
[otel]
environment = "prod"
log_user_prompt = false
exporter = { otlp-http = { endpoint = "https://ingest.timewastevc.com/v1/otlp/v1/logs", protocol = "binary", headers = { "Authorization" = "Bearer tlotel_<your connector token>" } } }
  • Use the full logs address, ending in /v1/logs. Codex sends to the address exactly as given.
  • log_user_prompt = false keeps prompt text out of what Codex sends. Token Meter does not need it.
  • You get sessions, prompts, tokens and estimated cost by model, and tool accepts and rejects. Cached input counts as cache, not input. Reasoning tokens are already part of output. The cost is Codex's own estimate for each turn.
  • People signed in with ChatGPT are named by their ChatGPT email. With an API key, Codex sends no email: set user.email as in Say who is using a tool below, or the usage shows under an anonymous account ID.
  • Codex's metrics are not read. They name no person and repeat what the logs report.
  • If you also connect Codex's usage API (ChatGPT Enterprise) and both report the same person on the same day, the usage API's numbers are shown.

Continue

Add this to Continue's config.yaml, or to a shared assistant on Continue Hub. The file is at ~/.continue/config.yaml on macOS and Linux, and %USERPROFILE%\.continue\config.yaml on Windows. Continue posts one tokensGenerated event per model call. At level noCode, no code is sent.

config.yaml
data:
  - name: Token Meter
    destination: https://ingest.timewastevc.com/v1/connectors/continue
    schema: "0.2.0"
    level: noCode
    events: [tokensGenerated]
    apiKey: tlotel_<your connector token>

Say who is using a tool

Usage is linked to a person by user.email, then user.account_uuid, then the tool's anonymous user.id. For a tool that reports no user, set this before you start it, in the same terminal. It works for tools that read the standard OpenTelemetry environment variables. Without it, usage still counts but is not linked to anyone.

macOS / Linux
export OTEL_RESOURCE_ATTRIBUTES="user.email=you@company.com"
Windows PowerShell
$env:OTEL_RESOURCE_ATTRIBUTES = "user.email=you@company.com"

What the endpoint accepts

  • OTLP over HTTP only, as application/x-protobuf or application/json, gzipped or not. Tools that only speak gRPC go through a Collector.
  • Delta only. Running-total (cumulative) points are rejected with a message asking for OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=delta. The Collector above converts them.
  • At most 5,000 data points per request.
  • Points dated more than 400 days ago, or more than a day ahead, are rejected.
  • Metrics Token Meter does not use are ignored, not treated as errors.

Vendor analytics APIs

Admins connect these on Coding tools › Connect › All data sources: choose Connect on the tool's row, then paste its key in the panel that opens. Keys are stored encrypted and never shown again.

  • Cursor: a team API key with the admin:* scope (cursor.com dashboard, API Keys). Cursor documents these APIs for Enterprise teams; whether a Teams-plan key works is not confirmed. AI Code Tracking is Enterprise only.
  • GitHub Copilot: the GitHub organization login and a token that can read it (read:org). Switch on the Copilot usage metrics policy for the organization. This is the same GitHub connection AI tools › Seats and licences uses for Copilot seats, so saving it in one place updates the other. Copilot names people by GitHub login, so connect GitHub (the GitHub row on All data sources) and map logins to members in its Git authors card.
  • Claude Enterprise: an Analytics API key (scope read:analytics). The primary owner creates it in claude.ai under Organization settings, API. An Admin key does not work.
  • Windsurf: a service key with the Teams Read-only permission (Windsurf team settings, Service Keys), and optionally a Group. Individual-level analytics must be on in Windsurf.

Two feeds come from provider connections under Settings › Connections instead:

  • Claude Code: an Anthropic Admin API key. If Claude Enterprise is also connected, Claude Code figures from the two are de-duplicated.
  • Codex: your OpenAI connection with its ChatGPT workspace ID filled in (under Advanced when you add the connection). The connection holds one key, and Token Meter sends it to two places: OpenAI's billing API, which needs an OpenAI organization Admin key, and ChatGPT's analytics API, which needs a ChatGPT workspace Admin key with the enterprise.analytics.usage.read permission (the Codex-only analytics scope does not work). These are normally two different keys, so Codex analytics usually cannot be read today. Billing is unaffected either way. Leave the ID blank to skip Codex.

Syncs run every hour, and also right after you save a connection. The first successful sync backfills 90 days. Later runs re-pull the last few days, because vendors revise them. Sync now queues a run. Disconnect stops syncing and removes the stored key. Each tool's panel shows its last run and outcome. Once a push connector has run, a Recent syncs card under the list on All data sources shows its recent runs, kept for 90 days.

Cline and Continue through the Router

Cline and Continue let you set their OpenAI-compatible base URL. Point it at the Token Meter Router instead, and every call is metered with exact tokens and cost. See Router for the settings. These calls arrive without a customer, feature or team.

Not both

Use the Router or the tool's own OpenTelemetry or data events, not both, or calls count twice.

Send Claude Code through the Router

You can point Claude Code at the Token Meter Router. Each request then shows in Requests with its exact tokens and cost, and a claude_code_session_id tag for its Claude Code session. The Router passes Claude Code's requests to Anthropic as they came, apart from the model it picks and any redaction by an input guardrail you turned on, so tools, thinking and prompt caching keep working.

This replaces your Claude subscription for these requests

Claude Code sends your Token Meter key instead of your claude.ai login. Pro or Max limits no longer apply, and each request is billed per token through Token Meter. With the model set to auto, requests on a paid plan run on Token Meter's provider keys, up to the workspace's monthly auto allowance ($25 a month on Growth, Scale and Enterprise). On the Free plan, unless the workspace pays with router credits, they do not run on Token Meter's keys: add your own Anthropic key and name a model (or send auto to your own key with a routing rule), or Claude Code gets 429 platform_keys_require_paid_plan. A workspace that pays with router credits runs auto on Token Meter's keys from its credits, with no monthly allowance. Router › Rules, under Advanced (Auto settings), shows how much of the allowance is used.
  1. In the dashboard, open Governance › API keys and choose Create key. Copy the key; it starts with tl_live_ and is shown once. Give each developer their own key, named after them, so you can revoke one person's key without stopping everyone else.
  2. Try it first in a terminal. These settings last until you close the terminal.
macOS / Linux
export ANTHROPIC_BASE_URL="https://router.timewastevc.com"
export ANTHROPIC_AUTH_TOKEN="tl_live_<your key>"
export ANTHROPIC_MODEL="auto"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="auto"
export CLAUDE_CODE_GATEWAY_HINT_HEADERS="1"
claude
Windows PowerShell
$env:ANTHROPIC_BASE_URL = "https://router.timewastevc.com"
$env:ANTHROPIC_AUTH_TOKEN = "tl_live_<your key>"
$env:ANTHROPIC_MODEL = "auto"
$env:ANTHROPIC_DEFAULT_HAIKU_MODEL = "auto"
$env:CLAUDE_CODE_GATEWAY_HINT_HEADERS = "1"
claude
  1. In Claude Code, run /status. The Anthropic base URL line should show https://router.timewastevc.com, and the Auth token line should name ANTHROPIC_AUTH_TOKEN. Close it and send any prompt. Claude answers as usual.
  2. In the dashboard, open Requests. The request is there with its model and cost.
  3. To make it permanent, add the same settings to your Claude Code user settings file. It is ~/.claude/settings.json on macOS and Linux, and %USERPROFILE%\.claude\settings.json on Windows. If the file already has an env block, add these lines inside it.
~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://router.timewastevc.com",
    "ANTHROPIC_AUTH_TOKEN": "tl_live_<your key>",
    "ANTHROPIC_MODEL": "auto",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "auto",
    "CLAUDE_CODE_GATEWAY_HINT_HEADERS": "1"
  }
}

Don't put your key in a project's .claude/settings.json. That file is usually committed and shared with everyone who clones the project. To roll the Router out to a whole team, put the same env block in Claude Code's managed settings, with each developer's own key.

VS Code extension: the extension checks its credential before it starts, so set the same variables in VS Code itself. Run Preferences: Open User Settings (JSON) from the Command Palette and add:

VS Code settings.json
{
  "claudeCode.environmentVariables": [
    {
      "name": "ANTHROPIC_BASE_URL",
      "value": "https://router.timewastevc.com"
    },
    {
      "name": "ANTHROPIC_AUTH_TOKEN",
      "value": "tl_live_<your key>"
    },
    {
      "name": "ANTHROPIC_MODEL",
      "value": "auto"
    },
    {
      "name": "ANTHROPIC_DEFAULT_HAIKU_MODEL",
      "value": "auto"
    },
    {
      "name": "CLAUDE_CODE_GATEWAY_HINT_HEADERS",
      "value": "1"
    }
  ]
}

Claude desktop app

The desktop app ignores ANTHROPIC_BASE_URL and settings.json. It reads its own setting, which Anthropic calls third-party inference. An organisation admin can push that setting to every device, or you can set it on one machine.

  1. Turn on Developer Mode: Help › Troubleshooting › Enable Developer Mode. On Windows, the Help menu is under the ☰ button at the top left of the app.
  2. Open Developer › Configure Third-Party Inference. In the Connection section, fill in these fields:
Third-party inference
Inference provider:   Gateway
Gateway base URL:     https://router.timewastevc.com
Gateway API key:      tl_live_<your key>
Credential kind:      Static API key
Gateway auth scheme:  Bearer
  1. Choose Apply Changes, then Save & Restart. When the app opens again, its sign-in screen offers to start with the configuration you entered. Choose that.
  2. Open the model picker. It lists auto and the Claude models your workspace can call by name.

The base URL has no /v1. The restart closes everything open in the app, including Claude Code sessions in its Code tab. Each request is billed per token through Token Meter, the same as Claude Code. To go back to your Claude account, choose the Anthropic sign-in option on the sign-in screen. The configuration stays saved in the Developer menu.

Which model it uses

  • auto lets Token Meter pick a Claude model on the session's first request, and then keeps it, so the prompt cache keeps working. It moves to a stronger model that costs more when a later prompt is harder than any before it, or when tool calls keep failing. That can happen more than once in a session. It does not move to a cheaper model mid-session, unless the model it holds can no longer take the request (for example, it was taken out of the pool). The router keeps the held model in memory for 12 hours after the last turn (every turn renews it), and in its database for 30 to 60 minutes after the last turn. After a router restart the session keeps at least its model's level for the same kind of task while the database record lasts. Once neither is left, the next turn is picked afresh and can get a cheaper model. It needs no setup and is the right first choice.
  • ANTHROPIC_DEFAULT_HAIKU_MODEL is the model Claude Code uses for background jobs, such as naming a session. Keep it at auto unless a Haiku model is listed for your workspace.
  • To use a named Claude model instead, the workspace needs its own Anthropic key under Router › Providers (Add provider key), and the model must be listed under Model capabilities (in Advanced on the same tab). Then set ANTHROPIC_MODEL to that model's name. A model that is not listed gets a 400 model_capability_not_configured error. A workspace with no Anthropic key of its own gets 424 provider_not_configured.

What does not go through the Router

  • Fast mode (/fast) is refused with 400 unsupported_request_field:speed, because it bills at a premium. A request that sets service_tier gets 400 unsupported_request_field:service_tier.
  • Remote Control and voice dictation are off while Claude Code uses a gateway key. That is Claude Code's own rule.
  • Claude Code on the web and in Slack ignore these settings. The desktop app has its own setting: see Claude desktop app.
  • If your workspace's Anthropic key points at Amazon Bedrock or Google Vertex AI, Claude Code requests are refused with 400 claude_code_needs_claude_api_endpoint. Store a Claude API key for Anthropic under Router › Providers (Rotate on the Anthropic row).

Count each request once

For developers who use the Router, turn off Claude Code's OpenTelemetry export and don't run the Token Meter agent on that machine. Both would report the same requests again, and they would count twice.

Send Codex through the Router

OpenAI's Codex CLI can use the Token Meter Router as a custom model provider. Each request then shows in Requests with its exact tokens and cost. Codex then signs in with your Token Meter key instead of your ChatGPT account, so each request is billed per token through Token Meter, not to your ChatGPT plan.

  1. In the dashboard, open Governance › API keys and choose Create key. Copy the tl_live_ key; it is shown once.
  2. Save the key in an environment variable named TOKEN_METER_KEY, so it stays out of the config file.
macOS / Linux
# macOS: add this line to ~/.zshrc. Linux: add it to ~/.bashrc. Then open a new terminal.
export TOKEN_METER_KEY="tl_live_<your key>"
Windows PowerShell
# Saves the key for your Windows user. Open a new terminal afterwards.
setx TOKEN_METER_KEY "tl_live_<your key>"
  1. Open the Codex config file in a text editor. Create it if it does not exist. It is ~/.codex/config.toml on macOS and Linux, and %USERPROFILE%\.codex\config.toml on Windows. Use this file, not a project's .codex/config.toml: Codex ignores model providers there.
  2. Add the block below. Put the first four lines at the top of the file, above any line in square brackets. If the file already sets model or model_provider, replace those lines.
~/.codex/config.toml
model = "auto"
model_provider = "tokenmeter"
web_search = "disabled"
model_reasoning_summary = "auto"   # optional: shows the model's reasoning summaries (OpenAI's own API only)

[model_providers.tokenmeter]
name = "Token Meter"
base_url = "https://router.timewastevc.com/v1"
env_key = "TOKEN_METER_KEY"
wire_api = "responses"
  1. Open a new terminal and run codex. Send any prompt. Codex may warn "Model metadata for `auto` not found". That is expected: Codex does not know the name auto, so it edits files with shell commands instead of its patch tool.
  2. In the dashboard, open Requests. The request is there with the model Token Meter picked and its cost.

The model_reasoning_summary line is optional. With it, Codex shows the model's reasoning summaries. That works only for OpenAI models served by OpenAI's own API; on other models, and on OpenAI models through Azure OpenAI, Codex shows none.

Codex editor extension (VS Code): the extension runs the same Codex engine and reads the same ~/.codex/config.toml as the CLI, so the steps above cover it. Save TOKEN_METER_KEY as a user environment variable (step 2 does this), then restart the editor. The extension's model picker lists only OpenAI's own models. The model from config.toml shows there as Custom: pick it to run on auto. Picking a listed model overrides the config for that chat. Some short side requests, such as chat titles, still go by name to the extension's own default models.

Limits

  • Claude models do not work from Codex. A named Claude model gets 400 claude_tools_require_native_messages_api. auto only picks models that can take Codex's tools, so it never picks Claude here.
  • OpenAI's hosted web search runs on OpenAI's servers, so it cannot run here. That is why the config sets web_search = "disabled".
  • Codex sub-agents do not run through the Router. Codex works without them.
  • To name an OpenAI model instead of auto, the workspace needs its own OpenAI key under Router › Providers (Add provider key), and the model must be listed under Model capabilities (in Advanced on the same tab).
  • Codex knows only its newest model names. gpt-5.5 and the gpt-5.6 models work with Codex's default settings, tools and reasoning included. Older names such as gpt-5.4 work, but get the same fallback metadata as auto.

Count each request once

The Token Meter agent also reports Codex usage from the developer's machine. If a developer runs the Token Meter agent and sends Codex through the Router, those requests count twice. Choose one for Codex.

Linking usage to people

Usage counts under a person only when the tool reports a member's email, or a GitHub login mapped to a member. The rest shows as not linked. The Team page shows a banner with how many tool identities are unlinked in the range, per tool.

  • Ask developers to use the Token Meter agent with their own key, so their usage carries their email.
  • Map GitHub logins to members in the Git authors card on the GitHub page (the GitHub row on Coding tools › Connect › All data sources; needed for Copilot).
  • Add user.email as an OpenTelemetry resource attribute for tools that report no user (see Say who is using a tool).
  • Cline over OpenTelemetry and Continue report anonymous IDs. Their workspace-wide totals are right, but they are not linked to members.
  • Kiro is linked by the email Kiro finds in your directory. Without one, it stays unlinked.

What you see

Agent usage

Coding tools › Agent usage shows how teams use AI coding tools over 7, 30, 90 or 180 days or a year. It shows active people, agent sessions, AI commits and pay-as-you-go spend, by day or by month. Charts show agent sessions by tool, prompts sent by tool, and lines and commits per day. More detail adds AI pull requests, API-equivalent value, active people by type of engagement (terminal, chat, agent, web) and pull requests per day. By tool and By team tables close the page. Select a row for every figure, including tokens and accept rate.

  • Sessions and prompts are separate charts because they are different units. Claude Code, Gemini CLI, Cline and Codex over OpenTelemetry report sessions. Cursor, Copilot, Codex and Claude chat report prompts.
  • With GitHub connected, the daily output charts come from GitHub and split human from each AI tool. Human is an upper bound: a commit without an AI marker counts as human.
  • When exact per-commit lines are reported (Cursor AI Code Tracking, or the Token Meter agent on developers' machines), a separate chart shows the committed lines those tools wrote against everything else. Only those tools are measured, so it is not a workspace-wide AI share.
  • Spend is pay-as-you-go where the tool bills it. Otherwise it is API-equivalent value (subscription use valued at API rates, not money spent), and otherwise credits. These are never added together.
  • Teams under 5 people are combined in By team, so no individual can be read from a row.
  • A connected source that needs attention (a rejected key, a missing workspace ID or organization login) shows a notice above the charts with a link to fix it.

Team

Coding tools › Team has an Overview tab. It shows the org adoption rate, daily active AI users, power users and average cost per active user. It also has an Attribution card, and a Coding agents card with spend per tool and how much of it is linked to people. The Teams and Roles tab has the team matrix, power users by team and usage by role. Admins can set a target share of active people per team with Edit targets. Active means at least one SDK or connected AI-tool activity in the range.

People

Coding tools › People has two views. All people (team leads and above) lists AI spend and engineering output per person. The spend table has no score or ranking; the Members table adds an adoption score (share of working days with any AI use, out of 100). Select a person for their daily tokens by tool, coding tools and SDK-metered models. Your usage is every member's own usage, output and Claude plan, and only they can see it.

AI tools

Coding tools › AI tools (admins) is the inventory of AI tools and accounts. It has four tabs: Tools in use (sanctioned and shadow tools), Discovery (Google Workspace and expense or card CSV uploads, which feed Shadow AI signals), Registry (AI assets and SaaS agreements; register a tool by hand) and Seats and licences (seat use, idle seats, renewals, and vendor admin connectors for GitHub Copilot seats and Slack).

Seat management

Coding tools › Seat management (admins) measures how much of each Claude seat's weekly allowance is used. Anthropic publishes no token or dollar quota for a seat. So a seat's use is reported when Claude showed a percentage, a calibrated estimate when usage is divided by an allowance learned from readings, or a peer estimate otherwise.

  1. Add plan: name, type (Max / Pro, Team or Enterprise) and, for Enterprise, seat-based or usage-based billing. Each person belongs to exactly one plan.
  2. Add a seat: one email and tier, or import a CSV of email,tier. People who use Claude but hold no seat appear under Not on any plan, where you can assign them.
  3. Set each tier's Seat price / month and, if you know it, its Weekly allowance.
  4. Add Usage readings: the weekly percentage a seat holder sees in Claude under Settings, Usage. Readings above 50% are the most accurate. One below 30% is ignored.
  5. With a directory synced (Google Workspace, Okta or Entra), Add a directory rule selects people by organisational unit, department or job title. You review them before anyone is added.

Seats are graded over the last 4 complete weeks as Achiever, Steady, Laggard, Dormant or Unknown, with "at cap" and "downgrade?" flags. Values are API-equivalent dollars of Claude Code usage, not money spent. Chat is not included unless a feed reports it. Usage comes from the Claude Code feeds above (Admin API, Enterprise Analytics, OpenTelemetry or the Token Meter agent). With Claude Enterprise connected, each plan card also shows how many seats Anthropic reports as assigned. Every view of the named seat list is recorded.

On People › Your usage, a member sees their own seat and weekly use and can Add a reading. Pro and Max subscribers can install a Claude Code status-line reporter, shown on that tab. It forwards only the weekly percentage and their email.

Troubleshooting

What you seeWhat to do
A connector shows Nothing received yetCheck the address and the Authorization: Bearer tlotel_… header. Make sure the tool sends over HTTP (use a Collector for gRPC), and that it has used the tool long enough to send once.
The Collector stops at start with "send_batch_max_size must be greater or equal to send_batch_size"Your config sets only send_batch_max_size. Use the collector.yaml above, which sets both to 5000.
401 with {"error":"invalid_key"} from the OpenTelemetry addressThe token is wrong. These addresses take only a tlotel_ connector token, not a tl_live_ or tlgitai_ key.
403 with {"error":"key_revoked"}The token or key was revoked or has expired. Create a new one.
404 from the ingest addressThe path is wrong. Use one of the exact addresses in The addresses Token Meter accepts.
The exporter reports non-delta points rejectedSet OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=delta, or send through the Collector.
HTTP 415 from the ingest addressThe body must be application/x-protobuf or application/json.
Kiro shows nothing the day after you enabled itCheck the protocol is HTTP/protobuf and the secret holds the full metrics address. Kiro does not report delivery failures or resend missed days.
connected. The first sync has not run yetSyncs run every hour, or after you save the connection. Use Sync now to queue one.
Codex is connected. One more step: add your ChatGPT workspace IDAdd the workspace ID to the OpenAI connection under Settings › Connections.
GitHub Copilot is connected. One more step: add your organization loginAdd the organization login on the Copilot panel.
A source could not read its usageThe key was rejected. Check its plan and permissions (for Codex, enterprise.analytics.usage.read and a workspace ID that belongs to that workspace).
Cursor AI Code Tracking is not available for this keyAI Code Tracking is Enterprise only. The rest of Cursor's data still syncs.
An agent key shows Quiet 3+ daysRun npx @tokenmeter/agent status on that machine. The key may be revoked or expired, the network blocked, or the agent uninstalled.
The Token Meter agent is required. Re-run with --yes to install it automatically.The command ran with no one to answer its question. Add --yes.
You already have 5 active keysRevoke a key you no longer use, then create one.
Claude Code asks you to log in, or /status shows no Anthropic base URLThe settings did not reach Claude Code. Set them in ~/.claude/settings.json or in the same terminal you start claude from, not in a project's settings file.
401 invalid_key from the RouterThe key is wrong or in the wrong variable. Use a tl_live_ key from Governance › API keys, in ANTHROPIC_AUTH_TOKEN (Claude Code) or TOKEN_METER_KEY (Codex).
400 model_capability_not_configuredThe model is not listed for your workspace. Use auto, or add the model under Router › Providers › Advanced › Model capabilities.
402 auto_monthly_limit_reached (429 in Claude Code)The workspace used its monthly auto allowance. It resets on the 1st (UTC). A named model on your own key still works. Claude Code gets this error as 429 with x-should-retry: false, so it does not retry. Other tools get 402.
402 platform_keys_require_paid_plan (429 in Claude Code)The workspace is on the Free plan and does not pay with router credits, so auto does not run on Token Meter's keys. Add your own Anthropic key under Router › Providers and name a model, or upgrade under Settings › Plan.
429 monthly_request_limit_reachedThe workspace has used the routed requests its plan includes this month (100,000 on Free, 2,500,000 on Growth, 10,000,000 on Scale, 40,000,000 on Enterprise). It resets on the 1st (UTC), or upgrade under Settings › Plan.
529 in Claude CodeThe router answered 503, for example because the provider kept failing and the router paused it. Claude Code gets every router 503 as 529, waits and retries on its own. The error_code is unchanged.
400 auto_routing_disabledToken Meter has turned auto routing off for this workspace. Auto is on for every workspace by default, and there is no setting for it in the dashboard. Name a model, or contact Token Meter.
400 claude_tools_require_native_messages_api in CodexCodex was set to a Claude model. Use auto or an OpenAI model.
400 unsupported_request_field:speed in Claude CodeFast mode is on. Turn it off with /fast. A request that sets service_tier gets 400 unsupported_request_field:service_tier.
Usage is not linked to peopleSee Linking usage to people.
Claude Code, Codex, Cline or Continue usage looks doubledThe tool reports through the Router and also through OpenTelemetry, data events or the Token Meter agent. Keep one.
A tool shows nothingCursor has no OpenTelemetry export, and Devin is not supported. For Codex over OpenTelemetry, check that the endpoint ends in /v1/logs, and restart Codex after editing config.toml.