Follow Discord
Sweep 20 Nov 2026 · 19:55Z Build v2.1.330 547 read Stable v2.1.323 Latest v2.1.330 Next v2.1.330 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

Count tokens in a Message changedapi/beta/messages/count_tokens

Nearest release: v2.1.327, published 2 hours after 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+16added
Lines−0removed
From line 119 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits34to this page, all time

The whole hunk

from line 119, old and new numbered
/
lines
from line 119
119119 
120120 - `"experimental-claude-tag-2026-10-21"`
121121 
122 - `"user-profiles-billing-2026-10-01"`
123 
122124 - `"message-batches-2024-09-24"`
123125 
124126 **Deprecated**: This value is no longer needed. Remove it from your requests.
from line 3608
36063608 The model that will complete your prompt.
36073609 
36083610 See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.
3611 
3612- `billing_policy: optional BetaBillingPolicy or null`
3613 
3614 Declares which organization is billed when this body is sent to `/v1/messages`. Accepted here so that you can count the tokens of the exact body you will send, and otherwise ignored: counting tokens bills nobody, so no user profile is required.
3615 
3616 - `type: "billing_policy"`
3617 
3618 - `bill_to: optional BetaBillTo`
3619 
3620 Who is billed. `self`, the default, bills your organization, as if `billing_policy` were omitted. `user_profile` bills the customer behind the user profile the request names; if that customer has not linked an Anthropic organization to the profile, or has not allowed your organization to bill it, the request is rejected rather than billed to you.
3621 
3622 - `"self"`
3623 
3624 - `"user_profile"`
36093625 
36103626- `cache_control: optional BetaCacheControlEphemeral or null`
36113627 
Feedback