Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

Create a Message Batch changedapi/messages/batches/create

Nearest release: v2.1.245, published an hour 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+363added
Lines−394removed
From line 1 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits22to this page, all time

# Create a Message Batch ## Headers ## Body parameters ## Returns ## Example ### Response (200) ## Create a Message Batch ### Header Parameters ### Body Parameters ### Returns ### Example #### Response

The whole hunk

from line 1, old and new numbered
/
lines

The two sides of this change are more than 400 edits apart, too far apart to line up, so this is the differ's own diff of it and the words inside a line are not marked.

from line 1
1---
2title: Create a Message Batch
3url: https://platform.claude.com/docs/en/api/messages/batches/create
4---
5 
6## Create a Message Batch
7 
8**post** `/v1/messages/batches`
1# Create a Message Batch
2 
3**POST** `/v1/messages/batches`
94 
105Send a batch of Message creation requests.
116 
from line 8
138 
149Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)
1510 
16### Header Parameters
11## Headers
1712 
1813- `"anthropic-user-profile-id": optional string`
1914 
2015 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.
2116 
22### Body Parameters
23 
24- `requests: array of object { custom_id, params }`
17## Body parameters
18 
19- `requests: array of object`
2520 
2621 List of requests for prompt completion. Each is an individual request to create a Message.
2722 
23 maxItems: 100000, minItems: 1
24 
2825 - `custom_id: string`
2926 
3027 Developer-provided ID created for each request in a Message Batch. Useful for matching results to requests, as results may be given out of request order.
3128 
3229 Must be unique for each request within the Message Batch.
3330 
34 - `params: object { max_tokens, messages, model, 15 more }`
31 maxLength: 64, minLength: 1, pattern: ^[a-zA-Z0-9_-]{1,64}$
32 
33 - `params: object`
3534 
3635 Messages API creation parameters for the individual request.
3736 
from line 45
4645 Set to `0` to populate the [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pre-warming-the-cache) without generating a response.
4746 
4847 Different models have different maximum values for this parameter. See [models](https://platform.claude.com/docs/en/about-claude/models/overview) for details.
48 
49 minimum: 0
4950 
5051 - `messages: array of MessageParam`
5152 
from line 105
104105 
105106 - `array of ContentBlockParam`
106107 
107 - `TextBlockParam object { text, type, cache_control, citations }`
108 - `TextBlockParam object`
108109 
109110 - `text: string`
110111 
112 minLength: 1
113 
111114 - `type: "text"`
112115 
113 - `"text"`
114 
115116 - `cache_control: optional CacheControlEphemeral or null`
116117 
117118 Create a cache control breakpoint at this content block.
118119 
119120 - `type: "ephemeral"`
120 
121 - `"ephemeral"`
122121 
123122 - `ttl: optional "5m" or "1h"`
124123 
from line 136
137136 
138137 - `citations: optional array of TextCitationParam or null`
139138 
140 - `CitationCharLocationParam object { cited_text, document_index, document_title, 3 more }`
139 - `CitationCharLocationParam object`
141140 
142141 - `cited_text: string`
143142 
144143 - `document_index: number`
145144 
145 minimum: 0
146 
146147 - `document_title: string or null`
147148 
149 maxLength: 500, minLength: 1
150 
148151 - `end_char_index: number`
149152 
150153 - `start_char_index: number`
151154 
155 minimum: 0
156 
152157 - `type: "char_location"`
153158 
154 - `"char_location"`
155 
156 - `CitationPageLocationParam object { cited_text, document_index, document_title, 3 more }`
159 - `CitationPageLocationParam object`
157160 
158161 - `cited_text: string`
159162 
160163 - `document_index: number`
161164 
165 minimum: 0
166 
162167 - `document_title: string or null`
163168 
169 maxLength: 500, minLength: 1
170 
164171 - `end_page_number: number`
165172 
166173 - `start_page_number: number`
167174 
175 minimum: 1
176 
168177 - `type: "page_location"`
169178 
170 - `"page_location"`
171 
172 - `CitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }`
179 - `CitationContentBlockLocationParam object`
173180 
174181 - `cited_text: string`
175182 
from line 186
179186 
180187 - `document_index: number`
181188 
189 minimum: 0
190 
182191 - `document_title: string or null`
183192 
193 maxLength: 500, minLength: 1
194 
184195 - `end_block_index: number`
185196 
186197 Exclusive 0-based end index of the cited block range in the source's `content` array.
from line 202
191202 
192203 0-based index of the first cited block in the source's `content` array.
193204 
205 minimum: 0
206 
194207 - `type: "content_block_location"`
195208 
196 - `"content_block_location"`
197 
198 - `CitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }`
209 - `CitationWebSearchResultLocationParam object`
199210 
200211 - `cited_text: string`
201212 
from line 214
203214 
204215 - `title: string or null`
205216 
217 maxLength: 512, minLength: 1
218 
206219 - `type: "web_search_result_location"`
207220 
208 - `"web_search_result_location"`
209 
210221 - `url: string`
211222 
212 - `CitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }`
223 minLength: 1
224 
225 - `CitationSearchResultLocationParam object`
213226 
214227 - `cited_text: string`
215228 
from line 242
229242 
230243 Counted separately from `document_index`; server-side web search results are not included in this count.
231244 
245 minimum: 0
246 
232247 - `source: string`
233248 
234249 - `start_block_index: number`
235250 
236251 0-based index of the first cited block in the source's `content` array.
237252 
253 minimum: 0
254 
238255 - `title: string or null`
239256 
240257 - `type: "search_result_location"`
241258 
242 - `"search_result_location"`
243 
244 - `ImageBlockParam object { source, type, cache_control, transformations }`
259 - `ImageBlockParam object`
245260 
246261 - `source: Base64ImageSource or URLImageSource or FileImageSource`
247262 
248 - `Base64ImageSource object { data, media_type, type }`
263 - `Base64ImageSource object`
249264 
250265 - `data: string`
251266 
267 format: byte
268 
252269 - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"`
253270 
254271 - `"image/jpeg"`
from line 278
261278 
262279 - `type: "base64"`
263280 
264 - `"base64"`
265 
266 - `URLImageSource object { type, url }`
281 - `URLImageSource object`
267282 
268283 - `type: "url"`
269284 
270 - `"url"`
271 
272285 - `url: string`
273286 
274 - `FileImageSource object { file_id, type }`
287 - `FileImageSource object`
275288 
276289 - `file_id: string`
277290 
278291 - `type: "file"`
279292 
280 - `"file"`
281 
282293 - `type: "image"`
283294 
284 - `"image"`
285 
286295 - `cache_control: optional CacheControlEphemeral or null`
287296 
288297 Create a cache control breakpoint at this content block.
from line 308
299308 
300309 - `"error"`
301310 
302 - `DocumentBlockParam object { source, type, cache_control, 3 more }`
311 - `DocumentBlockParam object`
303312 
304313 - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or 2 more`
305314 
306 - `Base64PDFSource object { data, media_type, type }`
315 - `Base64PDFSource object`
307316 
308317 - `data: string`
309318 
319 format: byte
320 
310321 - `media_type: "application/pdf"`
311322 
312 - `"application/pdf"`
313 
314323 - `type: "base64"`
315324 
316 - `"base64"`
317 
318 - `PlainTextSource object { data, media_type, type }`
325 - `PlainTextSource object`
319326 
320327 - `data: string`
321328 
322329 - `media_type: "text/plain"`
323330 
324 - `"text/plain"`
325 
326331 - `type: "text"`
327332 
328 - `"text"`
329 
330 - `ContentBlockSource object { content, type }`
333 - `ContentBlockSource object`
331334 
332335 - `content: string or array of ContentBlockSourceContent`
333336 
from line 338
335338 
336339 - `ContentBlockSourceContent = array of ContentBlockSourceContent`
337340 
338 - `TextBlockParam object { text, type, cache_control, citations }`
339 
340 - `ImageBlockParam object { source, type, cache_control, transformations }`
341 - `TextBlockParam object`
342 
343 - `ImageBlockParam object`
341344 
342345 - `type: "content"`
343346 
344 - `"content"`
345 
346 - `URLPDFSource object { type, url }`
347 - `URLPDFSource object`
347348 
348349 - `type: "url"`
349350 
350 - `"url"`
351 
352351 - `url: string`
353352 
354 - `FileDocumentSource object { file_id, type }`
353 - `FileDocumentSource object`
355354 
356355 - `file_id: string`
357356 
358357 - `type: "file"`
359358 
360 - `"file"`
361 
362359 - `type: "document"`
363360 
364 - `"document"`
365 
366361 - `cache_control: optional CacheControlEphemeral or null`
367362 
368363 Create a cache control breakpoint at this content block.
from line 368
373368 
374369 - `context: optional string or null`
375370 
371 minLength: 1
372 
376373 - `title: optional string or null`
377374 
378 - `SearchResultBlockParam object { content, source, title, 3 more }`
375 maxLength: 500, minLength: 1
376 
377 - `SearchResultBlockParam object`
379378 
380379 - `content: array of TextBlockParam`
381380 
382381 - `text: string`
383382 
383 minLength: 1
384 
384385 - `type: "text"`
385386 
386387 - `cache_control: optional CacheControlEphemeral or null`
from line 396
395396 
396397 - `type: "search_result"`
397398 
398 - `"search_result"`
399 
400399 - `cache_control: optional CacheControlEphemeral or null`
401400 
402401 Create a cache control breakpoint at this content block.
403402 
404403 - `citations: optional CitationsConfigParam`
405404 
406 - `ThinkingBlockParam object { signature, thinking, type }`
405 - `ThinkingBlockParam object`
407406 
408407 - `signature: string`
409408 
from line 416
417416 
418417 - `type: "thinking"`
419418 
420 - `"thinking"`
421 
422 - `RedactedThinkingBlockParam object { data, type }`
419 - `RedactedThinkingBlockParam object`
423420 
424421 - `data: string`
425422 
from line 424
427424 
428425 - `type: "redacted_thinking"`
429426 
430 - `"redacted_thinking"`
431 
432 - `ToolUseBlockParam object { id, input, name, 4 more }`
427 - `ToolUseBlockParam object`
433428 
434429 - `id: string`
435430 
431 pattern: ^[a-zA-Z0-9_-]+$
432 
436433 - `input: map[unknown]`
437434 
438435 - `name: string`
439436 
437 maxLength: 200, minLength: 1
438 
440439 - `type: "tool_use"`
441440 
442 - `"tool_use"`
443 
444441 - `cache_control: optional CacheControlEphemeral or null`
445442 
446443 Create a cache control breakpoint at this content block.
from line 446
449446 
450447 Tool invocation directly from the model.
451448 
452 - `DirectCaller object { type }`
449 - `DirectCaller object`
453450 
454451 Tool invocation directly from the model.
455452 
456453 - `type: "direct"`
457454 
458 - `"direct"`
459 
460 - `ServerToolCaller object { tool_id, type }`
455 - `ServerToolCaller object`
461456 
462457 Tool invocation generated by a server-side tool.
463458 
464459 - `tool_id: string`
465460 
461 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
462 
466463 - `type: "code_execution_20250825"`
467464 
468 - `"code_execution_20250825"`
469 
470 - `ServerToolCaller20260120 object { tool_id, type }`
465 - `ServerToolCaller20260120 object`
471466 
472467 - `tool_id: string`
473468 
469 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
470 
474471 - `type: "code_execution_20260120"`
475472 
476 - `"code_execution_20260120"`
477 
478473 - `toolset_name: optional string or null`
479474 
480475 For a toolset member tool_use, the toolset family this member belongs to.
481476 
482 - `ToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }`
477 maxLength: 64, minLength: 1, pattern: ^[a-zA-Z0-9_-]+$
478 
479 - `ToolResultBlockParam object`
483480 
484481 - `tool_use_id: string`
485482 
483 pattern: ^[a-zA-Z0-9_-]+$
484 
486485 - `type: "tool_result"`
487486 
488 - `"tool_result"`
489 
490487 - `cache_control: optional CacheControlEphemeral or null`
491488 
492489 Create a cache control breakpoint at this content block.
from line 494
497494 
498495 - `array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 3 more`
499496 
500 - `TextBlockParam object { text, type, cache_control, citations }`
501 
502 - `ImageBlockParam object { source, type, cache_control, transformations }`
503 
504 - `SearchResultBlockParam object { content, source, title, 3 more }`
505 
506 - `DocumentBlockParam object { source, type, cache_control, 3 more }`
507 
508 - `ToolReferenceBlockParam object { tool_name, type, cache_control }`
497 - `TextBlockParam object`
498 
499 - `ImageBlockParam object`
500 
501 - `SearchResultBlockParam object`
502 
503 - `DocumentBlockParam object`
504 
505 - `ToolReferenceBlockParam object`
509506 
510507 Tool reference block that can be included in tool_result content.
511508 
512509 - `tool_name: string`
513510 
511 maxLength: 256, minLength: 1, pattern: ^[a-zA-Z0-9_-]{1,256}$
512 
514513 - `type: "tool_reference"`
515514 
516 - `"tool_reference"`
517 
518515 - `cache_control: optional CacheControlEphemeral or null`
519516 
520517 Create a cache control breakpoint at this content block.
521518 
522 - `BrowserStateBlockParam object { tabs, type, cache_control, state_changes }`
519 - `BrowserStateBlockParam object`
523520 
524521 The caller's browser state after a browser toolset member call —
525522 the full inventory of open tabs, which tab is active, and any side
from line 530
533530 
534531 All tabs open in the browser after this call — the full inventory, not a delta. May be empty. Whenever non-empty, exactly one entry carries `active: true`.
535532 
533 maxItems: 100
534 
536535 - `tab_id: string`
537536 
538537 The caller-assigned identifier for this tab, unique within the inventory.
539538 
539 maxLength: 4096, minLength: 1, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
540 
540541 - `title: string`
541542 
542543 The title of the page the tab is showing. May be empty.
543544 
545 maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
546 
544547 - `url: string`
545548 
546549 The URL of the page the tab is showing. May be empty.
547550 
551 maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
552 
548553 - `active: optional boolean`
549554 
550555 Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`.
551556 
552557 - `type: "browser_state"`
553558 
554 - `"browser_state"`
555 
556559 - `cache_control: optional CacheControlEphemeral or null`
557560 
558561 Create a cache control breakpoint at this content block.
from line 564
561564 
562565 Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list.
563566 
564 - `BrowserStateChangeTabOpened object { tab_id, type }`
567 maxItems: 200, minItems: 1
568 
569 - `BrowserStateChangeTabOpened object`
565570 
566571 A tab this call's execution opened that remains open at its end —
567572 the creation delta of the `tabs` inventory, not an event log.
from line 580
575580 
576581 The `tab_id` of the opened tab, present in `tabs`.
577582 
583 maxLength: 4096, minLength: 1, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
584 
578585 - `type: "tab_opened"`
579586 
580 - `"tab_opened"`
581 
582 - `BrowserStateChangeDownloadStarted object { download_id, type, url }`
587 - `BrowserStateChangeDownloadStarted object`
583588 
584589 A file download that started during this call.
585590 
from line 592
587592 
588593 The caller-assigned identifier for this download, stable across the state changes reporting it.
589594 
595 maxLength: 4096, minLength: 1, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
596 
590597 - `type: "download_started"`
591598 
592 - `"download_started"`
593 
594599 - `url: string`
595600 
596601 The final post-redirect URL the download was served from.
597602 
598 - `BrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }`
603 maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
604 
605 - `BrowserStateChangeDownloadCompleted object`
599606 
600607 A file download that finished during this call, reported with the
601608 same `download_id` as its `download_started` — or without a prior
from line 613
606613 
607614 The caller-assigned identifier for this download, stable across the state changes reporting it.
608615 
616 maxLength: 4096, minLength: 1, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
617 
609618 - `type: "download_completed"`
610619 
611 - `"download_completed"`
612 
613620 - `url: string`
614621 
615622 The final post-redirect URL the download was served from.
616623 
624 maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
625 
617626 - `path: optional string or null`
618627 
619628 Where the executor saved the file, on the executor's filesystem. Only included when another tool in the same environment can read the file at that path.
620629 
630 pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$, maxLength: 4096
631 
621632 - `size_bytes: optional number or null`
622633 
623634 The completed download's size.
624635 
625 - `BrowserStateChangeDownloadFailed object { download_id, type, url, error }`
636 minimum: 0
637 
638 - `BrowserStateChangeDownloadFailed object`
626639 
627640 A file download that failed — or was cancelled — during this call.
628641 
from line 643
630643 
631644 The caller-assigned identifier for this download, stable across the state changes reporting it.
632645 
646 maxLength: 4096, minLength: 1, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
647 
633648 - `type: "download_failed"`
634649 
635 - `"download_failed"`
636 
637650 - `url: string`
638651 
639652 The final post-redirect URL the download was served from.
640653 
654 maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
655 
641656 - `error: optional string or null`
642657 
643658 The failure or cancellation detail, when known.
644659 
660 pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$, maxLength: 4096
661 
645662 - `is_error: optional boolean`
646663 
647664 - `toolset_name: optional string or null`
648665 
649666 For a toolset member tool_result, the toolset family of the paired tool_use.
650667 
651 - `ServerToolUseBlockParam object { id, input, name, 3 more }`
668 maxLength: 64, minLength: 1, pattern: ^[a-zA-Z0-9_-]+$
669 
670 - `ServerToolUseBlockParam object`
652671 
653672 - `id: string`
654673 
674 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
675 
655676 - `input: map[unknown]`
656677 
657678 - `name: "web_search" or "web_fetch" or "code_execution" or 4 more`
from line 693
672693 
673694 - `type: "server_tool_use"`
674695 
675 - `"server_tool_use"`
676 
677696 - `cache_control: optional CacheControlEphemeral or null`
678697 
679698 Create a cache control breakpoint at this content block.
from line 701
682701 
683702 Tool invocation directly from the model.
684703 
685 - `DirectCaller object { type }`
704 - `DirectCaller object`
686705 
687706 Tool invocation directly from the model.
688707 
689 - `ServerToolCaller object { tool_id, type }`
708 - `ServerToolCaller object`
690709 
691710 Tool invocation generated by a server-side tool.
692711 
693 - `ServerToolCaller20260120 object { tool_id, type }`
694 
695 - `WebSearchToolResultBlockParam object { content, tool_use_id, type, 2 more }`
712 - `ServerToolCaller20260120 object`
713 
714 - `WebSearchToolResultBlockParam object`
696715 
697716 - `content: WebSearchToolResultBlockParamContent`
698717 
from line 723
704723 
705724 - `type: "web_search_result"`
706725 
707 - `"web_search_result"`
708 
709726 - `url: string`
710727 
711728 - `page_age: optional string or null`
712729 
713 - `WebSearchToolRequestError object { error_code, type }`
730 - `WebSearchToolRequestError object`
714731 
715732 - `error_code: WebSearchToolResultErrorCode`
716733 
from line 745
728745 
729746 - `type: "web_search_tool_result_error"`
730747 
731 - `"web_search_tool_result_error"`
732 
733748 - `tool_use_id: string`
734749 
750 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
751 
735752 - `type: "web_search_tool_result"`
736753 
737 - `"web_search_tool_result"`
738 
739754 - `cache_control: optional CacheControlEphemeral or null`
740755 
741756 Create a cache control breakpoint at this content block.
from line 759
744759 
745760 Tool invocation directly from the model.
746761 
747 - `DirectCaller object { type }`
762 - `DirectCaller object`
748763 
749764 Tool invocation directly from the model.
750765 
751 - `ServerToolCaller object { tool_id, type }`
766 - `ServerToolCaller object`
752767 
753768 Tool invocation generated by a server-side tool.
754769 
755 - `ServerToolCaller20260120 object { tool_id, type }`
756 
757 - `WebFetchToolResultBlockParam object { content, tool_use_id, type, 2 more }`
770 - `ServerToolCaller20260120 object`
771 
772 - `WebFetchToolResultBlockParam object`
758773 
759774 - `content: WebFetchToolResultErrorBlockParam or WebFetchBlockParam`
760775 
761 - `WebFetchToolResultErrorBlockParam object { error_code, type }`
776 - `WebFetchToolResultErrorBlockParam object`
762777 
763778 - `error_code: WebFetchToolResultErrorCode`
764779 
from line 797
782797 
783798 - `type: "web_fetch_tool_result_error"`
784799 
785 - `"web_fetch_tool_result_error"`
786 
787 - `WebFetchBlockParam object { content, type, url, retrieved_at }`
800 - `WebFetchBlockParam object`
788801 
789802 - `content: DocumentBlockParam`
790803 
791804 - `type: "web_fetch_result"`
792805 
793 - `"web_fetch_result"`
794 
795806 - `url: string`
796807 
797808 Fetched content URL
from line 813
802813 
803814 - `tool_use_id: string`
804815 
816 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
817 
805818 - `type: "web_fetch_tool_result"`
806819 
807 - `"web_fetch_tool_result"`
808 
809820 - `cache_control: optional CacheControlEphemeral or null`
810821 
811822 Create a cache control breakpoint at this content block.
from line 825
814825 
815826 Tool invocation directly from the model.
816827 
817 - `DirectCaller object { type }`
828 - `DirectCaller object`
818829 
819830 Tool invocation directly from the model.
820831 
821 - `ServerToolCaller object { tool_id, type }`
832 - `ServerToolCaller object`
822833 
823834 Tool invocation generated by a server-side tool.
824835 
825 - `ServerToolCaller20260120 object { tool_id, type }`
826 
827 - `CodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }`
836 - `ServerToolCaller20260120 object`
837 
838 - `CodeExecutionToolResultBlockParam object`
828839 
829840 - `content: CodeExecutionToolResultBlockParamContent`
830841 
831842 Code execution result with encrypted stdout for PFC + web_search results.
832843 
833 - `CodeExecutionToolResultErrorParam object { error_code, type }`
844 - `CodeExecutionToolResultErrorParam object`
834845 
835846 - `error_code: CodeExecutionToolResultErrorCode`
836847 
from line 855
844855 
845856 - `type: "code_execution_tool_result_error"`
846857 
847 - `"code_execution_tool_result_error"`
848 
849 - `CodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }`
858 - `CodeExecutionResultBlockParam object`
850859 
851860 - `content: array of CodeExecutionOutputBlockParam`
852861 
from line 863
854863 
855864 - `type: "code_execution_output"`
856865 
857 - `"code_execution_output"`
858 
859866 - `return_code: number`
860867 
861868 - `stderr: string`
from line 871
864871 
865872 - `type: "code_execution_result"`
866873 
867 - `"code_execution_result"`
868 
869 - `EncryptedCodeExecutionResultBlockParam object { content, encrypted_stdout, return_code, 2 more }`
874 - `EncryptedCodeExecutionResultBlockParam object`
870875 
871876 Code execution result with encrypted stdout for PFC + web_search results.
872877 
from line 889
884889 
885890 - `type: "encrypted_code_execution_result"`
886891 
887 - `"encrypted_code_execution_result"`
888 
889892 - `tool_use_id: string`
890893 
894 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
895 
891896 - `type: "code_execution_tool_result"`
892897 
893 - `"code_execution_tool_result"`
894 
895898 - `cache_control: optional CacheControlEphemeral or null`
896899 
897900 Create a cache control breakpoint at this content block.
898901 
899 - `BashCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }`
902 - `BashCodeExecutionToolResultBlockParam object`
900903 
901904 - `content: BashCodeExecutionToolResultErrorParam or BashCodeExecutionResultBlockParam`
902905 
903 - `BashCodeExecutionToolResultErrorParam object { error_code, type }`
906 - `BashCodeExecutionToolResultErrorParam object`
904907 
905908 - `error_code: BashCodeExecutionToolResultErrorCode`
906909 
from line 919
916919 
917920 - `type: "bash_code_execution_tool_result_error"`
918921 
919 - `"bash_code_execution_tool_result_error"`
920 
921 - `BashCodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }`
922 - `BashCodeExecutionResultBlockParam object`
922923 
923924 - `content: array of BashCodeExecutionOutputBlockParam`
924925 
from line 927
926927 
927928 - `type: "bash_code_execution_output"`
928929 
929 - `"bash_code_execution_output"`
930 
931930 - `return_code: number`
932931 
933932 - `stderr: string`
from line 935
936935 
937936 - `type: "bash_code_execution_result"`
938937 
939 - `"bash_code_execution_result"`
940 
941938 - `tool_use_id: string`
942939 
940 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
941 
943942 - `type: "bash_code_execution_tool_result"`
944943 
945 - `"bash_code_execution_tool_result"`
946 
947944 - `cache_control: optional CacheControlEphemeral or null`
948945 
949946 Create a cache control breakpoint at this content block.
950947 
951 - `TextEditorCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }`
948 - `TextEditorCodeExecutionToolResultBlockParam object`
952949 
953950 - `content: TextEditorCodeExecutionToolResultErrorParam or TextEditorCodeExecutionViewResultBlockParam or TextEditorCodeExecutionCreateResultBlockParam or TextEditorCodeExecutionStrReplaceResultBlockParam`
954951 
955 - `TextEditorCodeExecutionToolResultErrorParam object { error_code, type, error_message }`
952 - `TextEditorCodeExecutionToolResultErrorParam object`
956953 
957954 - `error_code: TextEditorCodeExecutionToolResultErrorCode`
958955 
from line 965
968965 
969966 - `type: "text_editor_code_execution_tool_result_error"`
970967 
971 - `"text_editor_code_execution_tool_result_error"`
972 
973968 - `error_message: optional string or null`
974969 
975 - `TextEditorCodeExecutionViewResultBlockParam object { content, file_type, type, 3 more }`
970 - `TextEditorCodeExecutionViewResultBlockParam object`
976971 
977972 - `content: string`
978973 
from line 981
986981 
987982 - `type: "text_editor_code_execution_view_result"`
988983 
989 - `"text_editor_code_execution_view_result"`
990 
991984 - `num_lines: optional number or null`
992985 
993986 - `start_line: optional number or null`
994987 
995988 - `total_lines: optional number or null`
996989 
997 - `TextEditorCodeExecutionCreateResultBlockParam object { is_file_update, type }`
990 - `TextEditorCodeExecutionCreateResultBlockParam object`
998991 
999992 - `is_file_update: boolean`
1000993 
1001994 - `type: "text_editor_code_execution_create_result"`
1002995 
1003 - `"text_editor_code_execution_create_result"`
1004 
1005 - `TextEditorCodeExecutionStrReplaceResultBlockParam object { type, lines, new_lines, 3 more }`
996 - `TextEditorCodeExecutionStrReplaceResultBlockParam object`
1006997 
1007998 - `type: "text_editor_code_execution_str_replace_result"`
1008999 
1009 - `"text_editor_code_execution_str_replace_result"`
1010 
10111000 - `lines: optional array of string or null`
10121001 
10131002 - `new_lines: optional number or null`
from line 1009
10201009 
10211010 - `tool_use_id: string`
10221011 
1012 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
1013 
10231014 - `type: "text_editor_code_execution_tool_result"`
10241015 
1025 - `"text_editor_code_execution_tool_result"`
1026 
10271016 - `cache_control: optional CacheControlEphemeral or null`
10281017 
10291018 Create a cache control breakpoint at this content block.
10301019 
1031 - `ToolSearchToolResultBlockParam object { content, tool_use_id, type, cache_control }`
1020 - `ToolSearchToolResultBlockParam object`
10321021 
10331022 - `content: ToolSearchToolResultErrorParam or ToolSearchToolSearchResultBlockParam`
10341023 
1035 - `ToolSearchToolResultErrorParam object { error_code, type, error_message }`
1024 - `ToolSearchToolResultErrorParam object`
10361025 
10371026 - `error_code: ToolSearchToolResultErrorCode`
10381027 
from line 1035
10461035 
10471036 - `type: "tool_search_tool_result_error"`
10481037 
1049 - `"tool_search_tool_result_error"`
1050 
10511038 - `error_message: optional string or null`
10521039 
1053 - `ToolSearchToolSearchResultBlockParam object { tool_references, type }`
1040 - `ToolSearchToolSearchResultBlockParam object`
10541041 
10551042 - `tool_references: array of ToolReferenceBlockParam`
10561043 
10571044 - `tool_name: string`
10581045 
1046 maxLength: 256, minLength: 1, pattern: ^[a-zA-Z0-9_-]{1,256}$
1047 
10591048 - `type: "tool_reference"`
10601049 
10611050 - `cache_control: optional CacheControlEphemeral or null`
from line 1053
10641053 
10651054 - `type: "tool_search_tool_search_result"`
10661055 
1067 - `"tool_search_tool_search_result"`
1068 
10691056 - `tool_use_id: string`
10701057 
1058 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
1059 
10711060 - `type: "tool_search_tool_result"`
10721061 
1073 - `"tool_search_tool_result"`
1074 
10751062 - `cache_control: optional CacheControlEphemeral or null`
10761063 
10771064 Create a cache control breakpoint at this content block.
10781065 
1079 - `ContainerUploadBlockParam object { file_id, type, cache_control }`
1066 - `ContainerUploadBlockParam object`
10801067 
10811068 A content block that represents a file to be uploaded to the container
10821069 Files uploaded via this block will be available in the container's input directory.
from line 1072
10851072 
10861073 - `type: "container_upload"`
10871074 
1088 - `"container_upload"`
1089 
10901075 - `cache_control: optional CacheControlEphemeral or null`
10911076 
10921077 Create a cache control breakpoint at this content block.
from line 1166
11811166 
11821167 Container identifier for reuse across requests.
11831168 
1184 - `ContainerParams object { id, skills }`
1169 - `ContainerParams object`
11851170 
11861171 Container parameters with skills to be loaded.
11871172 
from line 1178
11931178 
11941179 List of skills to load in the container
11951180 
1181 maxItems: 20
1182 
11961183 - `skill_id: string`
11971184 
11981185 Skill ID
11991186 
1187 maxLength: 64, minLength: 1
1188 
12001189 - `type: "anthropic" or "custom"`
12011190 
12021191 Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
from line 1198
12091198 
12101199 Skill version or 'latest' for most recent version
12111200 
1201 maxLength: 64, minLength: 1
1202 
12121203 - `string`
12131204 
12141205 - `inference_geo: optional string or null`
from line 1216
12251216 
12261217 This should be a uuid, hash value, or other opaque identifier. Anthropic may use this id to help detect abuse. Do not include any identifying information such as name, email address, or phone number.
12271218 
1219 maxLength: 512
1220 
12281221 - `output_config: optional OutputConfig`
12291222 
12301223 Configuration options for the model's output, such as the output format.
from line 1246
12531246 
12541247 - `type: "json_schema"`
12551248 
1256 - `"json_schema"`
1257 
12581249 - `service_tier: optional "auto" or "standard_only"`
12591250 
12601251 Determines whether to use priority capacity (if available) or standard capacity for this request.
from line 1282
12911282 
12921283 - `text: string`
12931284 
1285 minLength: 1
1286 
12941287 - `type: "text"`
12951288 
12961289 - `cache_control: optional CacheControlEphemeral or null`
from line 1292
12991292 
13001293 - `citations: optional array of TextCitationParam or null`
13011294 
1302 - `temperature: optional number`
1303 
1304 Amount of randomness injected into the response.
1305 
1306 Defaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0` for analytical / multiple choice, and closer to `1.0` for creative and generative tasks.
1307 
1308 Note that even with `temperature` of `0.0`, the results will not be fully deterministic.
1309 
13101295 - `thinking: optional ThinkingConfigParam`
13111296 
13121297 Configuration for enabling Claude's extended thinking.
from line 1300
13151300 
13161301 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details.
13171302 
1318 - `ThinkingConfigEnabled object { budget_tokens, type, display }`
1303 - `ThinkingConfigEnabled object`
13191304 
13201305 - `budget_tokens: number`
13211306 
from line 1310
13251310 
13261311 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details.
13271312 
1313 minimum: 1024
1314 
13281315 - `type: "enabled"`
13291316 
1330 - `"enabled"`
1331 
13321317 - `display: optional "summarized" or "omitted" or null`
13331318 
13341319 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 1322
13371322 
13381323 - `"omitted"`
13391324 
1340 - `ThinkingConfigDisabled object { type }`
1325 - `ThinkingConfigDisabled object`
13411326 
13421327 - `type: "disabled"`
13431328 
1344 - `"disabled"`
1345 
1346 - `ThinkingConfigAdaptive object { type, display }`
1329 - `ThinkingConfigAdaptive object`
13471330 
13481331 - `type: "adaptive"`
13491332 
1350 - `"adaptive"`
1351 
13521333 - `display: optional "summarized" or "omitted" or null`
13531334 
13541335 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 1342
13611342 
13621343 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.
13631344 
1364 - `ToolChoiceAuto object { type, disable_parallel_tool_use }`
1345 - `ToolChoiceAuto object`
13651346 
13661347 The model will automatically decide whether to use tools.
13671348 
13681349 - `type: "auto"`
13691350 
1370 - `"auto"`
1371 
13721351 - `disable_parallel_tool_use: optional boolean`
13731352 
13741353 Whether to disable parallel tool use.
13751354 
13761355 Defaults to `false`. If set to `true`, the model will output at most one tool use.
13771356 
1378 - `ToolChoiceAny object { type, disable_parallel_tool_use }`
1357 - `ToolChoiceAny object`
13791358 
13801359 The model will use any available tools.
13811360 
13821361 - `type: "any"`
13831362 
1384 - `"any"`
1385 
13861363 - `disable_parallel_tool_use: optional boolean`
13871364 
13881365 Whether to disable parallel tool use.
13891366 
13901367 Defaults to `false`. If set to `true`, the model will output exactly one tool use.
13911368 
1392 - `ToolChoiceTool object { name, type, disable_parallel_tool_use }`
1369 - `ToolChoiceTool object`
13931370 
13941371 The model will use the specified tool with `tool_choice.name`.
13951372 
from line 1376
13991376 
14001377 - `type: "tool"`
14011378 
1402 - `"tool"`
1403 
14041379 - `disable_parallel_tool_use: optional boolean`
14051380 
14061381 Whether to disable parallel tool use.
14071382 
14081383 Defaults to `false`. If set to `true`, the model will output exactly one tool use.
14091384 
1410 - `ToolChoiceNone object { type }`
1385 - `ToolChoiceNone object`
14111386 
14121387 The model will not be allowed to use tools.
14131388 
14141389 - `type: "none"`
1415 
1416 - `"none"`
14171390 
14181391 - `tools: optional array of ToolUnion`
14191392 
from line 1452
14791452 
14801453 See our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) for more details.
14811454 
1482 - `Tool object { input_schema, name, allowed_callers, 7 more }`
1483 
1484 - `input_schema: object { type, properties, required }`
1455 - `Tool object`
1456 
1457 - `input_schema: object`
14851458 
14861459 [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.
14871460 
from line 1462
14891462 
14901463 - `type: "object"`
14911464 
1492 - `"object"`
1493 
14941465 - `properties: optional map[unknown] or null`
14951466 
14961467 - `required: optional array of string or null`
from line 1472
15011472 
15021473 This is how the tool will be called by the model and in `tool_use` blocks.
15031474 
1475 maxLength: 128, minLength: 1, pattern: ^[a-zA-Z0-9_-]{1,128}$
1476 
15041477 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
15051478 
15061479 - `"direct"`
from line 1510
15371510 
15381511 - `type: optional "custom" or null`
15391512 
1540 - `"custom"`
1541 
1542 - `ToolBash20250124 object { name, type, allowed_callers, 4 more }`
1513 - `ToolBash20250124 object`
15431514 
15441515 - `name: "bash"`
15451516 
from line 1518
15471518 
15481519 This is how the tool will be called by the model and in `tool_use` blocks.
15491520 
1550 - `"bash"`
1551 
15521521 - `type: "bash_20250124"`
15531522 
1554 - `"bash_20250124"`
1555 
15561523 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
15571524 
15581525 - `"direct"`
from line 1544
15771544 
15781545 When true, guarantees schema validation on tool names and inputs
15791546 
1580 - `CodeExecutionTool20250522 object { name, type, allowed_callers, 3 more }`
1547 - `CodeExecutionTool20250522 object`
15811548 
15821549 - `name: "code_execution"`
15831550 
from line 1552
15851552 
15861553 This is how the tool will be called by the model and in `tool_use` blocks.
15871554 
1588 - `"code_execution"`
1589 
15901555 - `type: "code_execution_20250522"`
15911556 
1592 - `"code_execution_20250522"`
1593 
15941557 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
15951558 
15961559 - `"direct"`
from line 1576
16131576 
16141577 When true, guarantees schema validation on tool names and inputs
16151578 
1616 - `CodeExecutionTool20250825 object { name, type, allowed_callers, 3 more }`
1579 - `CodeExecutionTool20250825 object`
16171580 
16181581 - `name: "code_execution"`
16191582 
from line 1584
16211584 
16221585 This is how the tool will be called by the model and in `tool_use` blocks.
16231586 
1624 - `"code_execution"`
1625 
16261587 - `type: "code_execution_20250825"`
16271588 
1589 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
1590 
1591 - `"direct"`
1592 
16281593 - `"code_execution_20250825"`
16291594 
1595 - `"code_execution_20260120"`
1596 
1597 - `"code_execution_20260521"`
1598 
1599 - `cache_control: optional CacheControlEphemeral or null`
1600 
1601 Create a cache control breakpoint at this content block.
1602 
1603 - `defer_loading: optional boolean`
1604 
1605 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
1606 
1607 - `strict: optional boolean`
1608 
1609 When true, guarantees schema validation on tool names and inputs
1610 
1611 - `CodeExecutionTool20260120 object`
1612 
1613 Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint).
1614 
1615 - `name: "code_execution"`
1616 
1617 Name of the tool.
1618 
1619 This is how the tool will be called by the model and in `tool_use` blocks.
1620 
1621 - `type: "code_execution_20260120"`
1622 
16301623 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
16311624 
16321625 - `"direct"`
from line 1642
16491642 
16501643 When true, guarantees schema validation on tool names and inputs
16511644 
1652 - `CodeExecutionTool20260120 object { name, type, allowed_callers, 3 more }`
1653 
1654 Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint).
1645 - `CodeExecutionTool20260521 object`
1646 
1647 Code execution tool with REPL state persistence.
16551648 
16561649 - `name: "code_execution"`
16571650 
from line 1652
16591652 
16601653 This is how the tool will be called by the model and in `tool_use` blocks.
16611654 
1662 - `"code_execution"`
1663 
1664 - `type: "code_execution_20260120"`
1655 - `type: "code_execution_20260521"`
1656 
1657 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
1658 
1659 - `"direct"`
1660 
1661 - `"code_execution_20250825"`
16651662 
16661663 - `"code_execution_20260120"`
16671664 
1668 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
1669 
1670 - `"direct"`
1671 
1672 - `"code_execution_20250825"`
1673 
1674 - `"code_execution_20260120"`
1675 
16761665 - `"code_execution_20260521"`
16771666 
16781667 - `cache_control: optional CacheControlEphemeral or null`
from line 1676
16871676 
16881677 When true, guarantees schema validation on tool names and inputs
16891678 
1690 - `CodeExecutionTool20260521 object { name, type, allowed_callers, 3 more }`
1691 
1692 Code execution tool with REPL state persistence.
1693 
1694 - `name: "code_execution"`
1695 
1696 Name of the tool.
1697 
1698 This is how the tool will be called by the model and in `tool_use` blocks.
1699 
1700 - `"code_execution"`
1701 
1702 - `type: "code_execution_20260521"`
1703 
1704 - `"code_execution_20260521"`
1705 
1706 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
1707 
1708 - `"direct"`
1709 
1710 - `"code_execution_20250825"`
1711 
1712 - `"code_execution_20260120"`
1713 
1714 - `"code_execution_20260521"`
1715 
1716 - `cache_control: optional CacheControlEphemeral or null`
1717 
1718 Create a cache control breakpoint at this content block.
1719 
1720 - `defer_loading: optional boolean`
1721 
1722 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
1723 
1724 - `strict: optional boolean`
1725 
1726 When true, guarantees schema validation on tool names and inputs
1727 
1728 - `BrowserToolset20260801 object { type, allowed_callers, cache_control, configs }`
1679 - `BrowserToolset20260801 object`
17291680 
17301681 The browser toolset: a single `tools[]` entry (carrying no
17311682 `name`) that declares the browser tool family. The model is served
from line 1684
17331684 from its schema.
17341685 
17351686 - `type: "browser_toolset_20260801"`
1736 
1737 - `"browser_toolset_20260801"`
17381687 
17391688 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
17401689 
from line 2080
21312080 
21322081 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.
21332082 
2134 - `MemoryTool20250818 object { name, type, allowed_callers, 4 more }`
2083 - `MemoryTool20250818 object`
21352084 
21362085 - `name: "memory"`
21372086 
from line 2088
21392088 
21402089 This is how the tool will be called by the model and in `tool_use` blocks.
21412090 
2142 - `"memory"`
2143 
21442091 - `type: "memory_20250818"`
21452092 
2146 - `"memory_20250818"`
2147 
21482093 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
21492094 
21502095 - `"direct"`
from line 2114
21692114 
21702115 When true, guarantees schema validation on tool names and inputs
21712116 
2172 - `ComputerToolset20260801 object { type, allowed_callers, cache_control, configs }`
2117 - `ComputerToolset20260801 object`
21732118 
21742119 The computer toolset: a single `tools[]` entry (carrying no
21752120 `name`) that declares the computer tool family. The model is
from line 2127
21822127 
21832128 - `type: "computer_toolset_20260801"`
21842129 
2185 - `"computer_toolset_20260801"`
2186 
21872130 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
21882131 
21892132 - `"direct"`
from line 2354
24112354 
24122355 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.
24132356 
2414 - `ToolTextEditor20250124 object { name, type, allowed_callers, 4 more }`
2357 - `ToolTextEditor20250124 object`
24152358 
24162359 - `name: "str_replace_editor"`
24172360 
from line 2362
24192362 
24202363 This is how the tool will be called by the model and in `tool_use` blocks.
24212364 
2422 - `"str_replace_editor"`
2423 
24242365 - `type: "text_editor_20250124"`
24252366 
2426 - `"text_editor_20250124"`
2427 
24282367 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
24292368 
24302369 - `"direct"`
from line 2388
24492388 
24502389 When true, guarantees schema validation on tool names and inputs
24512390 
2452 - `ToolTextEditor20250429 object { name, type, allowed_callers, 4 more }`
2391 - `ToolTextEditor20250429 object`
24532392 
24542393 - `name: "str_replace_based_edit_tool"`
24552394 
from line 2396
24572396 
24582397 This is how the tool will be called by the model and in `tool_use` blocks.
24592398 
2460 - `"str_replace_based_edit_tool"`
2461 
24622399 - `type: "text_editor_20250429"`
24632400 
2464 - `"text_editor_20250429"`
2465 
24662401 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
24672402 
24682403 - `"direct"`
from line 2422
24872422 
24882423 When true, guarantees schema validation on tool names and inputs
24892424 
2490 - `ToolTextEditor20250728 object { name, type, allowed_callers, 5 more }`
2425 - `ToolTextEditor20250728 object`
24912426 
24922427 - `name: "str_replace_based_edit_tool"`
24932428 
from line 2430
24952430 
24962431 This is how the tool will be called by the model and in `tool_use` blocks.
24972432 
2498 - `"str_replace_based_edit_tool"`
2499 
25002433 - `type: "text_editor_20250728"`
25012434 
2502 - `"text_editor_20250728"`
2503 
25042435 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
25052436 
25062437 - `"direct"`
from line 2456
25252456 
25262457 Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file.
25272458 
2459 minimum: 1
2460 
25282461 - `strict: optional boolean`
25292462 
25302463 When true, guarantees schema validation on tool names and inputs
25312464 
2532 - `WebSearchTool20250305 object { name, type, allowed_callers, 7 more }`
2465 - `WebSearchTool20250305 object`
25332466 
25342467 - `name: "web_search"`
25352468 
from line 2470
25372470 
25382471 This is how the tool will be called by the model and in `tool_use` blocks.
25392472 
2540 - `"web_search"`
2541 
25422473 - `type: "web_search_20250305"`
25432474 
2544 - `"web_search_20250305"`
2545 
25462475 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
25472476 
25482477 - `"direct"`
from line 2502
25732502 
25742503 Maximum number of times the tool can be used in the API request.
25752504 
2505 exclusiveMinimum: 0
2506 
25762507 - `strict: optional boolean`
25772508 
25782509 When true, guarantees schema validation on tool names and inputs
from line 2514
25832514 
25842515 - `type: "approximate"`
25852516 
2586 - `"approximate"`
2587 
25882517 - `city: optional string or null`
25892518 
25902519 The city of the user.
25912520 
2521 maxLength: 255, minLength: 1
2522 
25922523 - `country: optional string or null`
25932524 
25942525 The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user.
25952526 
2527 maxLength: 2, minLength: 2
2528 
25962529 - `region: optional string or null`
25972530 
25982531 The region of the user.
25992532 
2533 maxLength: 255, minLength: 1
2534 
26002535 - `timezone: optional string or null`
26012536 
26022537 The [IANA timezone](https://nodatime.org/TimeZones) of the user.
26032538 
2604 - `WebFetchTool20250910 object { name, type, allowed_callers, 8 more }`
2539 maxLength: 255, minLength: 1
2540 
2541 - `WebFetchTool20250910 object`
26052542 
26062543 - `name: "web_fetch"`
26072544 
from line 2546
26092546 
26102547 This is how the tool will be called by the model and in `tool_use` blocks.
26112548 
2612 - `"web_fetch"`
2613 
26142549 - `type: "web_fetch_20250910"`
26152550 
2616 - `"web_fetch_20250910"`
2617 
26182551 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
26192552 
26202553 - `"direct"`
from line 2582
26492582 
26502583 Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.
26512584 
2585 exclusiveMinimum: 0
2586 
26522587 - `max_uses: optional number or null`
26532588 
26542589 Maximum number of times the tool can be used in the API request.
26552590 
2591 exclusiveMinimum: 0
2592 
26562593 - `strict: optional boolean`
26572594 
26582595 When true, guarantees schema validation on tool names and inputs
26592596 
2660 - `WebSearchTool20260209 object { name, type, allowed_callers, 7 more }`
2597 - `WebSearchTool20260209 object`
26612598 
26622599 - `name: "web_search"`
26632600 
from line 2602
26652602 
26662603 This is how the tool will be called by the model and in `tool_use` blocks.
26672604 
2668 - `"web_search"`
2669 
26702605 - `type: "web_search_20260209"`
26712606 
2672 - `"web_search_20260209"`
2673 
26742607 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
26752608 
26762609 - `"direct"`
from line 2634
27012634 
27022635 Maximum number of times the tool can be used in the API request.
27032636 
2637 exclusiveMinimum: 0
2638 
27042639 - `strict: optional boolean`
27052640 
27062641 When true, guarantees schema validation on tool names and inputs
from line 2644
27092644 
27102645 Parameters for the user's location. Used to provide more relevant search results.
27112646 
2712 - `WebFetchTool20260209 object { name, type, allowed_callers, 8 more }`
2647 - `WebFetchTool20260209 object`
27132648 
27142649 - `name: "web_fetch"`
27152650 
from line 2652
27172652 
27182653 This is how the tool will be called by the model and in `tool_use` blocks.
27192654 
2720 - `"web_fetch"`
2721 
27222655 - `type: "web_fetch_20260209"`
27232656 
2724 - `"web_fetch_20260209"`
2725 
27262657 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
27272658 
27282659 - `"direct"`
from line 2688
27572688 
27582689 Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.
27592690 
2691 exclusiveMinimum: 0
2692 
27602693 - `max_uses: optional number or null`
27612694 
27622695 Maximum number of times the tool can be used in the API request.
27632696 
2697 exclusiveMinimum: 0
2698 
27642699 - `strict: optional boolean`
27652700 
27662701 When true, guarantees schema validation on tool names and inputs
27672702 
2768 - `WebFetchTool20260309 object { name, type, allowed_callers, 9 more }`
2703 - `WebFetchTool20260309 object`
27692704 
27702705 Web fetch tool with use_cache parameter for bypassing cached content.
27712706 
from line 2710
27752710 
27762711 This is how the tool will be called by the model and in `tool_use` blocks.
27772712 
2778 - `"web_fetch"`
2779 
27802713 - `type: "web_fetch_20260309"`
27812714 
2782 - `"web_fetch_20260309"`
2783 
27842715 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
27852716 
27862717 - `"direct"`
from line 2746
28152746 
28162747 Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.
28172748 
2749 exclusiveMinimum: 0
2750 
28182751 - `max_uses: optional number or null`
28192752 
28202753 Maximum number of times the tool can be used in the API request.
28212754 
2755 exclusiveMinimum: 0
2756 
28222757 - `strict: optional boolean`
28232758 
28242759 When true, guarantees schema validation on tool names and inputs
from line 2762
28272762 
28282763 Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.
28292764 
2830 - `WebSearchTool20260318 object { name, type, allowed_callers, 8 more }`
2765 - `WebSearchTool20260318 object`
28312766 
28322767 - `name: "web_search"`
28332768 
from line 2770
28352770 
28362771 This is how the tool will be called by the model and in `tool_use` blocks.
28372772 
2838 - `"web_search"`
2839 
28402773 - `type: "web_search_20260318"`
28412774 
2842 - `"web_search_20260318"`
2843 
28442775 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
28452776 
28462777 - `"direct"`
from line 2802
28712802 
28722803 Maximum number of times the tool can be used in the API request.
28732804 
2805 exclusiveMinimum: 0
2806 
28742807 - `response_inclusion: optional "full" or "excluded"`
28752808 
28762809 How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn.
from line 2820
28872820 
28882821 Parameters for the user's location. Used to provide more relevant search results.
28892822 
2890 - `WebFetchTool20260318 object { name, type, allowed_callers, 10 more }`
2823 - `WebFetchTool20260318 object`
28912824 
28922825 - `name: "web_fetch"`
28932826 
from line 2828
28952828 
28962829 This is how the tool will be called by the model and in `tool_use` blocks.
28972830 
2898 - `"web_fetch"`
2899 
29002831 - `type: "web_fetch_20260318"`
29012832 
2902 - `"web_fetch_20260318"`
2903 
29042833 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
29052834 
29062835 - `"direct"`
from line 2864
29352864 
29362865 Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.
29372866 
2867 exclusiveMinimum: 0
2868 
29382869 - `max_uses: optional number or null`
29392870 
29402871 Maximum number of times the tool can be used in the API request.
29412872 
2873 exclusiveMinimum: 0
2874 
29422875 - `response_inclusion: optional "full" or "excluded"`
29432876 
29442877 How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn.
from line 2888
29552888 
29562889 Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.
29572890 
2958 - `ToolSearchToolBm25_20251119 object { name, type, allowed_callers, 3 more }`
2891 - `ToolSearchToolBm25_20251119 object`
29592892 
29602893 - `name: "tool_search_tool_bm25"`
29612894 
from line 2896
29632896 
29642897 This is how the tool will be called by the model and in `tool_use` blocks.
29652898 
2899 - `type: "tool_search_tool_bm25_20251119" or "tool_search_tool_bm25"`
2900 
2901 - `"tool_search_tool_bm25_20251119"`
2902 
29662903 - `"tool_search_tool_bm25"`
29672904 
2968 - `type: "tool_search_tool_bm25_20251119" or "tool_search_tool_bm25"`
2969 
2970 - `"tool_search_tool_bm25_20251119"`
2971 
2972 - `"tool_search_tool_bm25"`
2973 
29742905 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
29752906 
29762907 - `"direct"`
from line 2924
29932924 
29942925 When true, guarantees schema validation on tool names and inputs
29952926 
2996 - `ToolSearchToolRegex20251119 object { name, type, allowed_callers, 3 more }`
2927 - `ToolSearchToolRegex20251119 object`
29972928 
29982929 - `name: "tool_search_tool_regex"`
29992930 
from line 2932
30012932 
30022933 This is how the tool will be called by the model and in `tool_use` blocks.
30032934 
2935 - `type: "tool_search_tool_regex_20251119" or "tool_search_tool_regex"`
2936 
2937 - `"tool_search_tool_regex_20251119"`
2938 
30042939 - `"tool_search_tool_regex"`
30052940 
3006 - `type: "tool_search_tool_regex_20251119" or "tool_search_tool_regex"`
3007 
3008 - `"tool_search_tool_regex_20251119"`
3009 
3010 - `"tool_search_tool_regex"`
3011 
30122941 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
30132942 
30142943 - `"direct"`
from line 2960
30312960 
30322961 When true, guarantees schema validation on tool names and inputs
30332962 
2963 - `temperature: optional number`
2964 
2965 **Deprecated**: Deprecated. Models released after Claude Opus 4.6 do not support setting temperature. A value of 1.0 of will be accepted for backwards compatibility, all other values will be rejected with a 400 error.
2966 
2967 Amount of randomness injected into the response.
2968 
2969 Defaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0` for analytical / multiple choice, and closer to `1.0` for creative and generative tasks.
2970 
2971 Note that even with `temperature` of `0.0`, the results will not be fully deterministic.
2972 
2973 maximum: 1, minimum: 0
2974 
30342975 - `top_k: optional number`
30352976 
2977 **Deprecated**: Deprecated. Models released after Claude Opus 4.6 do not accept top_k; any value will be rejected with a 400 error.
2978 
30362979 Only sample from the top K options for each subsequent token.
30372980 
30382981 Used to remove "long tail" low probability responses. [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277).
30392982 
30402983 Recommended for advanced use cases only.
30412984 
2985 minimum: 0
2986 
30422987 - `top_p: optional number`
30432988 
2989 **Deprecated**: Deprecated. Models released after Claude Opus 4.6 do not support setting top_p. A value >= 0.99 will be accepted for backwards compatibility, all other values will be rejected with a 400 error.
2990 
30442991 Use nucleus sampling.
30452992 
30462993 In nucleus sampling, we compute the cumulative distribution over all the options for each subsequent token in decreasing probability order and cut it off once it reaches a particular probability specified by `top_p`.
30472994 
30482995 Recommended for advanced use cases only.
30492996 
3050### Returns
3051 
3052- `MessageBatch object { id, archived_at, cancel_initiated_at, 7 more }`
2997 maximum: 1, minimum: 0
2998 
2999## Returns
3000 
3001- `MessageBatch object`
30533002 
30543003 - `id: string`
30553004 
from line 3010
30613010 
30623011 RFC 3339 datetime string representing the time at which the Message Batch was archived and its results became unavailable.
30633012 
3013 format: date-time
3014 
30643015 - `cancel_initiated_at: string or null`
30653016 
30663017 RFC 3339 datetime string representing the time at which cancellation was initiated for the Message Batch. Specified only if cancellation was initiated.
30673018 
3019 format: date-time
3020 
30683021 - `created_at: string`
30693022 
30703023 RFC 3339 datetime string representing the time at which the Message Batch was created.
30713024 
3025 format: date-time
3026 
30723027 - `ended_at: string or null`
30733028 
30743029 RFC 3339 datetime string representing the time at which processing for the Message Batch ended. Specified only once processing ends.
30753030 
30763031 Processing ends when every request in a Message Batch has either succeeded, errored, canceled, or expired.
30773032 
3033 format: date-time
3034 
30783035 - `expires_at: string`
30793036 
30803037 RFC 3339 datetime string representing the time at which the Message Batch will expire and end processing, which is 24 hours after creation.
30813038 
3039 format: date-time
3040 
30823041 - `processing_status: "in_progress" or "canceling" or "ended"`
30833042 
30843043 Processing status of the Message Batch.
from line 3060
31013060 
31023061 This is zero until processing of the entire Message Batch has ended.
31033062 
3063 default: 0
3064 
31043065 - `errored: number`
31053066 
31063067 Number of requests in the Message Batch that encountered an error.
31073068 
31083069 This is zero until processing of the entire Message Batch has ended.
31093070 
3071 default: 0
3072 
31103073 - `expired: number`
31113074 
31123075 Number of requests in the Message Batch that have expired.
31133076 
31143077 This is zero until processing of the entire Message Batch has ended.
31153078 
3079 default: 0
3080 
31163081 - `processing: number`
31173082 
31183083 Number of requests in the Message Batch that are processing.
31193084 
3085 default: 0
3086 
31203087 - `succeeded: number`
31213088 
31223089 Number of requests in the Message Batch that have completed successfully.
31233090 
31243091 This is zero until processing of the entire Message Batch has ended.
31253092 
3093 default: 0
3094 
31263095 - `results_url: string or null`
31273096 
31283097 URL to a `.jsonl` file containing the results of the Message Batch requests. Specified only once processing ends.
from line 3104
31353104 
31363105 For Message Batches, this is always `"message_batch"`.
31373106 
3138 - `"message_batch"`
3139 
3140### Example
3141 
3142```http
3107 default: message_batch
3108 
3109## Example
3110 
3111```bash
31433112curl https://api.anthropic.com/v1/messages/batches \
31443113 -H 'Content-Type: application/json' \
31453114 -H 'anthropic-version: 2023-06-01' \
from line 3132
31633132 }'
31643133```
31653134 
3166#### Response
3135### Response (200)
31673136 
31683137```json
31693138{
31703139 
Feedback