Tokscale
Badges for Tokscale — AI token usage, cost, rank, and active days from the global leaderboard.
Display live stats from Tokscale, the AI token usage leaderboard for developers using Claude Code, OpenCode, Codex, Cursor, Pi, and more.
Tokens (branded)
Cost
Rank (branded)
Active days
Global stats
Available badges
| Badge | Endpoint | Description |
|---|---|---|
| Tokens | /tokscale/tokens/{username} | Total token consumption |
| Cost | /tokscale/cost/{username} | Estimated total cost |
| Rank | /tokscale/rank/{username} | Global leaderboard rank |
| Active Days | /tokscale/active-days/{username} | Days with AI activity |
| Stats | /tokscale/stats | Global user count |
The default endpoint /tokscale/{username} returns the token count.
Quick examples
Finding your username
Your Tokscale username is your GitHub username. To appear on the leaderboard:
- Install the CLI:
bunx tokscale - Login:
bunx tokscale login - Submit your usage:
bunx tokscale submit
Visit your profile at https://tokscale.ai/u/{username} to verify.
Data source
Uses the Tokscale API. Returns data from the user's profile including all-time stats. No API key required. Cached 10 minutes.