Skip to content

jerhadf/token-counter

Repository files navigation

Anthropic Token Counter

https://anthropic-token-counter.vercel.app/

A quick, simple token counting interface for Anthropic's API. This tool helps developers accurately count tokens for their Claude requests.

Uses Anthropic's official token counting API (https://docs.anthropic.com/en/docs/build-with-claude/token-counting).

Getting Started

  1. Clone the repository:
git clone https://github.com/jerhadf/token-counter.git
cd token-counter
  1. Install dependencies:
pnpm install
  1. Create a .env.local file in the root directory and add your Anthropic API key:
ANTHROPIC_API_KEY=your_api_key_here
  1. Run the development server:
pnpm dev
  1. Open http://localhost:3000 to view the counter.

Tech Stack