Skip to main content
POST
Count tokens for a message request (Anthropic API compatible).

Authorizations

X-API-Key
string
header
required

Company API key - scoped to a specific company. Generate from the Integrations page in your dashboard.

Body

application/json

Token count request (Anthropic API compatible)

Request body for token counting (Anthropic API compatible)

messages
object[]
required

Array of input messages

model
string

Model ID

system
string

System prompt: string or array of text blocks

tools
object[]

Tool definitions (Anthropic tool format)

Response

Estimated token count

Token count estimate

input_tokens
integer

Estimated input token count