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.
