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






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
| Capability | Cloud console | TokenTally |
|---|---|---|
| Cost per API key (matching the bill) | Partly (Alibaba Cloud has totals, Tencent Cloud none) | Both, in one way |
| One view across clouds and accounts | No | Yes |
| Cost center / department allocation | No | Yes |
| Budgets and month-end forecast by key / department | No | Yes |
| Budget / anomaly / sync failure notifications to IM | Limited | DingTalk, Feishu, WeCom, email |
| Daily / weekly / monthly reports | No | Yes |
| Long-term history | Limited by console retention | Local 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.