Messages
Count Tokens
Counts the tokens a message would consume against the chosen model, in the Anthropic Messages format.
POST
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Optional metadata for the request
Name of the provider
Body
application/json
Parameters for counting tokens.
The body is of type any.
Response
Token count returned successfully.