Anthropic Messages

Count Anthropic Tokens

Count input tokens for an Anthropic-format request without running the model.

post/v3/v1/messages/count_tokens

Request

  • Base URL
    https://api.edenai.run
  • Auth
    HTTP bearer

Request body

modelstring required
toolsobject[] nullable
tool_choiceobject nullable

Response

Successful Response

input_tokensinteger required

Number of input tokens the request would consume.

Changes

No recorded changes to this operation across all 1 revision of this API.