New The SREYUN website is live: five in-house products and reference pricing Learn more →
TokenTally

TokenTally

Multi-cloud LLM API key cost management

How much does each API key, each model and each department really spend? TokenTally syncs keys and bills from Alibaba Cloud Model Studio and Tencent Cloud TokenHub read-only on a schedule, analyzes them by key, model and cost center, and sends budget overruns and cost anomalies to DingTalk, Feishu, WeCom and email.

TokenTally screenshot

Key features

8 key capabilities of TokenTally at a glance

01

Key-level costs that match the bill

Alibaba Cloud instance bills are attributed to keys directly; Tencent Cloud bills are split exactly by TokenHub usage share, and the totals match the bill

02

Multi-dimensional analysis and drill-down

Pivot freely across key, model, workspace, cost center, owner, cloud and billing item; drill down from charts and cells, and share links

03

Token and call statistics

Token mix, cache hit rate, unit cost (¥ / M tokens), daily average and peak; requests, success rate, average tokens and cost per call

04

Budgets and month-end forecast

Monthly total, cost center (department) and API key budgets, with alerts at the warning threshold, when exceeded or when the month-end forecast exceeds them

05

Alerts and scheduled reports

DingTalk, Feishu, WeCom, webhook and email for budgets, cost anomalies, sync failures, key changes and daily / weekly / monthly reports, optionally with a sign-in-free read-only interactive report

06

Key governance

Finds keys that are deleted but still billed, over-privileged, undescribed, idle, suddenly expensive or without a cost center, with graded recommendations

07

Security first

Read-only permissions, access keys encrypted with AES-256-GCM, re-verification for sensitive actions, CSRF / CSP / rate limits / audit logs, SSRF protection for webhooks

08

No dependencies, easy to deliver

Pure Node.js 24 built-in modules with no npm dependencies, one docker compose command; automatic backups, Prometheus metrics, branding and a demo mode

What it is

Companies have more and more LLM API keys: support, marketing, engineering and data teams each request their own, spread over several Alibaba Cloud and Tencent Cloud accounts and workspaces. Cloud billing centers bill by product and resource, so you cannot see how much a key spent this month or which models it used. TokenTally turns this into a cost dashboard that updates itself.

  • Where did the money go? Every charge by key, model and workspace.
  • Who pays? Costs allocated by cost center / department, even when teams share accounts.
  • Why did it jump? Cost anomalies are reported the same day, so a leaked or misused key does not wait until month end.
  • Will we overspend? Budgets and month-end forecasts by key and by department.

Screenshots

Cost overview: costs this period, budget use and month-end forecast, unit cost and cache hit rate
Cost overview: costs this period, budget use and month-end forecast, unit cost and cache hit rate
Key analysis: usage and cost rankings, efficiency quadrants and governance summary
Key analysis: usage and cost rankings, efficiency quadrants and governance summary
Key details: token mix and call statistics
Key details: token mix and call statistics
Cost allocation: cost center × model pivot, exportable as CSV
Cost allocation: cost center × model pivot, exportable as CSV
Key governance: graded hints for deleted-but-billed, over-privileged and idle keys
Key governance: graded hints for deleted-but-billed, over-privileged and idle keys
Report preview: a Feishu message card with usage first and costs second
Report preview: a Feishu message card with usage first and costs second

All screenshots show fictitious data generated by TokenTally's demo mode.

How Tencent Cloud key-level costs are calculated

Tencent Cloud bills by inference service / model and does not include the API key. TokenTally fetches both the bill details and TokenHub's "key × model × day" usage:

Key cost = the real bill amount of that model and billing item (input / cache hit / output) for the day × the key's share of the matching tokens

The last share takes the remainder, so the total of all keys matches the Tencent Cloud bill exactly; without billing permissions, costs can be estimated at list prices and are labeled "estimated".

Compared with the cloud consoles

CapabilityCloud consoleTokenTally
Cost per API key (matching the bill)Partly (Alibaba Cloud has totals, Tencent Cloud none)Both, in one way
One view across clouds and accountsNoYes
Cost center / department allocationNoYes
Budgets and month-end forecast by key / departmentNoYes
Budget / anomaly / sync failure notifications to IMLimitedDingTalk, Feishu, WeCom, email
Daily / weekly / monthly reportsNoYes
Long-term historyLimited by console retentionLocal SQLite

Deployment

It only needs read-only cloud permissions (Alibaba Cloud RAM: Model Studio read-only + billing read-only; Tencent Cloud CAM: TokenHub read-only + billing read-only) and never changes anything in your clouds. Without a cloud account you can try every feature in demo mode first:

git clone https://github.com/sreyun/tokentally.git && cd tokentally && cp .env.example .env
# set APP_MASTER_KEY in .env (openssl rand -base64 32); set DEMO_DATA=true to try it
docker compose up -d --build && docker compose logs app   # the log shows the initial admin password

Every release also ships amd64 / arm64 images you can pull directly. After signing in, follow the setup checklist to add access keys, run the first bill sync and set up cost centers, budgets and notification channels. More platforms such as Volcengine Ark and Baidu Qianfan are on the roadmap.

Need commercial support or a private deployment of TokenTally?

We offer demos, deployment, vendor technical support and custom development to get you running faster.