Count Anthropic Tokens
Anthropic Messages
Count Anthropic Tokens
Count input tokens for an Anthropic-format request without running the model.
POST
Count Anthropic Tokens
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Successful Response
Response body for POST /v1/messages/count_tokens.
Number of input tokens the request would consume.