One change
Messages
api/beta/messages
Nearest release: v2.1.247, published under an hour 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.
api/beta/messages Changed · +206 / -44 lines
This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.
from line 18
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 38 more` - `"message-batches-2024-09-24"`
from line 88
- `"mid-conversation-tool-changes-2026-07-01"` + - `"compact-2026-01-12"` + + - `"computer-use-2025-11-24"` + + - `"mcp-tunnels-2026-06-22"` + + - `"structured-outputs-2025-11-13"` + + - `"task-budgets-2026-03-13"` + + - `"thinking-display-updates-2026-08-18"` + + - `"ce-user-management-2026-07-13"` + - `"anthropic-user-profile-id": optional string` The user profile ID to attribute this request to. Use when acting on behalf of a party other than your organization. Requires the `user-profiles` beta header.
from line 1782
- `type: "enabled"` - - `display: optional "summarized" or "omitted" or null` + - `display: optional "summarized" or "omitted" or "updates" or null` Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. Defaults to `summarized`.
from line 1790
- `"omitted"` + - `"updates"` + - `BetaThinkingConfigDisabled object` - `type: "disabled"`
from line 1800
- `type: "adaptive"` - - `display: optional "summarized" or "omitted" or null` + - `display: optional "summarized" or "omitted" or "updates" or null` Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. Defaults to `summarized`.
from line 1808
- `"omitted"` + - `"updates"` + - `Default = "default"` - `inference_geo: optional string or null`
from line 5320
Per-iteration token usage breakdown. - Each entry represents one sampling iteration, with its own input/output token counts and cache statistics. This allows you to: + Each entry represents one sampling iteration, with its own input/output token counts and cache statistics, discriminated by `type`. For `message` entries (model sampling iterations, such as the turns of a server-side tool use loop), this allows you to: - Determine which iterations exceeded long context thresholds (>=200k tokens) - - Calculate the true context window size from the last iteration + - Calculate the context window size from the last `message` entry - Understand token accumulation across server-side tool use loops + A `compaction` entry reports the token usage of the compaction operation itself — the server-side request that summarizes the context being closed — NOT the size of the context that was compacted away, and its token counts can be much smaller than that closed context (for example, a compaction that closes a ~200k-token context can report only a few thousand tokens). Do not derive the context window size from a `compaction` entry, even when it is the last entry. A `compaction` entry's tokens are not included in the top-level `usage` fields. When an input-token trigger is in effect (the default — 150,000 tokens unless configured otherwise), each `compaction` entry closes a context that had reached at least that threshold, though the context can exceed it by the final iteration's output and tool results. + - `BetaMessageIterationUsage object` Token usage for a sampling iteration.
from line 5637
Per-iteration token usage breakdown. - Each entry represents one sampling iteration, with its own input/output token counts and cache statistics. This allows you to: + Each entry represents one sampling iteration, with its own input/output token counts and cache statistics, discriminated by `type`. For `message` entries (model sampling iterations, such as the turns of a server-side tool use loop), this allows you to: - Determine which iterations exceeded long context thresholds (>=200k tokens) - - Calculate the true context window size from the last iteration + - Calculate the context window size from the last `message` entry - Understand token accumulation across server-side tool use loops + A `compaction` entry reports the token usage of the compaction operation itself — the server-side request that summarizes the context being closed — NOT the size of the context that was compacted away, and its token counts can be much smaller than that closed context (for example, a compaction that closes a ~200k-token context can report only a few thousand tokens). Do not derive the context window size from a `compaction` entry, even when it is the last entry. A `compaction` entry's tokens are not included in the top-level `usage` fields. When an input-token trigger is in effect (the default — 150,000 tokens unless configured otherwise), each `compaction` entry closes a context that had reached at least that threshold, though the context can exceed it by the final iteration's output and tool results. + - `output_tokens: number` The cumulative number of output tokens which were used.
from line 5991
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 38 more` - `"message-batches-2024-09-24"`
from line 6061
- `"mid-conversation-tool-changes-2026-07-01"` + - `"compact-2026-01-12"` + + - `"computer-use-2025-11-24"` + + - `"mcp-tunnels-2026-06-22"` + + - `"structured-outputs-2025-11-13"` + + - `"task-budgets-2026-03-13"` + + - `"thinking-display-updates-2026-08-18"` + + - `"ce-user-management-2026-07-13"` + - `"anthropic-user-profile-id": optional string` The user profile ID to attribute this request to. Use when acting on behalf of a party other than your organization. Requires the `user-profiles` beta header.
from line 7679
- `type: "enabled"` - - `display: optional "summarized" or "omitted" or null` + - `display: optional "summarized" or "omitted" or "updates" or null` Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. Defaults to `summarized`.
from line 7687
- `"omitted"` + - `"updates"` + - `BetaThinkingConfigDisabled object` - `type: "disabled"`
from line 7697
- `type: "adaptive"` - - `display: optional "summarized" or "omitted" or null` + - `display: optional "summarized" or "omitted" or "updates" or null` Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. Defaults to `summarized`.
from line 7705
- `"omitted"` + - `"updates"` + - `tool_choice: optional BetaToolChoice` How the model should use the provided tools. The model can use a specific tool, any available tool, decide by itself, or not use tools at all.
from line 8385
- `enabled: optional boolean or null` - Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. - - - `screenshot: optional BetaBrowserScreenshotConfig or null` - - `screenshot`'s config overrides. - - - `defer_loading: optional boolean or null` - - Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - - `enabled: optional boolean or null` - - Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. - - - `scroll: optional BetaBrowserScrollConfig or null` - - `scroll`'s config overrides. - - - `defer_loading: optional boolean or null` - - Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - - `enabled: optional boolean or null` - - Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. - - - `scroll_to: optional BetaBrowserScrollToConfig or null` - - `scroll_to`'s config overrides. - - - `defer_loading: optional boolean or null` - - Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - - `enabled: optional boolean or null` - - Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. - - - `switch_tab: optional BetaBrowserSwitchTabConfig or null` - - `switch_tab`'s config overrides. - - - `defer_loading: optional boolean or null` - - Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - - `enabled: optional boolean or null` - - Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. - - - `triple_click: optional BetaBrowserTripleClickConfig or null` - - `triple_click`'s config overrides. - - - `defer_loading: optional boolean or null` - - Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - - `enabled: optional boolean or null` - - Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enab + Whether this member is offered to the model. Default is per member, per the