Skip to main content
POST
Estimate Anthropic Messages-compatible input tokens

Authorizations

Authorization
string
header
required

Org API key as Authorization: Bearer z_sk_...

Body

application/json

Request payload for countAnthropicMessageTokens. Examples use placeholder-safe values and do not include real secrets or private prompt content.

Schema for AnthropicMessagesRequest values returned by or accepted by the Nito gateway.

messages
object[]
required

The messages field on AnthropicMessagesRequest.

Minimum array length: 1

Nested schema within AnthropicMessagesRequest for AnthropicMessagesRequest.messages.items.

Example:
max_tokens
integer

The max_tokens field on AnthropicMessagesRequest.

Example:

12

metadata
object

The metadata field on AnthropicMessagesRequest.

Example:
model
string

The model field on AnthropicMessagesRequest.

Example:

"openai/gpt-5.5"

output_config
object

The output_config field on AnthropicMessagesRequest.

Example:
service_tier
string

The service_tier field on AnthropicMessagesRequest.

Example:

"example"

stream
boolean

The stream field on AnthropicMessagesRequest.

Example:

true

system

The system field on AnthropicMessagesRequest.

Example:

"example"

temperature
number

The temperature field on AnthropicMessagesRequest.

Example:

0.5

thinking
object

The thinking field on AnthropicMessagesRequest.

Example:
tool_choice
object

The tool_choice field on AnthropicMessagesRequest.

tools
object[]

The tools field on AnthropicMessagesRequest.

Nested schema within AnthropicMessagesRequest for AnthropicMessagesRequest.tools.items.

Example:
top_p
number

The top_p field on AnthropicMessagesRequest.

Example:

0.5

Response

OK

Schema for AnthropicCountTokensResponse values returned by or accepted by the Nito gateway.

input_tokens
integer
required

The input_tokens field on AnthropicCountTokensResponse.

Example:

12