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.
| 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.
Your Tokscale username is your GitHub username. To appear on the leaderboard:
bunx tokscalebunx tokscale loginbunx tokscale submitVisit your profile at https://tokscale.ai/u/{username} to verify.
Uses the Tokscale API. Returns data from the user's profile including all-time stats. No API key required. Cached 10 minutes.
Use these sections when you need the exact URL shape or a focused example for a specific badge type.
This section covers the tokscale/active-days badge endpoint.
Show how many days the user had at least one AI interaction.
Path Parameters
<picture><source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/tokscale/active-days/junhoyeo.svg?mode=dark"><img alt="badge" src="https://shieldcn.dev/tokscale/active-days/junhoyeo.svg?mode=light"></picture>
/tokscale/active-days/{username}.svgDefault — total days with AI activity
<picture><source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/tokscale/active-days/junhoyeo.svg?mode=dark"><img alt="tokscale active days" src="https://shieldcn.dev/tokscale/active-days/junhoyeo.svg?mode=light"></picture>Branded — Tokscale blue background
This section covers the tokscale/cost badge endpoint.
Show the estimated total cost of AI token usage based on LiteLLM pricing data.
Path Parameters
<picture><source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/tokscale/cost/junhoyeo.svg?mode=dark"><img alt="badge" src="https://shieldcn.dev/tokscale/cost/junhoyeo.svg?mode=light"></picture>
/tokscale/cost/{username}.svgDefault — estimated total cost
<picture><source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/tokscale/cost/junhoyeo.svg?mode=dark"><img alt="tokscale cost" src="https://shieldcn.dev/tokscale/cost/junhoyeo.svg?mode=light"></picture>Branded — Tokscale blue background
This section covers the tokscale/rank badge endpoint.
Show the user's position on the Tokscale global leaderboard.
Path Parameters
<picture><source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/tokscale/rank/junhoyeo.svg?mode=dark"><img alt="badge" src="https://shieldcn.dev/tokscale/rank/junhoyeo.svg?mode=light"></picture>
/tokscale/rank/{username}.svgDefault — global leaderboard position
<picture><source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/tokscale/rank/junhoyeo.svg?mode=dark"><img alt="tokscale rank" src="https://shieldcn.dev/tokscale/rank/junhoyeo.svg?mode=light"></picture>Branded — Tokscale blue background
This section covers the tokscale/tokens badge endpoint.
Show the total number of tokens consumed across all AI coding agents.
Path Parameters
<picture><source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/tokscale/tokens/junhoyeo.svg?mode=dark"><img alt="badge" src="https://shieldcn.dev/tokscale/tokens/junhoyeo.svg?mode=light"></picture>
/tokscale/tokens/{username}.svg/tokscale/{username}.svgBoth formats return the same badge. The default endpoint shows token count.
Default — total token consumption
<picture><source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/tokscale/tokens/junhoyeo.svg?mode=dark"><img alt="tokscale tokens" src="https://shieldcn.dev/tokscale/tokens/junhoyeo.svg?mode=light"></picture>Branded — Tokscale blue background
