GET

/v1/schemas/anthropic/chat/v1/messages/count_tokens?kind=output

kind outputactivity chathash 42d2fdd2…extracted Jun 11, 2026version current
fieldrecorded source
schemaSource unknown — no source URL recorded.
Source trace
{
  "fetchedAt": 1781168487,
  "extractorVersion": null,
  "verifiedAt": null
}

Response body

1 properties · 1 required · 0 $defs
propertytypedescriptionconstraints
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","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}