GET

/v1/schemas/anthropic/chat/v1%2Fmessages%2Fcount_tokens%3Fbeta%3Dtrue?kind=output

kind outputactivity chathash e46d31c5extracted Jun 11, 2026version current

Response body

2 properties · 2 required · 1 $defs
propertytypedescriptionconstraints
context_management*BetaContextManagementResponseInformation about context management applied to the message.nullable
input_tokens*integerThe total number of tokens across the provided list of messages, system prompt, and tools.

Validate a payload

before you spend tokens
shell
$ curl -X POST https://modelschemas.com/v1/validate \
    -d '{"provider":"anthropic","endpointId":"v1/messages/count_tokens?beta=true","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}