Chat Completions

Anthropic Messages Count Tokens

Changed on
post/anthropic/v1/messages/count_tokens

Request

  • Base URL: https://api.deepinfra.com
  • URL: https://api.deepinfra.com/anthropic/v1/messages/count_tokens
  • Auth: HTTP bearer

Headers

x-deepinfra-service-tierstring nullable

Per-request service tier (priority or flex) for clients that cannot set the service_tier body field. The body field wins when both are present; unrecognized values ride the default tier.

xi-api-keystring nullable
x-api-keystring nullable

Request body

modelstring required
messagesobject[] required
tool_choiceobject nullable

Response

Successful Response

unknown required

Changes

    • info

      added the new optional header request parameter x-deepinfra-service-tier

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      the request property default value true was removed

    • info

      request property // list-of-types was widened by adding types null to media type application/json