How Many Tokens?

← Back to counter

API

Status: planned, not yet available

A simple JSON API for programmatic token counting is on the v1.1 roadmap. The free tier on this site will always remain the interactive UI; the API tier will require an API key and have published rate limits.

Planned shape

POST https://howmanytokens.io/api/v1/count
Authorization: Bearer YOUR_KEY
Content-Type: application/json

{
  "text": "your prompt here",
  "models": ["claude-sonnet", "gpt-4o", "gemini-2-5-flash"]
}

Response includes per-model token count, confidence label, and current pricing — same data the UI surfaces, in a format suitable for cost-tracking dashboards and CI checks.

Want early access?

Email munkres.clinton@gmail.com with your use case.

Try the live counter →