Batches changedapi/beta/messages/batches
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.
Recorded here
Lines+112added
Lines−16removed
From line
18
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits30to this page, all time
The whole hunk
from line 18, old and new numbered
/
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
1818
1919 - `string`
2020
21 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
21 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 38 more`
2222
2323 - `"message-batches-2024-09-24"`
2424
from line 88
8888
8989 - `"mid-conversation-tool-changes-2026-07-01"`
9090
91 - `"compact-2026-01-12"`
92
93 - `"computer-use-2025-11-24"`
94
95 - `"mcp-tunnels-2026-06-22"`
96
97 - `"structured-outputs-2025-11-13"`
98
99 - `"task-budgets-2026-03-13"`
100
101 - `"thinking-display-updates-2026-08-18"`
102
103 - `"ce-user-management-2026-07-13"`
104
91105- `"anthropic-user-profile-id": optional string`
92106
93107 The user profile ID to attribute the requests in this batch to. Use when acting on behalf of a party other than your organization. Requires the `user-profiles` beta header. Applies to every request in the batch; an individual request whose `user_profile_id` body field conflicts with this header is errored.
from line 1802
17881802
17891803 - `type: "enabled"`
17901804
1791 - `display: optional "summarized" or "omitted" or null`
1805 - `display: optional "summarized" or "omitted" or "updates" or null`
17921806
17931807 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`.
17941808
from line 1810
17961810
17971811 - `"omitted"`
17981812
1813 - `"updates"`
1814
17991815 - `BetaThinkingConfigDisabled object`
18001816
18011817 - `type: "disabled"`
from line 1820
18041820
18051821 - `type: "adaptive"`
18061822
1807 - `display: optional "summarized" or "omitted" or null`
1823 - `display: optional "summarized" or "omitted" or "updates" or null`
18081824
18091825 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`.
18101826
from line 1828
18121828
18131829 - `"omitted"`
18141830
1831 - `"updates"`
1832
18151833 - `Default = "default"`
18161834
18171835 - `inference_geo: optional string or null`
from line 4105
40874105
40884106 - `string`
40894107
4090 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
4108 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 38 more`
40914109
40924110 - `"message-batches-2024-09-24"`
40934111
from line 4175
41574175
41584176 - `"mid-conversation-tool-changes-2026-07-01"`
41594177
4178 - `"compact-2026-01-12"`
4179
4180 - `"computer-use-2025-11-24"`
4181
4182 - `"mcp-tunnels-2026-06-22"`
4183
4184 - `"structured-outputs-2025-11-13"`
4185
4186 - `"task-budgets-2026-03-13"`
4187
4188 - `"thinking-display-updates-2026-08-18"`
4189
4190 - `"ce-user-management-2026-07-13"`
4191
41604192### Returns
41614193
41624194- `BetaMessageBatch object`
from line 4365
43334365
43344366 - `string`
43354367
4336 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
4368 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 38 more`
43374369
43384370 - `"message-batches-2024-09-24"`
43394371
from line 4435
44034435
44044436 - `"mid-conversation-tool-changes-2026-07-01"`
44054437
4438 - `"compact-2026-01-12"`
4439
4440 - `"computer-use-2025-11-24"`
4441
4442 - `"mcp-tunnels-2026-06-22"`
4443
4444 - `"structured-outputs-2025-11-13"`
4445
4446 - `"task-budgets-2026-03-13"`
4447
4448 - `"thinking-display-updates-2026-08-18"`
4449
4450 - `"ce-user-management-2026-07-13"`
4451
44064452### Returns
44074453
44084454- `data: array of BetaMessageBatch`
from line 4634
45884634
45894635 - `string`
45904636
4591 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
4637 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 38 more`
45924638
45934639 - `"message-batches-2024-09-24"`
45944640
from line 4704
46584704
46594705 - `"mid-conversation-tool-changes-2026-07-01"`
46604706
4707 - `"compact-2026-01-12"`
4708
4709 - `"computer-use-2025-11-24"`
4710
4711 - `"mcp-tunnels-2026-06-22"`
4712
4713 - `"structured-outputs-2025-11-13"`
4714
4715 - `"task-budgets-2026-03-13"`
4716
4717 - `"thinking-display-updates-2026-08-18"`
4718
4719 - `"ce-user-management-2026-07-13"`
4720
46614721### Returns
46624722
46634723- `BetaMessageBatch object`
from line 4885
48254885
48264886 - `string`
48274887
4828 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
4888 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 38 more`
48294889
48304890 - `"message-batches-2024-09-24"`
48314891
from line 4955
48954955
48964956 - `"mid-conversation-tool-changes-2026-07-01"`
48974957
4958 - `"compact-2026-01-12"`
4959
4960 - `"computer-use-2025-11-24"`
4961
4962 - `"mcp-tunnels-2026-06-22"`
4963
4964 - `"structured-outputs-2025-11-13"`
4965
4966 - `"task-budgets-2026-03-13"`
4967
4968 - `"thinking-display-updates-2026-08-18"`
4969
4970 - `"ce-user-management-2026-07-13"`
4971
48984972### Returns
48994973
49004974- `BetaDeletedMessageBatch object`
from line 5028
49545028
49555029 - `string`
49565030
4957 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
5031 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 38 more`
49585032
49595033 - `"message-batches-2024-09-24"`
49605034
from line 5098
50245098
50255099 - `"mid-conversation-tool-changes-2026-07-01"`
50265100
5101 - `"compact-2026-01-12"`
5102
5103 - `"computer-use-2025-11-24"`
5104
5105 - `"mcp-tunnels-2026-06-22"`
5106
5107 - `"structured-outputs-2025-11-13"`
5108
5109 - `"task-budgets-2026-03-13"`
5110
5111 - `"thinking-display-updates-2026-08-18"`
5112
5113 - `"ce-user-management-2026-07-13"`
5114
50275115### Returns
50285116
50295117- `BetaMessageBatchIndividualResponse object`
from line 6547
64596547
64606548 Per-iteration token usage breakdown.
64616549
6462 Each entry represents one sampling iteration, with its own input/output token counts and cache statistics. This allows you to:
6550 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:
64636551
64646552 - Determine which iterations exceeded long context thresholds (>=200k tokens)
6465 - Calculate the true context window size from the last iteration
6553 - Calculate the context window size from the last `message` entry
64666554 - Understand token accumulation across server-side tool use loops
64676555
6556 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.
6557
64686558 - `BetaMessageIterationUsage object`
64696559
64706560 Token usage for a sampling iteration.
from line 8375
82858375
82868376 The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking).
82878377
8288 - `"general_harms"`
8289
8290 The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category.
8291
8292 - `explanation: string or null`
8293
8294 Human-readable explanation of the refusal.
8295
8296 This text is not guaranteed to be stable. `null` when no explanation is available for the category.
8297
8298 - `fallback_credit_token: string or null`
8299
8300 Opaque code that refunds the cache-miss cost when retrying this refused
8301 request on the fallback model. Pass it as `fallback_credit_token` on the
8302 retry request. Expires 5 minutes after the refusal.
8303
8304 The retry is sent either with the same request body (`system`, `messages`,
8305 `tools`, and other render-shaping fields), or with the same body plus one
8306 appended `assistant` message whose content is the partial text (with any
8307 trailing whitespace stripped from the final text block) and paired
8308 server-tool blocks from this refusal — which also authorizes that
8309 appended turn as an assistant-prefill continuation on models that otherwise
8310 disallow prefill. A token minted mid-server-tool-loop whose partial content
8311 was continuable may only be redeemed the second way — if a same-body retry
8312 is rejected with a 400 saying the token must be redeemed by continuing the
8313 partial response, retry the second way instead. Either way: same workspace,
8314 same platform; a mismatch is a 400. Resending a token for an already-warm
8315 prefix is permitted but yields no additional credit.
8316
8317 `null` when the refused model isn't eligible for a fallback credit.
8318
8319 - `fallback_has_prefill_claim: boolean or null`
8320
8321 Whether the accompanying `fallback_credit_token` may be redeemed with the
8322 appended-assistant retry form. Only set when `fallback_credit_token` is
8323 present.
8324
8325 `true`: retry by resending the same request body plus one appended
8326 `assistant` message whose content is this response's `content` with any
8327 trailing whitespace stripped from the final text block and unpaired
8328 `tool_use` blocks omitted (the same appended-turn shape described on
8329 `fallback_credit_token`), with the token attached. `false`: retry by
8330 resending the original request body unchanged, with the token attached —
8331 the appended-assistant form is not available for this refusal (no
8332 continuable partial content, or the reques
8378 -
No line in this hunk matches that.