Token Usage Indicator

Token usage indicator is an AI UX pattern that shows how much context or quota a session is consuming—progress toward context limits or plan allowances. Users learn why the model “forgot” or why a run was blocked.

Share

Interactive demo

Token Usage
API Tokens
75,000 / 100,000
25,000 remaining
Today
7,500
This Month
75,000

Overview

The design problem

How might we design token usage indicator so people can trust and act on AI output?

Use this pattern

When this pattern fits

  • Essential for AI-powered applications using API services, developer tools, and platforms where token limits affect functionality and user experience.

Avoid this pattern

When to skip or lighten it

  • Products that fully abstract billing and context with no user-facing limits.
  • Ultra-short interactions where the meter never moves meaningfully.
  • Audiences who find raw token counts confusing (show % of limit instead).

States

State model coming soon

Key UX elements

Key UX elements coming soon

Anti-patterns to avoid

  • Hitting a context limit with no prior warning.

  • Showing tokens without explaining what they mean.

  • Meters that disagree with actual failures.

  • Cluttering every message with precise token math.

How products use it

ProductImplementation
OpenAI PlaygroundToken counts on prompts and completions.
Anthropic ConsoleUsage displays for prompt sizing.
CursorContext and usage cues in the agent UI.
GitHub CopilotQuota and entitlement indicators for plans.

Implementation

Copy this prompt to generate a production-ready implementation in Cursor, Claude Code, Lovable, or any AI coding agent.

Generate a production-ready implementation of the "Token Usage Indicator" AI interface design pattern.

Pattern Definition:

Frequently asked questions

What should a token usage indicator show?

Percent of context or plan used, and a plain-language tip when near the limit (summarize, start new chat, upgrade).

Tokens vs dollars?

Show tokens or % for context management; dollars for billing. Running meters often combine both during agent runs.

Where should it live?

Near the composer or session header—not only on a billing page after failure.

How does this relate to hard budget ceilings?

The indicator informs. Ceilings enforce a stop when spend or usage hits a cap.

Weekly AI UX in your inbox

Weekly AI interface UX notes and resources on Substack, no spam, unsubscribe anytime.

Subscribe on Substack