messages
Count message tokens (Anthropic Messages API)
Returns a provider-agnostic heuristic estimate of the input token count.
post/v1/messages/count_tokens
Request body
Response
OK
Changes
Changed in 3 of the 53 revisions of this API.5
- ○
added the optional property
error/providerto the response with the400statusresponse-optional-property-added
- ○
added the optional property
error/providerto the response with the401statusresponse-optional-property-added
- ○
- ○
added the new optional request property
cache_controlnew-optional-request-property
- ○
added the new optional request property
tools/items/cache_controlnew-optional-request-property
- ○
- ○
endpoint added
endpoint-added
- ○