Count tokens in a Message changedapi/messages/count_tokens
Nearest release: v2.1.301, published 11 hours before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+10added
Lines−0removed
From line
1,185
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits20to this page, all time
The whole hunk
from line 1185, old and new numbered
/
from line 1185
11851185
11861186 The JSON schema of the format
11871187
1188- `speed: optional "standard" or "fast" or null`
1189
1190 The inference speed mode for this request. `"fast"` enables high output-tokens-per-second inference.
1191
1192 Some models require the `fast-mode-2026-02-01` beta header for any `speed` value. See [fast mode](https://platform.claude.com/docs/en/build-with-claude/fast-mode?sdk_languages=http) for which models.
1193
1194 - `"standard"`
1195
1196 - `"fast"`
1197
11881198- `system: optional string or array of TextBlockParam`
11891199
11901200 System prompt.
No line in this hunk matches that.