# Anthropic Claude Token Counting API

**Canonical:** https://apis.io/apis/anthropic-claude/anthropic-claude-token-counting-api/  
**Provider:** Anthropic Claude — https://apis.io/providers/anthropic-claude/  
**Base URL:** https://api.anthropic.com  
**Documentation:** https://docs.anthropic.com/en/api/messages

Anthropic Claude Token Counting API is one of 4 APIs that [Anthropic Claude](https://apis.io/providers/anthropic-claude/) publishes on the [APIs.io](https://apis.io/) network, described by a machine-readable OpenAPI specification and an AsyncAPI event-driven specification. Tagged areas include Token Counting. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, an API reference, an AsyncAPI specification, and a getting-started guide.

Count tokens for a prospective Messages request.

## Machine-readable artifacts (5)

- **OpenAPI** — https://raw.githubusercontent.com/api-evangelist/anthropic-claude/refs/heads/main/openapi/anthropic-claude-token-counting-api-openapi.yml
- **Documentation** — https://docs.anthropic.com/en/api/messages
- **APIReference** — https://docs.anthropic.com/en/api/getting-started
- **AsyncAPI** — https://raw.githubusercontent.com/api-evangelist/anthropic-claude/refs/heads/main/asyncapi/anthropic-claude-asyncapi.yml
- **GettingStarted** — https://docs.anthropic.com/en/api/getting-started

## Other Anthropic Claude APIs (3)

- [Anthropic Claude Message Batches API](https://apis.io/apis/anthropic-claude/anthropic-claude-message-batches-api/)
- [Anthropic Claude Messages API](https://apis.io/apis/anthropic-claude/anthropic-claude-messages-api/)
- [Anthropic Claude Models API](https://apis.io/apis/anthropic-claude/anthropic-claude-models-api/)

## Tags

Token Counting

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/anthropic-claude/anthropic-claude-token-counting-api/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/anthropic-claude/.
