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/beta/messages/batches/create
4---
5
16# Create a Message Batch
27
38**POST** `/v1/messages/batches`
from line 21
1621
1722 - `string`
1823
19 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
24 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
2025
2126 - `"message-batches-2024-09-24"`
2227
from line 69
6469
6570 - `"user-profiles-2026-08-18"`
6671
72 - `"user-profiles-2026-09-04"`
73
6774 - `"advisor-tool-2026-03-01"`
6875
6976 - `"managed-agents-2026-04-01"`
from line 116
109116- `"anthropic-user-profile-id": optional string`
110117
111118 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.
119
120- `"anthropic-workspace-id": optional string`
112121
113122## Body parameters
114123
from line 212
203212
204213 - `BetaTextBlockParam object`
205214
215 - `type: "text"`
216
206217 - `text: string`
207218
208219 minLength: 1
209
210 - `type: "text"`
211220
212221 - `cache_control: optional BetaCacheControlEphemeral or null`
213222
from line 243
234243
235244 - `BetaCitationCharLocationParam object`
236245
246 - `type: "char_location"`
247
237248 - `cited_text: string`
238249
239250 - `document_index: number`
from line 261
250261
251262 minimum: 0
252263
253 - `type: "char_location"`
254
255264 - `BetaCitationPageLocationParam object`
256265
266 - `type: "page_location"`
267
257268 - `cited_text: string`
258269
259270 - `document_index: number`
from line 281
270281
271282 minimum: 1
272283
273 - `type: "page_location"`
274
275284 - `BetaCitationContentBlockLocationParam object`
276285
286 - `type: "content_block_location"`
287
277288 - `cited_text: string`
278289
279290 The full text of the cited block range, concatenated.
from line 311
300311
301312 minimum: 0
302313
303 - `type: "content_block_location"`
304
305314 - `BetaCitationWebSearchResultLocationParam object`
306315
316 - `type: "web_search_result_location"`
317
307318 - `cited_text: string`
308319
309320 - `encrypted_index: string`
from line 323
312323
313324 maxLength: 512, minLength: 1
314325
315 - `type: "web_search_result_location"`
316
317326 - `url: string`
318327
319328 minLength: 1
320329
321330 - `BetaCitationSearchResultLocationParam object`
322331
332 - `type: "search_result_location"`
333
323334 - `cited_text: string`
324335
325336 The full text of the cited block range, concatenated.
from line 361
350361
351362 - `title: string or null`
352363
353 - `type: "search_result_location"`
354
355364 - `BetaImageBlockParam object`
356365
366 - `type: "image"`
367
357368 - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource`
358369
359370 - `BetaBase64ImageSource object`
360371
372 - `type: "base64"`
373
361374 - `data: string`
362375
363376 format: byte
from line 385
372385
373386 - `"image/webp"`
374387
388 - `BetaURLImageSource object`
389
390 - `type: "url"`
391
392 - `url: string`
393
394 - `BetaFileImageSource object`
395
396 - `type: "file"`
397
398 - `file_id: string`
399
400 - `cache_control: optional BetaCacheControlEphemeral or null`
401
402 Create a cache control breakpoint at this content block.
403
404 - `transformations: optional BetaImageTransformationsParam or null`
405
406 Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field.
407
408 - `oversized_image: optional "downsize" or "error"`
409
410 What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately — your image is never silently scaled down.
411
412 - `"downsize"`
413
414 - `"error"`
415
416 - `BetaRequestDocumentBlock object`
417
418 - `type: "document"`
419
420 - `source: BetaBase64PDFSource or BetaPlainTextSource or BetaContentBlockSource or 2 more`
421
422 - `BetaBase64PDFSource object`
423
375424 - `type: "base64"`
376425
377 - `BetaURLImageSource object`
426 - `data: string`
427
428 format: byte
429
430 - `media_type: "application/pdf"`
431
432 - `BetaPlainTextSource object`
433
434 - `type: "text"`
435
436 - `data: string`
437
438 - `media_type: "text/plain"`
439
440 - `BetaContentBlockSource object`
441
442 - `type: "content"`
443
444 - `content: string or array of BetaContentBlockSourceContent`
445
446 - `string`
447
448 - `BetaContentBlockSourceContent = array of BetaContentBlockSourceContent`
449
450 - `BetaTextBlockParam object`
451
452 - `BetaImageBlockParam object`
453
454 - `BetaURLPDFSource object`
378455
379456 - `type: "url"`
380457
381458 - `url: string`
382459
383 - `BetaFileImageSource object`
460 - `BetaFileDocumentSource object`
461
462 - `type: "file"`
384463
385464 - `file_id: string`
386465
387 - `type: "file"`
388
389 - `type: "image"`
390
391466 - `cache_control: optional BetaCacheControlEphemeral or null`
392467
393468 Create a cache control breakpoint at this content block.
394469
395 - `transformations: optional BetaImageTransformationsParam or null`
396
397 Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field.
398
399 - `oversized_image: optional "downsize" or "error"`
400
401 What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately — your image is never silently scaled down.
402
403 - `"downsize"`
404
405 - `"error"`
406
407 - `BetaRequestDocumentBlock object`
408
409 - `source: BetaBase64PDFSource or BetaPlainTextSource or BetaContentBlockSource or 2 more`
410
411 - `BetaBase64PDFSource object`
412
413 - `data: string`
414
415 format: byte
416
417 - `media_type: "application/pdf"`
418
419 - `type: "base64"`
420
421 - `BetaPlainTextSource object`
422
423 - `data: string`
424
425 - `media_type: "text/plain"`
426
427 - `type: "text"`
428
429 - `BetaContentBlockSource object`
430
431 - `content: string or array of BetaContentBlockSourceContent`
432
433 - `string`
434
435 - `BetaContentBlockSourceContent = array of BetaContentBlockSourceContent`
436
437 - `BetaTextBlockParam object`
438
439 - `BetaImageBlockParam object`
440
441 - `type: "content"`
442
443 - `BetaURLPDFSource object`
444
445 - `type: "url"`
446
447 - `url: string`
448
449 - `BetaFileDocumentSource object`
450
451 - `file_id: string`
452
453 - `type: "file"`
454
455 - `type: "document"`
470 - `citations: optional BetaCitationsConfigParam or null`
471
472 - `enabled: optional boolean`
473
474 - `context: optional string or null`
475
476 minLength: 1
477
478 - `title: optional string or null`
479
480 maxLength: 500, minLength: 1
481
482 - `BetaSearchResultBlockParam object`
483
484 - `type: "search_result"`
485
486 - `content: array of BetaTextBlockParam`
487
488 - `type: "text"`
489
490 - `text: string`
491
492 minLength: 1
493
494 - `cache_control: optional BetaCacheControlEphemeral or null`
495
496 Create a cache control breakpoint at this content block.
497
498 - `citations: optional array of BetaTextCitationParam or null`
499
500 - `source: string`
501
502 - `title: string`
456503
457504 - `cache_control: optional BetaCacheControlEphemeral or null`
458505
459506 Create a cache control breakpoint at this content block.
460507
461 - `citations: optional BetaCitationsConfigParam or null`
462
463 - `enabled: optional boolean`
464
465 - `context: optional string or null`
466
467 minLength: 1
468
469 - `title: optional string or null`
470
471 maxLength: 500, minLength: 1
472
473 - `BetaSearchResultBlockParam object`
474
475 - `content: array of BetaTextBlockParam`
476
477 - `text: string`
478
479 minLength: 1
480
481 - `type: "text"`
482
483 - `cache_control: optional BetaCacheControlEphemeral or null`
484
485 Create a cache control breakpoint at this content block.
486
487 - `citations: optional array of BetaTextCitationParam or null`
488
489 - `source: string`
490
491 - `title: string`
492
493 - `type: "search_result"`
508 - `citations: optional BetaCitationsConfigParam`
509
510 - `BetaThinkingBlockParam object`
511
512 - `type: "thinking"`
513
514 - `signature: string`
515
516 The `signature` value of this thinking block, exactly as returned by the API in a previous response. Used to verify that the block was generated by Claude.
517
518 Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`.
519
520 - `thinking: string`
521
522 The `thinking` text of this block as returned by the API.
523
524 - `BetaRedactedThinkingBlockParam object`
525
526 - `type: "redacted_thinking"`
527
528 - `data: string`
529
530 The `data` value of this redacted thinking block, exactly as returned by the API in a previous response. Opaque and encrypted; pass it back unchanged.
531
532 - `BetaToolUseBlockParam object`
533
534 - `type: "tool_use"`
535
536 - `id: string`
537
538 pattern: ^[a-zA-Z0-9_-]+$
539
540 - `input: map[unknown]`
541
542 - `name: string`
543
544 maxLength: 200, minLength: 1
494545
495546 - `cache_control: optional BetaCacheControlEphemeral or null`
496547
497548 Create a cache control breakpoint at this content block.
498549
499 - `citations: optional BetaCitationsConfigParam`
500
501 - `BetaThinkingBlockParam object`
502
503 - `signature: string`
504
505 The `signature` value of this thinking block, exactly as returned by the API in a previous response. Used to verify that the block was generated by Claude.
506
507 Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`.
508
509 - `thinking: string`
510
511 The `thinking` text of this block as returned by the API.
512
513 - `type: "thinking"`
514
515 - `BetaRedactedThinkingBlockParam object`
516
517 - `data: string`
518
519 The `data` value of this redacted thinking block, exactly as returned by the API in a previous response. Opaque and encrypted; pass it back unchanged.
520
521 - `type: "redacted_thinking"`
522
523 - `BetaToolUseBlockParam object`
524
525 - `id: string`
550 - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120`
551
552 Tool invocation directly from the model.
553
554 - `BetaDirectCaller object`
555
556 Tool invocation directly from the model.
557
558 - `type: "direct"`
559
560 - `BetaServerToolCaller object`
561
562 Tool invocation generated by a server-side tool.
563
564 - `type: "code_execution_20250825"`
565
566 - `tool_id: string`
567
568 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
569
570 - `BetaServerToolCaller20260120 object`
571
572 - `type: "code_execution_20260120"`
573
574 - `tool_id: string`
575
576 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
577
578 - `toolset_name: optional string or null`
579
580 For a toolset member tool_use, the toolset family this member belongs to.
581
582 maxLength: 64, minLength: 1, pattern: ^[a-zA-Z0-9_-]+$
583
584 - `BetaToolResultBlockParam object`
585
586 - `type: "tool_result"`
587
588 - `tool_use_id: string`
526589
527590 pattern: ^[a-zA-Z0-9_-]+$
528591
529 - `input: map[unknown]`
530
531 - `name: string`
532
533 maxLength: 200, minLength: 1
534
535 - `type: "tool_use"`
536
537592 - `cache_control: optional BetaCacheControlEphemeral or null`
538593
539594 Create a cache control breakpoint at this content block.
540595
541 - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120`
542
543 Tool invocation directly from the model.
544
545 - `BetaDirectCaller object`
546
547 Tool invocation directly from the model.
548
549 - `type: "direct"`
550
551 - `BetaServerToolCaller object`
552
553 Tool invocation generated by a server-side tool.
554
555 - `tool_id: string`
556
557 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
558
559 - `type: "code_execution_20250825"`
560
561 - `BetaServerToolCaller20260120 object`
562
563 - `tool_id: string`
564
565 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
566
567 - `type: "code_execution_20260120"`
568
569 - `toolset_name: optional string or null`
570
571 For a toolset member tool_use, the toolset family this member belongs to.
572
573 maxLength: 64, minLength: 1, pattern: ^[a-zA-Z0-9_-]+$
574
575 - `BetaToolResultBlockParam object`
576
577 - `tool_use_id: string`
578
579 pattern: ^[a-zA-Z0-9_-]+$
580
581 - `type: "tool_result"`
582
583 - `cache_control: optional BetaCacheControlEphemeral or null`
584
585 Create a cache control breakpoint at this content block.
586
587596 - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more`
588597
589598 - `string`
from line 611
602611
603612 Tool reference block that can be included in tool_result content.
604613
614 - `type: "tool_reference"`
615
605616 - `tool_name: string`
606617
607618 maxLength: 256, minLength: 1, pattern: ^[a-zA-Z0-9_-]{1,256}$
608
609 - `type: "tool_reference"`
610619
611620 - `cache_control: optional BetaCacheControlEphemeral or null`
612621
from line 631
622631 browser toolset member `tool_use`. The server renders the
623632 model-visible text from it; the model never sees the raw fields.
624633
634 - `type: "browser_state"`
635
625636 - `tabs: array of BetaBrowserStateTabEntry`
626637
627638 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`.
from line 660
649660 - `active: optional boolean`
650661
651662 Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`.
652
653 - `type: "browser_state"`
654663
655664 - `cache_control: optional BetaCacheControlEphemeral or null`
656665
from line 681
672681 during a failed call gets no deferred `tab_opened`; it simply appears
673682 in the next result's `tabs` inventory.
674683
684 - `type: "tab_opened"`
685
675686 - `tab_id: string`
676687
677688 The `tab_id` of the opened tab, present in `tabs`.
678689
679690 maxLength: 4096, minLength: 1, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
680691
681 - `type: "tab_opened"`
682
683692 - `BetaBrowserStateChangeDownloadStarted object`
684693
685694 A file download that started during this call.
686695
696 - `type: "download_started"`
697
687698 - `download_id: string`
688699
689700 The caller-assigned identifier for this download, stable across the state changes reporting it.
690701
691702 maxLength: 4096, minLength: 1, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
692
693 - `type: "download_started"`
694703
695704 - `url: string`
696705
from line 714
705714 `download_started`, when the download finished during the call that
706715 started it (at most one state change per `download_id` per result).
707716
717 - `type: "download_completed"`
718
708719 - `download_id: string`
709720
710721 The caller-assigned identifier for this download, stable across the state changes reporting it.
711722
712723 maxLength: 4096, minLength: 1, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
713724
714 - `type: "download_completed"`
715
716725 - `url: string`
717726
718727 The final post-redirect URL the download was served from.
from line 744
735744
736745 A file download that failed — or was cancelled — during this call.
737746
747 - `type: "download_failed"`
748
738749 - `download_id: string`
739750
740751 The caller-assigned identifier for this download, stable across the state changes reporting it.
741752
742753 maxLength: 4096, minLength: 1, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
743754
744 - `type: "download_failed"`
745
746755 - `url: string`
747756
748757 The final post-redirect URL the download was served from.
from line 774
765774
766775 - `BetaServerToolUseBlockParam object`
767776
777 - `type: "server_tool_use"`
778
768779 - `id: string`
769780
770781 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
from line 800
789800
790801 - `"tool_search_tool_bm25"`
791802
792 - `type: "server_tool_use"`
793
794803 - `cache_control: optional BetaCacheControlEphemeral or null`
795804
796805 Create a cache control breakpoint at this content block.
from line 820
811820
812821 - `BetaWebSearchToolResultBlockParam object`
813822
823 - `type: "web_search_tool_result"`
824
814825 - `content: BetaWebSearchToolResultBlockParamContent`
815826
816827 - `ResultBlock = array of BetaWebSearchResultBlockParam`
817828
829 - `type: "web_search_result"`
830
818831 - `encrypted_content: string`
819832
820833 - `title: string`
821834
822 - `type: "web_search_result"`
823
824835 - `url: string`
825836
826837 - `page_age: optional string or null`
827838
828839 - `BetaWebSearchToolRequestError object`
829840
841 - `type: "web_search_tool_result_error"`
842
830843 - `error_code: BetaWebSearchToolResultErrorCode`
831844
832845 - `"invalid_tool_input"`
from line 854
841854
842855 - `"request_too_large"`
843856
844 - `type: "web_search_tool_result_error"`
845
846857 - `tool_use_id: string`
847858
848859 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
849860
850 - `type: "web_search_tool_result"`
851
852861 - `cache_control: optional BetaCacheControlEphemeral or null`
853862
854863 Create a cache control breakpoint at this content block.
from line 878
869878
870879 - `BetaWebFetchToolResultBlockParam object`
871880
881 - `type: "web_fetch_tool_result"`
882
872883 - `content: BetaWebFetchToolResultErrorBlockParam or BetaWebFetchBlockParam`
873884
874885 - `BetaWebFetchToolResultErrorBlockParam object`
875886
887 - `type: "web_fetch_tool_result_error"`
888
876889 - `error_code: BetaWebFetchToolResultErrorCode`
877890
878891 - `"invalid_tool_input"`
from line 906
893906
894907 - `"unavailable"`
895908
896 - `type: "web_fetch_tool_result_error"`
909 - `"content_too_large"`
897910
898911 - `BetaWebFetchBlockParam object`
899912
913 - `type: "web_fetch_result"`
914
900915 - `content: BetaRequestDocumentBlock`
901916
902 - `type: "web_fetch_result"`
903
904917 - `url: string`
905918
906919 Fetched content URL
from line 926
913926
914927 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
915928
916 - `type: "web_fetch_tool_result"`
917
918929 - `cache_control: optional BetaCacheControlEphemeral or null`
919930
920931 Create a cache control breakpoint at this content block.
from line 946
935946
936947 - `BetaAdvisorToolResultBlockParam object`
937948
949 - `type: "advisor_tool_result"`
950
938951 - `content: BetaAdvisorToolResultErrorParam or BetaAdvisorResultBlockParam or BetaAdvisorRedactedResultBlockParam`
939952
940953 - `BetaAdvisorToolResultErrorParam object`
941954
955 - `type: "advisor_tool_result_error"`
956
942957 - `error_code: "max_uses_exceeded" or "prompt_too_long" or "too_many_requests" or 4 more`
943958
944959 - `"max_uses_exceeded"`
from line 970
955970
956971 - `"model_not_found"`
957972
958 - `type: "advisor_tool_result_error"`
959
960973 - `BetaAdvisorResultBlockParam object`
961974
975 - `type: "advisor_result"`
976
962977 - `text: string`
963978
964 - `type: "advisor_result"`
965
966979 - `stop_reason: optional string or null`
967980
968981 - `BetaAdvisorRedactedResultBlockParam object`
969982
983 - `type: "advisor_redacted_result"`
984
970985 - `encrypted_content: string`
971986
972987 Opaque blob produced by a prior response; must be round-tripped verbatim.
973988
974 - `type: "advisor_redacted_result"`
975
976989 - `stop_reason: optional string or null`
977990
978991 - `tool_use_id: string`
979992
980993 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
981994
982 - `type: "advisor_tool_result"`
983
984995 - `cache_control: optional BetaCacheControlEphemeral or null`
985996
986997 Create a cache control breakpoint at this content block.
987998
988999 - `BetaCodeExecutionToolResultBlockParam object`
9891000
1001 - `type: "code_execution_tool_result"`
1002
9901003 - `content: BetaCodeExecutionToolResultBlockParamContent`
9911004
9921005 Code execution result with encrypted stdout for PFC + web_search results.
9931006
9941007 - `BetaCodeExecutionToolResultErrorParam object`
9951008
1009 - `type: "code_execution_tool_result_error"`
1010
9961011 - `error_code: BetaCodeExecutionToolResultErrorCode`
9971012
9981013 - `"invalid_tool_input"`
from line 1018
10031018
10041019 - `"execution_time_exceeded"`
10051020
1006 - `type: "code_execution_tool_result_error"`
1007
10081021 - `BetaCodeExecutionResultBlockParam object`
10091022
1023 - `type: "code_execution_result"`
1024
10101025 - `content: array of BetaCodeExecutionOutputBlockParam`
10111026
1027 - `type: "code_execution_output"`
1028
10121029 - `file_id: string`
10131030
1031 - `return_code: number`
1032
1033 - `stderr: string`
1034
1035 - `stdout: string`
1036
1037 - `BetaEncryptedCodeExecutionResultBlockParam object`
1038
1039 Code execution result with encrypted stdout for PFC + web_search results.
1040
1041 - `type: "encrypted_code_execution_result"`
1042
1043 - `content: array of BetaCodeExecutionOutputBlockParam`
1044
10141045 - `type: "code_execution_output"`
10151046
1047 - `file_id: string`
1048
1049 - `encrypted_stdout: string`
1050
10161051 - `return_code: number`
10171052
10181053 - `stderr: string`
10191054
1055 - `tool_use_id: string`
1056
1057 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
1058
1059 - `cache_control: optional BetaCacheControlEphemeral or null`
1060
1061 Create a cache control breakpoint at this content block.
1062
1063 - `BetaBashCodeExecutionToolResultBlockParam object`
1064
1065 - `type: "bash_code_execution_tool_result"`
1066
1067 - `content: BetaBashCodeExecutionToolResultErrorParam or BetaBashCodeExecutionResultBlockParam`
1068
1069 - `BetaBashCodeExecutionToolResultErrorParam object`
1070
1071 - `type: "bash_code_execution_tool_result_error"`
1072
1073 - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more`
1074
1075 - `"invalid_tool_input"`
1076
1077 - `"unavailable"`
1078
1079 - `"too_many_requests"`
1080
1081 - `"execution_time_exceeded"`
1082
1083 - `"output_file_too_large"`
1084
1085 - `BetaBashCodeExecutionResultBlockParam object`
1086
1087 - `type: "bash_code_execution_result"`
1088
1089 - `content: array of BetaBashCodeExecutionOutputBlockParam`
1090
1091 - `type: "bash_code_execution_output"`
1092
1093 - `file_id: string`
1094
1095 - `return_code: number`
1096
1097 - `stderr: string`
1098
10201099 - `stdout: string`
10211100
1022 - `type: "code_execution_result"`
1023
1024 - `BetaEncryptedCodeExecutionResultBlockParam object`
1025
1026 Code execution result with encrypted stdout for PFC + web_search results.
1027
1028 - `content: array of BetaCodeExecutionOutputBlockParam`
1029
1030 - `file_id: string`
1031
1032 - `type: "code_execution_output"`
1033
1034 - `encrypted_stdout: string`
1035
1036 - `return_code: number`
1037
1038 - `stderr: string`
1039
1040 - `type: "encrypted_code_execution_result"`
1041
10421101 - `tool_use_id: string`
10431102
10441103 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
10451104
1046 - `type: "code_execution_tool_result"`
1047
10481105 - `cache_control: optional BetaCacheControlEphemeral or null`
10491106
10501107 Create a cache control breakpoint at this content block.
10511108
1052 - `BetaBashCodeExecutionToolResultBlockParam object`
1053
1054 - `content: BetaBashCodeExecutionToolResultErrorParam or BetaBashCodeExecutionResultBlockParam`
1055
1056 - `BetaBashCodeExecutionToolResultErrorParam object`
1109 - `BetaTextEditorCodeExecutionToolResultBlockParam object`
1110
1111 - `type: "text_editor_code_execution_tool_result"`
1112
1113 - `content: BetaTextEditorCodeExecutionToolResultErrorParam or BetaTextEditorCodeExecutionViewResultBlockParam or BetaTextEditorCodeExecutionCreateResultBlockParam or BetaTextEditorCodeExecutionStrReplaceResultBlockParam`
1114
1115 - `BetaTextEditorCodeExecutionToolResultErrorParam object`
1116
1117 - `type: "text_editor_code_execution_tool_result_error"`
10571118
10581119 - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more`
10591120
from line 1126
10651126
10661127 - `"execution_time_exceeded"`
10671128
1068 - `"output_file_too_large"`
1069
1070 - `type: "bash_code_execution_tool_result_error"`
1071
1072 - `BetaBashCodeExecutionResultBlockParam object`
1073
1074 - `content: array of BetaBashCodeExecutionOutputBlockParam`
1075
1076 - `file_id: string`
1077
1078 - `type: "bash_code_execution_output"`
1079
1080 - `return_code: number`
1081
1082 - `stderr: string`
1083
1084 - `stdout: string`
1085
1086 - `type: "bash_code_execution_result"`
1129 - `"file_not_found"`
1130
1131 - `error_message: optional string or null`
1132
1133 - `BetaTextEditorCodeExecutionViewResultBlockParam object`
1134
1135 - `type: "text_editor_code_execution_view_result"`
1136
1137 - `content: string`
1138
1139 - `file_type: "text" or "image" or "pdf"`
1140
1141 - `"text"`
1142
1143 - `"image"`
1144
1145 - `"pdf"`
1146
1147 - `num_lines: optional number or null`
1148
1149 - `start_line: optional number or null`
1150
1151 - `total_lines: optional number or null`
1152
1153 - `BetaTextEditorCodeExecutionCreateResultBlockParam object`
1154
1155 - `type: "text_editor_code_execution_create_result"`
1156
1157 - `is_file_update: boolean`
1158
1159 - `BetaTextEditorCodeExecutionStrReplaceResultBlockParam object`
1160
1161 - `type: "text_editor_code_execution_str_replace_result"`
1162
1163 - `lines: optional array of string or null`
1164
1165 - `new_lines: optional number or null`
1166
1167 - `new_start: optional number or null`
1168
1169 - `old_lines: optional number or null`
1170
1171 - `old_start: optional number or null`
10871172
10881173 - `tool_use_id: string`
10891174
10901175 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
10911176
1092 - `type: "bash_code_execution_tool_result"`
1093
10941177 - `cache_control: optional BetaCacheControlEphemeral or null`
10951178
10961179 Create a cache control breakpoint at this content block.
10971180
1098 - `BetaTextEditorCodeExecutionToolResultBlockParam object`
1099
1100 - `content: BetaTextEditorCodeExecutionToolResultErrorParam or BetaTextEditorCodeExecutionViewResultBlockParam or BetaTextEditorCodeExecutionCreateResultBlockParam or BetaTextEditorCodeExecutionStrReplaceResultBlockParam`
1101
1102 - `BetaTextEditorCodeExecutionToolResultErrorParam object`
1103
1104 - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more`
1181 - `BetaToolSearchToolResultBlockParam object`
1182
1183 - `type: "tool_search_tool_result"`
1184
1185 - `content: BetaToolSearchToolResultErrorParam or BetaToolSearchToolSearchResultBlockParam`
1186
1187 - `BetaToolSearchToolResultErrorParam object`
1188
1189 - `type: "tool_search_tool_result_error"`
1190
1191 - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"`
11051192
11061193 - `"invalid_tool_input"`
11071194
from line 1198
11111198
11121199 - `"execution_time_exceeded"`
11131200
1114 - `"file_not_found"`
1115
1116 - `type: "text_editor_code_execution_tool_result_error"`
1117
11181201 - `error_message: optional string or null`
11191202
1120 - `BetaTextEditorCodeExecutionViewResultBlockParam object`
1121
1122 - `content: string`
1123
1124 - `file_type: "text" or "image" or "pdf"`
1125
1126 - `"text"`
1127
1128 - `"image"`
1129
1130 - `"pdf"`
1131
1132 - `type: "text_editor_code_execution_view_result"`
1133
1134 - `num_lines: optional number or null`
1135
1136 - `start_line: optional number or null`
1137
1138 - `total_lines: optional number or null`
1139
1140 - `BetaTextEditorCodeExecutionCreateResultBlockParam object`
1141
1142 - `is_file_update: boolean`
1143
1144 - `type: "text_editor_code_execution_create_result"`
1145
1146 - `BetaTextEditorCodeExecutionStrReplaceResultBlockParam object`
1147
1148 - `type: "text_editor_code_execution_str_replace_result"`
1149
1150 - `lines: optional array of string or null`
1151
1152 - `new_lines: optional number or null`
1153
1154 - `new_start: optional number or null`
1155
1156 - `old_lines: optional number or null`
1157
1158 - `old_start: optional number or null`
1203 - `BetaToolSearchToolSearchResultBlockParam object`
1204
1205 - `type: "tool_search_tool_search_result"`
1206
1207 - `tool_references: array of BetaToolReferenceBlockParam`
1208
1209 - `type: "tool_reference"`
1210
1211 - `tool_name: string`
1212
1213 maxLength: 256, minLength: 1, pattern: ^[a-zA-Z0-9_-]{1,256}$
1214
1215 - `cache_control: optional BetaCacheControlEphemeral or null`
1216
1217 Create a cache control breakpoint at this content block.
11591218
11601219 - `tool_use_id: string`
11611220
11621221 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
11631222
1164 - `type: "text_editor_code_execution_tool_result"`
1165
11661223 - `cache_control: optional BetaCacheControlEphemeral or null`
11671224
11681225 Create a cache control breakpoint at this content block.
11691226
1170 - `BetaToolSearchToolResultBlockParam object`
1171
1172 - `content: BetaToolSearchToolResultErrorParam or BetaToolSearchToolSearchResultBlockParam`
1173
1174 - `BetaToolSearchToolResultErrorParam object`
1175
1176 - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"`
1177
1178 - `"invalid_tool_input"`
1179
1180 - `"unavailable"`
1181
1182 - `"too_many_requests"`
1183
1184 - `"execution_time_exceeded"`
1185
1186 - `type: "tool_search_tool_result_error"`
1187
1188 - `error_message: optional string or null`
1189
1190 - `BetaToolSearchToolSearchResultBlockParam object`
1191
1192 - `tool_references: array of BetaToolReferenceBlockParam`
1193
1194 - `tool_name: string`
1195
1196 maxLength: 256, minLength: 1, pattern: ^[a-zA-Z0-9_-]{1,256}$
1197
1198 - `type: "tool_reference"`
1199
1200 - `cache_control: optional BetaCacheControlEphemeral or null`
1201
1202 Create a cache control breakpoint at this content block.
1203
1204 - `type: "tool_search_tool_search_result"`
1227 - `BetaMCPToolUseBlockParam object`
1228
1229 - `type: "mcp_tool_use"`
1230
1231 - `id: string`
1232
1233 pattern: ^[a-zA-Z0-9_-]+$
1234
1235 - `input: map[unknown]`
1236
1237 - `name: string`
1238
1239 - `server_name: string`
1240
1241 The name of the MCP server
1242
1243 - `cache_control: optional BetaCacheControlEphemeral or null`
1244
1245 Create a cache control breakpoint at this content block.
1246
1247 - `BetaRequestMCPToolResultBlockParam object`
1248
1249 - `type: "mcp_tool_result"`
12051250
12061251 - `tool_use_id: string`
12071252
1208 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
1209
1210 - `type: "tool_search_tool_result"`
1253 pattern: ^[a-zA-Z0-9_-]+$
12111254
12121255 - `cache_control: optional BetaCacheControlEphemeral or null`
12131256
12141257 Create a cache control breakpoint at this content block.
12151258
1216 - `BetaMCPToolUseBlockParam object`
1217
1218 - `id: string`
1219
1220 pattern: ^[a-zA-Z0-9_-]+$
1221
1222 - `input: map[unknown]`
1223
1224 - `name: string`
1225
1226 - `server_name: string`
1227
1228 The name of the MCP server
1229
1230 - `type: "mcp_tool_use"`
1231
1232 - `cache_control: optional BetaCacheControlEphemeral or null`
1233
1234 Create a cache control breakpoint at this content block.
1235
1236 - `BetaRequestMCPToolResultBlockParam object`
1237
1238 - `tool_use_id: string`
1239
1240 pattern: ^[a-zA-Z0-9_-]+$
1241
1242 - `type: "mcp_tool_result"`
1243
1244 - `cache_control: optional BetaCacheControlEphemeral or null`
1245
1246 Create a cache control breakpoint at this content block.
1247
12481259 - `content: optional string or array of BetaTextBlockParam`
12491260
12501261 - `string`
12511262
12521263 - `BetaMCPToolResultBlockParamContent = array of BetaTextBlockParam`
12531264
1265 - `type: "text"`
1266
12541267 - `text: string`
12551268
12561269 minLength: 1
1257
1258 - `type: "text"`
12591270
12601271 - `cache_control: optional BetaCacheControlEphemeral or null`
12611272
from line 1281
12701281 A content block that represents a file to be uploaded to the container
12711282 Files uploaded via this block will be available in the container's input directory.
12721283
1284 - `type: "container_upload"`
1285
12731286 - `file_id: string`
1274
1275 - `type: "container_upload"`
12761287
12771288 - `cache_control: optional BetaCacheControlEphemeral or null`
12781289
from line 1320
13091320 `tool` references a tool (or MCP toolset) by name from the request's
13101321 `tools`; it is offered to the model from this point in the
13111322 conversation onward.
1323
1324 - `type: "tool_addition"`
13121325
13131326 - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference`
13141327
from line 1337
13241337 server assigns to MCP-resolved tools — use `mcp_tool_reference` or
13251338 `mcp_toolset_reference` for those.
13261339
1340 - `type: "tool_reference"`
1341
13271342 - `name: string`
13281343
13291344 pattern: ^[a-zA-Z0-9_-]{1,128}$
1330
1331 - `type: "tool_reference"`
13321345
13331346 - `BetaToolChangeMCPToolReference object`
13341347
13351348 Reference to a single MCP tool by its server and remote name — the
13361349 same `server_name`/`name` pair `mcp_tool_use` carries.
13371350
1351 - `type: "mcp_tool_reference"`
1352
13381353 - `name: string`
13391354
13401355 - `server_name: string`
13411356
1342 - `type: "mcp_tool_reference"`
1343
13441357 - `BetaToolChangeMCPToolsetReference object`
13451358
13461359 Reference to every tool in the named MCP server's toolset.
13471360
1361 - `type: "mcp_toolset_reference"`
1362
13481363 - `server_name: string`
1349
1350 - `type: "mcp_toolset_reference"`
1351
1352 - `type: "tool_addition"`
13531364
13541365 - `cache_control: optional BetaCacheControlEphemeral or null`
13551366
from line 1373
13621373 `tool` references a tool (or MCP toolset) by name from the request's
13631374 `tools`; it is no longer offered to the model from this point in the
13641375 conversation onward.
1376
1377 - `type: "tool_removal"`
13651378
13661379 - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference`
13671380
from line 1398
13851398 - `BetaToolChangeMCPToolsetReference object`
13861399
13871400 Reference to every tool in the named MCP server's toolset.
1388
1389 - `type: "tool_removal"`
13901401
13911402 - `cache_control: optional BetaCacheControlEphemeral or null`
13921403
from line 1419
14081419 likewise rejected; between non-thinking blocks the block's placement has
14091420 no validation effect.
14101421
1422 - `type: "fallback"`
1423
14111424 - `from: BetaFallbackInfoParam`
14121425
14131426 Identifies one hop of a fallback transition.
from line 1510
14971510 - `to: BetaFallbackInfoParam`
14981511
14991512 Identifies one hop of a fallback transition.
1500
1501 - `type: "fallback"`
15021513
15031514 - `trigger: optional unknown`
15041515
from line 1581
15701581
15711582 maxItems: 20
15721583
1584 - `type: "anthropic" or "custom"`
1585
1586 Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
1587
1588 - `"anthropic"`
1589
1590 - `"custom"`
1591
15731592 - `skill_id: string`
15741593
15751594 Skill ID
15761595
15771596 maxLength: 64, minLength: 1
1578
1579 - `type: "anthropic" or "custom"`
1580
1581 Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
1582
1583 - `"anthropic"`
1584
1585 - `"custom"`
15861597
15871598 - `version: optional string`
15881599
from line 1805
17941805
17951806 A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)
17961807
1808 - `type: "json_schema"`
1809
17971810 - `schema: map[unknown]`
17981811
17991812 The JSON schema of the format
18001813
1801 - `type: "json_schema"`
1802
18031814 - `task_budget: optional BetaTokenTaskBudget or null`
18041815
18051816 User-configurable total token budget across contexts.
18061817
1818 - `type: "tokens"`
1819
1820 The budget type. Currently only 'tokens' is supported.
1821
18071822 - `total: number`
18081823
18091824 Total token budget across all contexts in the session.
18101825
18111826 minimum: 1024
18121827
1813 - `type: "tokens"`
1814
1815 The budget type. Currently only 'tokens' is supported.
1816
18171828 - `remaining: optional number or null`
18181829
18191830 Remaining tokens in the budget. Use this to track usage across contexts when implementing compaction client-side. Defaults to total if not provided.
from line 1843
18321843
18331844 - `BetaThinkingConfigEnabled object`
18341845
1846 - `type: "enabled"`
1847
18351848 - `budget_tokens: number`
18361849
18371850 Determines how many tokens Claude can use for its internal reasoning process. Larger budgets can enable more thorough analysis for complex problems, improving response quality.
from line 1854
18411854 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details.
18421855
18431856 minimum: 1024
1844
1845 - `type: "enabled"`
18461857
18471858 - `block_binding: optional BetaThinkingBlockBinding or null`
18481859
from line 1919
19081919
19091920 maxItems: 20
19101921
1922 - `type: "url"`
1923
19111924 - `name: string`
19121925
1913 - `type: "url"`
1914
19151926 - `url: string`
19161927
19171928 - `authorization_token: optional string or null`
from line 1991
19801991
19811992 - `array of BetaTextBlockParam`
19821993
1994 - `type: "text"`
1995
19831996 - `text: string`
19841997
19851998 minLength: 1
19861999
1987 - `type: "text"`
1988
19892000 - `cache_control: optional BetaCacheControlEphemeral or null`
19902001
19912002 Create a cache control breakpoint at this content block.
from line 2049
20382049
20392050 The model will use the specified tool with `tool_choice.name`.
20402051
2052 - `type: "tool"`
2053
20412054 - `name: string`
20422055
20432056 The name of the tool to use.
2044
2045 - `type: "tool"`
20462057
20472058 - `disable_parallel_tool_use: optional boolean`
20482059
from line 2133
21222133
21232134 - `BetaTool object`
21242135
2136 - `type: optional "custom" or null`
2137
21252138 - `input_schema: object`
21262139
21272140 [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.
from line 2189
21762189
21772190 When true, guarantees schema validation on tool names and inputs
21782191
2179 - `type: optional "custom" or null`
2180
21812192 - `BetaToolBash20241022 object`
21822193
2194 - `type: "bash_20241022"`
2195
21832196 - `name: "bash"`
21842197
21852198 Name of the tool.
21862199
21872200 This is how the tool will be called by the model and in `tool_use` blocks.
21882201
2189 - `type: "bash_20241022"`
2190
21912202 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
21922203
21932204 - `"direct"`
from line 2225
22142225
22152226 - `BetaToolBash20250124 object`
22162227
2228 - `type: "bash_20250124"`
2229
22172230 - `name: "bash"`
22182231
22192232 Name of the tool.
22202233
22212234 This is how the tool will be called by the model and in `tool_use` blocks.
22222235
2223 - `type: "bash_20250124"`
2224
22252236 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
22262237
22272238 - `"direct"`
from line 2259
22482259
22492260 - `BetaCodeExecutionTool20250522 object`
22502261
2262 - `type: "code_execution_20250522"`
2263
22512264 - `name: "code_execution"`
22522265
22532266 Name of the tool.
22542267
22552268 This is how the tool will be called by the model and in `tool_use` blocks.
22562269
2257 - `type: "code_execution_20250522"`
2258
22592270 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
22602271
22612272 - `"direct"`
from line 2291
22802291
22812292 - `BetaCodeExecutionTool20250825 object`
22822293
2294 - `type: "code_execution_20250825"`
2295
22832296 - `name: "code_execution"`
22842297
22852298 Name of the tool.
22862299
22872300 This is how the tool will be called by the model and in `tool_use` blocks.
22882301
2289 - `type: "code_execution_20250825"`
2290
22912302 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
22922303
22932304 - `"direct"`
from line 2325
23142325
23152326 Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint).
23162327
2328 - `type: "code_execution_20260120"`
2329
23172330 - `name: "code_execution"`
23182331
23192332 Name of the tool.
23202333
23212334 This is how the tool will be called by the model and in `tool_use` blocks.
23222335
2323 - `type: "code_execution_20260120"`
2324
23252336 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
23262337
23272338 - `"direct"`
from line 2359
23482359
23492360 Code execution tool with REPL state persistence.
23502361
2362 - `type: "code_execution_20260521"`
2363
23512364 - `name: "code_execution"`
23522365
23532366 Name of the tool.
23542367
23552368 This is how the tool will be called by the model and in `tool_use` blocks.
2356
2357 - `type: "code_execution_20260521"`
23582369
23592370 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
23602371
from line 2411
24002411 absent. Unknown keys are rejected: the field set is this toolset
24012412 version's complete member set.
24022413
2414 - `type: optional BetaBrowserTypeConfig or null`
2415
2416 `type`'s config overrides.
2417
2418 - `defer_loading: optional boolean or null`
2419
2420 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2421
2422 - `enabled: optional boolean or null`
2423
2424 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.
2425
24032426 - `close_tab: optional BetaBrowserCloseTabConfig or null`
24042427
24052428 `close_tab`'s config overrides.
from line 2759
27362759
27372760 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.
27382761
2739 - `type: optional BetaBrowserTypeConfig or null`
2740
2741 `type`'s config overrides.
2742
2743 - `defer_loading: optional boolean or null`
2744
2745 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2746
2747 - `enabled: optional boolean or null`
2748
2749 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.
2750
27512762 - `wait: optional BetaBrowserWaitConfig or null`
27522763
27532764 `wait`'s config overrides.
from line 2785
27742785
27752786 - `BetaToolComputerUse20241022 object`
27762787
2788 - `type: "computer_20241022"`
2789
27772790 - `display_height_px: number`
27782791
27792792 The height of the display in pixels.
from line 2805
27922805
27932806 This is how the tool will be called by the model and in `tool_use` blocks.
27942807
2795 - `type: "computer_20241022"`
2796
27972808 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
27982809
27992810 - `"direct"`
from line 2837
28262837
28272838 - `BetaMemoryTool20250818 object`
28282839
2840 - `type: "memory_20250818"`
2841
28292842 - `name: "memory"`
28302843
28312844 Name of the tool.
28322845
28332846 This is how the tool will be called by the model and in `tool_use` blocks.
28342847
2835 - `type: "memory_20250818"`
2836
28372848 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
28382849
28392850 - `"direct"`
from line 2871
28602871
28612872 - `BetaToolComputerUse20250124 object`
28622873
2874 - `type: "computer_20250124"`
2875
28632876 - `display_height_px: number`
28642877
28652878 The height of the display in pixels.
from line 2891
28782891
28792892 This is how the tool will be called by the model and in `tool_use` blocks.
28802893
2881 - `type: "computer_20250124"`
2882
28832894 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
28842895
28852896 - `"direct"`
from line 2923
29122923
29132924 - `BetaToolTextEditor20241022 object`
29142925
2926 - `type: "text_editor_20241022"`
2927
29152928 - `name: "str_replace_editor"`
29162929
29172930 Name of the tool.
29182931
29192932 This is how the tool will be called by the model and in `tool_use` blocks.
29202933
2921 - `type: "text_editor_20241022"`
2922
29232934 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
29242935
29252936 - `"direct"`
from line 2957
29462957
29472958 - `BetaToolComputerUse20251124 object`
29482959
2960 - `type: "computer_20251124"`
2961
29492962 - `display_height_px: number`
29502963
29512964 The height of the display in pixels.
from line 2976
29632976 Name of the tool.
29642977
29652978 This is how the tool will be called by the model and in `tool_use` blocks.
2966
2967 - `type: "computer_20251124"`
29682979
29692980 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
29702981
from line 3037
30263037 absent. Unknown keys are rejected: the field set is this toolset
30273038 version's complete member set.
30283039
3040 - `type: optional BetaComputerTypeConfig or null`
3041
3042 `type`'s config overrides.
3043
3044 - `defer_loading: optional boolean or null`
3045
3046 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
3047
3048 - `enabled: optional boolean or null`
3049
3050 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.
3051
30293052 - `cursor_position: optional BetaComputerCursorPositionConfig or null`
30303053
30313054 `cursor_position`'s config overrides.
from line 3217
31943217
31953218 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.
31963219
3197 - `type: optional BetaComputerTypeConfig or null`
3198
3199 `type`'s config overrides.
3200
3201 - `defer_loading: optional boolean or null`
3202
3203 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
3204
3205 - `enabled: optional boolean or null`
3206
3207 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.
3208
32093220 - `wait: optional BetaComputerWaitConfig or null`
32103221
32113222 `wait`'s config overrides.
from line 3243
32323243
32333244 - `BetaToolTextEditor20250124 object`
32343245
3246 - `type: "text_editor_20250124"`
3247
32353248 - `name: "str_replace_editor"`
32363249
32373250 Name of the tool.
32383251
32393252 This is how the tool will be called by the model and in `tool_use` blocks.
32403253
3241 - `type: "text_editor_20250124"`
3242
32433254 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
32443255
32453256 - `"direct"`
from line 3277
32663277
32673278 - `BetaToolTextEditor20250429 object`
32683279
3280 - `type: "text_editor_20250429"`
3281
32693282 - `name: "str_replace_based_edit_tool"`
32703283
32713284 Name of the tool.
32723285
32733286 This is how the tool will be called by the model and in `tool_use` blocks.
32743287
3275 - `type: "text_editor_20250429"`
3276
32773288 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
32783289
32793290 - `"direct"`
from line 3311
33003311
33013312 - `BetaToolTextEditor20250728 object`
33023313
3314 - `type: "text_editor_20250728"`
3315
33033316 - `name: "str_replace_based_edit_tool"`
33043317
33053318 Name of the tool.
33063319
33073320 This is how the tool will be called by the model and in `tool_use` blocks.
33083321
3309 - `type: "text_editor_20250728"`
3310
33113322 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
33123323
33133324 - `"direct"`
from line 3351
33403351
33413352 - `BetaWebSearchTool20250305 object`
33423353
3354 - `type: "web_search_20250305"`
3355
33433356 - `name: "web_search"`
33443357
33453358 Name of the tool.
33463359
33473360 This is how the tool will be called by the model and in `tool_use` blocks.
33483361
3349 - `type: "web_search_20250305"`
3350
33513362 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
33523363
33533364 - `"direct"`
from line 3427
34163427
34173428 - `BetaWebFetchTool20250910 object`
34183429
3430 - `type: "web_fetch_20250910"`
3431
34193432 - `name: "web_fetch"`
34203433
34213434 Name of the tool.
34223435
34233436 This is how the tool will be called by the model and in `tool_use` blocks.
34243437
3425 - `type: "web_fetch_20250910"`
3426
34273438 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
34283439
34293440 - `"direct"`
from line 3483
34723483
34733484 - `BetaWebSearchTool20260209 object`
34743485
3486 - `type: "web_search_20260209"`
3487
34753488 - `name: "web_search"`
34763489
34773490 Name of the tool.
34783491
34793492 This is how the tool will be called by the model and in `tool_use` blocks.
34803493
3481 - `type: "web_search_20260209"`
3482
34833494 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
34843495
34853496 - `"direct"`
from line 3533
35223533
35233534 - `BetaWebFetchTool20260209 object`
35243535
3536 - `type: "web_fetch_20260209"`
3537
35253538 - `name: "web_fetch"`
35263539
35273540 Name of the tool.
35283541
35293542 This is how the tool will be called by the model and in `tool_use` blocks.
35303543
3531 - `type: "web_fetch_20260209"`
3532
35333544 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
35343545
35353546 - `"direct"`
from line 3591
35803591
35813592 Web fetch tool with use_cache parameter for bypassing cached content.
35823593
3594 - `type: "web_fetch_20260309"`
3595
35833596 - `name: "web_fetch"`
35843597
35853598 Name of the tool.
35863599
35873600 This is how the tool will be called by the model and in `tool_use` blocks.
35883601
3589 - `type: "web_fetch_20260309"`
3590
35913602 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
35923603
35933604 - `"direct"`
from line 3651
36403651
36413652 - `BetaWebSearchTool20260318 object`
36423653
3654 - `type: "web_search_20260318"`
3655
36433656 - `name: "web_search"`
36443657
36453658 Name of the tool.
36463659
36473660 This is how the tool will be called by the model and in `tool_use` blocks.
36483661
3649 - `type: "web_search_20260318"`
3650
36513662 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
36523663
36533664 - `"direct"`
from line 3709
36983709
36993710 - `BetaWebFetchTool20260318 object`
37003711
3712 - `type: "web_fetch_20260318"`
3713
37013714 - `name: "web_fetch"`
37023715
37033716 Name of the tool.
37043717
37053718 This is how the tool will be called by the model and in `tool_use` blocks.
37063719
3707 - `type: "web_fetch_20260318"`
3708
37093720 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
37103721
37113722 - `"direct"`
from line 3777
37663777
37673778 - `BetaAdvisorTool20260301 object`
37683779
3780 - `type: "advisor_20260301"`
3781
37693782 - `model: Model`
37703783
37713784 The model that will complete your prompt.
from line 3791
37783791
37793792 This is how the tool will be called by the model and in `tool_use` blocks.
37803793
3781 - `type: "advisor_20260301"`
3782
37833794 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
37843795
37853796 - `"direct"`
from line 3831
38203831
38213832 - `BetaToolSearchToolBm25_20251119 object`
38223833
3834 - `type: "tool_search_tool_bm25_20251119" or "tool_search_tool_bm25"`
3835
3836 - `"tool_search_tool_bm25_20251119"`
3837
3838 - `"tool_search_tool_bm25"`
3839
38233840 - `name: "tool_search_tool_bm25"`
38243841
38253842 Name of the tool.
38263843
38273844 This is how the tool will be called by the model and in `tool_use` blocks.
38283845
3829 - `type: "tool_search_tool_bm25_20251119" or "tool_search_tool_bm25"`
3830
3831 - `"tool_search_tool_bm25_20251119"`
3832
3833 - `"tool_search_tool_bm25"`
3834
38353846 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
38363847
38373848 - `"direct"`
from line 3867
38563867
38573868 - `BetaToolSearchToolRegex20251119 object`
38583869
3870 - `type: "tool_search_tool_regex_20251119" or "tool_search_tool_regex"`
3871
3872 - `"tool_search_tool_regex_20251119"`
3873
3874 - `"tool_search_tool_regex"`
3875
38593876 - `name: "tool_search_tool_regex"`
38603877
38613878 Name of the tool.
38623879
38633880 This is how the tool will be called by the model and in `tool_use` blocks.
3864
3865 - `type: "tool_search_tool_regex_20251119" or "tool_search_tool_regex"`
3866
3867 - `"tool_search_tool_regex_20251119"`
3868
3869 - `"tool_search_tool_regex"`
38703881
38713882 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
38723883
from line 3908
38973908 Allows configuring enabled status and defer_loading for all tools
38983909 from an MCP server, with optional per-tool overrides.
38993910
3911 - `type: "mcp_toolset"`
3912
39003913 - `mcp_server_name: string`
39013914
39023915 Name of the MCP server to configure tools for
39033916
39043917 maxLength: 255, minLength: 1
39053918
3906 - `type: "mcp_toolset"`
3907
39083919 - `cache_control: optional BetaCacheControlEphemeral or null`
39093920
39103921 Create a cache control breakpoint at this content block.
from line 3984
39733984
39743985- `BetaMessageBatch object`
39753986
3987 - `type: "message_batch"`
3988
3989 Object type.
3990
3991 For Message Batches, this is always `"message_batch"`.
3992
3993 default: message_batch
3994
39763995 - `id: string`
39773996
39783997 Unique object identifier.
from line 4089
40704089 URL to a `.jsonl` file containing the results of the Message Batch requests. Specified only once processing ends.
40714090
40724091 Results in the file are not guaranteed to be in the same order as requests. Use the `custom_id` field to match results to requests.
4073
4074 - `type: "message_batch"`
4075
4076 Object type.
4077
4078 For Message Batches, this is always `"message_batch"`.
4079
4080 default: message_batch
40814092
40824093## Example
40834094
40844095