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
Tokens (branded)
cost
Cost
rank
Rank (branded)
active days
Active days
stats
Global stats

Available badges

BadgeEndpointDescription
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/statsGlobal user count

The default endpoint /tokscale/{username} returns the token count.

Quick examples

![tokens](https://shieldcn.dev/tokscale/tokens/junhoyeo.svg)
![cost](https://shieldcn.dev/tokscale/cost/junhoyeo.svg?variant=branded)
![rank](https://shieldcn.dev/tokscale/rank/junhoyeo.svg)
![active days](https://shieldcn.dev/tokscale/active-days/junhoyeo.svg)

Finding your username

Your Tokscale username is your GitHub username. To appear on the leaderboard:

  1. Install the CLI: bunx tokscale
  2. Login: bunx tokscale login
  3. 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.

Endpoint details

Use these sections when you need the exact URL shape or a focused example for a specific badge type.

Tokscale Active Days

This section covers the tokscale/active-days badge endpoint.

Show how many days the user had at least one AI interaction.

GET/tokscale/active-days/:username.svg

Path Parameters

required
![badge](https://shieldcn.dev/tokscale/active-days/junhoyeo.png)
badge preview

URL format

/tokscale/active-days/{username}.svg

Examples

active days
Default variant
active days branded
Branded variant
active days secondary
Secondary variant
active days outline
Outline variant

Copy-paste examples

Default — total days with AI activity

![tokscale active days](https://shieldcn.dev/tokscale/active-days/junhoyeo.svg)

Branded — Tokscale blue background

![tokscale active days](https://shieldcn.dev/tokscale/active-days/junhoyeo.svg?variant=branded)

Tokscale Cost

This section covers the tokscale/cost badge endpoint.

Show the estimated total cost of AI token usage based on LiteLLM pricing data.

GET/tokscale/cost/:username.svg

Path Parameters

required
![badge](https://shieldcn.dev/tokscale/cost/junhoyeo.png)
badge preview

URL format

/tokscale/cost/{username}.svg

Examples

cost
Default variant
cost branded
Branded variant
cost secondary
Secondary variant
cost outline
Outline variant

Copy-paste examples

Default — estimated total cost

![tokscale cost](https://shieldcn.dev/tokscale/cost/junhoyeo.svg)

Branded — Tokscale blue background

![tokscale cost](https://shieldcn.dev/tokscale/cost/junhoyeo.svg?variant=branded)

Tokscale Rank

This section covers the tokscale/rank badge endpoint.

Show the user's position on the Tokscale global leaderboard.

GET/tokscale/rank/:username.svg

Path Parameters

required
![badge](https://shieldcn.dev/tokscale/rank/junhoyeo.png)
badge preview

URL format

/tokscale/rank/{username}.svg

Examples

rank
Default variant
rank branded
Branded variant
rank secondary
Secondary variant
rank outline
Outline variant

Copy-paste examples

Default — global leaderboard position

![tokscale rank](https://shieldcn.dev/tokscale/rank/junhoyeo.svg)

Branded — Tokscale blue background

![tokscale rank](https://shieldcn.dev/tokscale/rank/junhoyeo.svg?variant=branded)

Tokscale Tokens

This section covers the tokscale/tokens badge endpoint.

Show the total number of tokens consumed across all AI coding agents.

GET/tokscale/tokens/:username.svg

Path Parameters

required
![badge](https://shieldcn.dev/tokscale/tokens/junhoyeo.png)
badge preview

URL format

/tokscale/tokens/{username}.svg
/tokscale/{username}.svg

Both formats return the same badge. The default endpoint shows token count.

Examples

tokens
Default variant
tokens branded
Branded variant
tokens secondary
Secondary variant
tokens outline
Outline variant

Copy-paste examples

Default — total token consumption

![tokscale tokens](https://shieldcn.dev/tokscale/tokens/junhoyeo.svg)

Branded — Tokscale blue background

![tokscale tokens](https://shieldcn.dev/tokscale/tokens/junhoyeo.svg?variant=branded)