Measure the token cost of a request before sending it. Available on the Anthropic surface.Documentation Index
Fetch the complete documentation index at: https://docs.abliteration.ai/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
/v1/messages (minus max_tokens). Returns:
Example
curl
Notes
- The count reflects your payload only — internal system instructions we add for tool routing are excluded. What you see is what you’d be billed for.
- Tools, system prompts, and image blocks are all included in the count.
- If the upstream count path is unavailable, the API falls back to a local estimator. Counts should still be within a few tokens of the real figure.