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: Batches
3url: https://platform.claude.com/docs/en/api/messages/batches
4---
5
16# Batches
27
38## Create a Message Batch
from line 20
1520- `"anthropic-user-profile-id": optional string`
1621
1722 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.
23
24- `"anthropic-workspace-id": optional string`
1825
1926### Body parameters
2027
from line 116
109116
110117 - `TextBlockParam object`
111118
119 - `type: "text"`
120
112121 - `text: string`
113122
114123 minLength: 1
115
116 - `type: "text"`
117124
118125 - `cache_control: optional CacheControlEphemeral or null`
119126
from line 147
140147
141148 - `CitationCharLocationParam object`
142149
150 - `type: "char_location"`
151
143152 - `cited_text: string`
144153
145154 - `document_index: number`
from line 165
156165
157166 minimum: 0
158167
159 - `type: "char_location"`
160
161168 - `CitationPageLocationParam object`
162169
170 - `type: "page_location"`
171
163172 - `cited_text: string`
164173
165174 - `document_index: number`
from line 185
176185
177186 minimum: 1
178187
179 - `type: "page_location"`
180
181188 - `CitationContentBlockLocationParam object`
182189
190 - `type: "content_block_location"`
191
183192 - `cited_text: string`
184193
185194 The full text of the cited block range, concatenated.
from line 215
206215
207216 minimum: 0
208217
209 - `type: "content_block_location"`
210
211218 - `CitationWebSearchResultLocationParam object`
212219
220 - `type: "web_search_result_location"`
221
213222 - `cited_text: string`
214223
215224 - `encrypted_index: string`
from line 227
218227
219228 maxLength: 512, minLength: 1
220229
221 - `type: "web_search_result_location"`
222
223230 - `url: string`
224231
225232 minLength: 1
226233
227234 - `CitationSearchResultLocationParam object`
228235
236 - `type: "search_result_location"`
237
229238 - `cited_text: string`
230239
231240 The full text of the cited block range, concatenated.
from line 265
256265
257266 - `title: string or null`
258267
259 - `type: "search_result_location"`
260
261268 - `ImageBlockParam object`
262269
270 - `type: "image"`
271
263272 - `source: Base64ImageSource or URLImageSource or FileImageSource`
264273
265274 - `Base64ImageSource object`
266275
276 - `type: "base64"`
277
267278 - `data: string`
268279
269280 format: byte
from line 289
278289
279290 - `"image/webp"`
280291
292 - `URLImageSource object`
293
294 - `type: "url"`
295
296 - `url: string`
297
298 - `FileImageSource object`
299
300 - `type: "file"`
301
302 - `file_id: string`
303
304 - `cache_control: optional CacheControlEphemeral or null`
305
306 Create a cache control breakpoint at this content block.
307
308 - `transformations: optional ImageTransformationsParam or null`
309
310 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.
311
312 - `oversized_image: optional "downsize" or "error"`
313
314 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.
315
316 - `"downsize"`
317
318 - `"error"`
319
320 - `DocumentBlockParam object`
321
322 - `type: "document"`
323
324 - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or 2 more`
325
326 - `Base64PDFSource object`
327
281328 - `type: "base64"`
282329
283 - `URLImageSource object`
330 - `data: string`
331
332 format: byte
333
334 - `media_type: "application/pdf"`
335
336 - `PlainTextSource object`
337
338 - `type: "text"`
339
340 - `data: string`
341
342 - `media_type: "text/plain"`
343
344 - `ContentBlockSource object`
345
346 - `type: "content"`
347
348 - `content: string or array of ContentBlockSourceContent`
349
350 - `string`
351
352 - `ContentBlockSourceContent = array of ContentBlockSourceContent`
353
354 - `TextBlockParam object`
355
356 - `ImageBlockParam object`
357
358 - `URLPDFSource object`
284359
285360 - `type: "url"`
286361
287362 - `url: string`
288363
289 - `FileImageSource object`
364 - `FileDocumentSource object`
365
366 - `type: "file"`
290367
291368 - `file_id: string`
292369
293 - `type: "file"`
294
295 - `type: "image"`
296
297370 - `cache_control: optional CacheControlEphemeral or null`
298371
299372 Create a cache control breakpoint at this content block.
300373
301 - `transformations: optional ImageTransformationsParam or null`
302
303 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.
304
305 - `oversized_image: optional "downsize" or "error"`
306
307 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.
308
309 - `"downsize"`
310
311 - `"error"`
312
313 - `DocumentBlockParam object`
314
315 - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or 2 more`
316
317 - `Base64PDFSource object`
318
319 - `data: string`
320
321 format: byte
322
323 - `media_type: "application/pdf"`
324
325 - `type: "base64"`
326
327 - `PlainTextSource object`
328
329 - `data: string`
330
331 - `media_type: "text/plain"`
332
333 - `type: "text"`
334
335 - `ContentBlockSource object`
336
337 - `content: string or array of ContentBlockSourceContent`
338
339 - `string`
340
341 - `ContentBlockSourceContent = array of ContentBlockSourceContent`
342
343 - `TextBlockParam object`
344
345 - `ImageBlockParam object`
346
347 - `type: "content"`
348
349 - `URLPDFSource object`
350
351 - `type: "url"`
352
353 - `url: string`
354
355 - `FileDocumentSource object`
356
357 - `file_id: string`
358
359 - `type: "file"`
360
361 - `type: "document"`
374 - `citations: optional CitationsConfigParam or null`
375
376 - `enabled: optional boolean`
377
378 - `context: optional string or null`
379
380 minLength: 1
381
382 - `title: optional string or null`
383
384 maxLength: 500, minLength: 1
385
386 - `SearchResultBlockParam object`
387
388 - `type: "search_result"`
389
390 - `content: array of TextBlockParam`
391
392 - `type: "text"`
393
394 - `text: string`
395
396 minLength: 1
397
398 - `cache_control: optional CacheControlEphemeral or null`
399
400 Create a cache control breakpoint at this content block.
401
402 - `citations: optional array of TextCitationParam or null`
403
404 - `source: string`
405
406 - `title: string`
362407
363408 - `cache_control: optional CacheControlEphemeral or null`
364409
365410 Create a cache control breakpoint at this content block.
366411
367 - `citations: optional CitationsConfigParam or null`
368
369 - `enabled: optional boolean`
370
371 - `context: optional string or null`
372
373 minLength: 1
374
375 - `title: optional string or null`
376
377 maxLength: 500, minLength: 1
378
379 - `SearchResultBlockParam object`
380
381 - `content: array of TextBlockParam`
382
383 - `text: string`
384
385 minLength: 1
386
387 - `type: "text"`
388
389 - `cache_control: optional CacheControlEphemeral or null`
390
391 Create a cache control breakpoint at this content block.
392
393 - `citations: optional array of TextCitationParam or null`
394
395 - `source: string`
396
397 - `title: string`
398
399 - `type: "search_result"`
412 - `citations: optional CitationsConfigParam`
413
414 - `ThinkingBlockParam object`
415
416 - `type: "thinking"`
417
418 - `signature: string`
419
420 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.
421
422 Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`.
423
424 - `thinking: string`
425
426 The `thinking` text of this block as returned by the API.
427
428 - `RedactedThinkingBlockParam object`
429
430 - `type: "redacted_thinking"`
431
432 - `data: string`
433
434 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.
435
436 - `ToolUseBlockParam object`
437
438 - `type: "tool_use"`
439
440 - `id: string`
441
442 pattern: ^[a-zA-Z0-9_-]+$
443
444 - `input: map[unknown]`
445
446 - `name: string`
447
448 maxLength: 200, minLength: 1
400449
401450 - `cache_control: optional CacheControlEphemeral or null`
402451
403452 Create a cache control breakpoint at this content block.
404453
405 - `citations: optional CitationsConfigParam`
406
407 - `ThinkingBlockParam object`
408
409 - `signature: string`
410
411 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.
412
413 Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`.
414
415 - `thinking: string`
416
417 The `thinking` text of this block as returned by the API.
418
419 - `type: "thinking"`
420
421 - `RedactedThinkingBlockParam object`
422
423 - `data: string`
424
425 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.
426
427 - `type: "redacted_thinking"`
428
429 - `ToolUseBlockParam object`
430
431 - `id: string`
454 - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120`
455
456 Tool invocation directly from the model.
457
458 - `DirectCaller object`
459
460 Tool invocation directly from the model.
461
462 - `type: "direct"`
463
464 - `ServerToolCaller object`
465
466 Tool invocation generated by a server-side tool.
467
468 - `type: "code_execution_20250825"`
469
470 - `tool_id: string`
471
472 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
473
474 - `ServerToolCaller20260120 object`
475
476 - `type: "code_execution_20260120"`
477
478 - `tool_id: string`
479
480 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
481
482 - `toolset_name: optional string or null`
483
484 For a toolset member tool_use, the toolset family this member belongs to.
485
486 maxLength: 64, minLength: 1, pattern: ^[a-zA-Z0-9_-]+$
487
488 - `ToolResultBlockParam object`
489
490 - `type: "tool_result"`
491
492 - `tool_use_id: string`
432493
433494 pattern: ^[a-zA-Z0-9_-]+$
434495
435 - `input: map[unknown]`
436
437 - `name: string`
438
439 maxLength: 200, minLength: 1
440
441 - `type: "tool_use"`
442
443496 - `cache_control: optional CacheControlEphemeral or null`
444497
445498 Create a cache control breakpoint at this content block.
446499
447 - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120`
448
449 Tool invocation directly from the model.
450
451 - `DirectCaller object`
452
453 Tool invocation directly from the model.
454
455 - `type: "direct"`
456
457 - `ServerToolCaller object`
458
459 Tool invocation generated by a server-side tool.
460
461 - `tool_id: string`
462
463 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
464
465 - `type: "code_execution_20250825"`
466
467 - `ServerToolCaller20260120 object`
468
469 - `tool_id: string`
470
471 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
472
473 - `type: "code_execution_20260120"`
474
475 - `toolset_name: optional string or null`
476
477 For a toolset member tool_use, the toolset family this member belongs to.
478
479 maxLength: 64, minLength: 1, pattern: ^[a-zA-Z0-9_-]+$
480
481 - `ToolResultBlockParam object`
482
483 - `tool_use_id: string`
484
485 pattern: ^[a-zA-Z0-9_-]+$
486
487 - `type: "tool_result"`
488
489 - `cache_control: optional CacheControlEphemeral or null`
490
491 Create a cache control breakpoint at this content block.
492
493500 - `content: optional string or array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 3 more`
494501
495502 - `string`
from line 515
508515
509516 Tool reference block that can be included in tool_result content.
510517
518 - `type: "tool_reference"`
519
511520 - `tool_name: string`
512521
513522 maxLength: 256, minLength: 1, pattern: ^[a-zA-Z0-9_-]{1,256}$
514
515 - `type: "tool_reference"`
516523
517524 - `cache_control: optional CacheControlEphemeral or null`
518525
from line 535
528535 browser toolset member `tool_use`. The server renders the
529536 model-visible text from it; the model never sees the raw fields.
530537
538 - `type: "browser_state"`
539
531540 - `tabs: array of BrowserStateTabEntry`
532541
533542 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 564
555564 - `active: optional boolean`
556565
557566 Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`.
558
559 - `type: "browser_state"`
560567
561568 - `cache_control: optional CacheControlEphemeral or null`
562569
from line 585
578585 during a failed call gets no deferred `tab_opened`; it simply appears
579586 in the next result's `tabs` inventory.
580587
588 - `type: "tab_opened"`
589
581590 - `tab_id: string`
582591
583592 The `tab_id` of the opened tab, present in `tabs`.
584593
585594 maxLength: 4096, minLength: 1, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
586595
587 - `type: "tab_opened"`
588
589596 - `BrowserStateChangeDownloadStarted object`
590597
591598 A file download that started during this call.
592599
600 - `type: "download_started"`
601
593602 - `download_id: string`
594603
595604 The caller-assigned identifier for this download, stable across the state changes reporting it.
596605
597606 maxLength: 4096, minLength: 1, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
598
599 - `type: "download_started"`
600607
601608 - `url: string`
602609
from line 618
611618 `download_started`, when the download finished during the call that
612619 started it (at most one state change per `download_id` per result).
613620
621 - `type: "download_completed"`
622
614623 - `download_id: string`
615624
616625 The caller-assigned identifier for this download, stable across the state changes reporting it.
617626
618627 maxLength: 4096, minLength: 1, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
619628
620 - `type: "download_completed"`
621
622629 - `url: string`
623630
624631 The final post-redirect URL the download was served from.
from line 648
641648
642649 A file download that failed — or was cancelled — during this call.
643650
651 - `type: "download_failed"`
652
644653 - `download_id: string`
645654
646655 The caller-assigned identifier for this download, stable across the state changes reporting it.
647656
648657 maxLength: 4096, minLength: 1, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
649658
650 - `type: "download_failed"`
651
652659 - `url: string`
653660
654661 The final post-redirect URL the download was served from.
from line 678
671678
672679 - `ServerToolUseBlockParam object`
673680
681 - `type: "server_tool_use"`
682
674683 - `id: string`
675684
676685 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
from line 702
693702
694703 - `"tool_search_tool_bm25"`
695704
696 - `type: "server_tool_use"`
697
698705 - `cache_control: optional CacheControlEphemeral or null`
699706
700707 Create a cache control breakpoint at this content block.
from line 722
715722
716723 - `WebSearchToolResultBlockParam object`
717724
725 - `type: "web_search_tool_result"`
726
718727 - `content: WebSearchToolResultBlockParamContent`
719728
720729 - `WebSearchToolResultBlockItem = array of WebSearchResultBlockParam`
721730
731 - `type: "web_search_result"`
732
722733 - `encrypted_content: string`
723734
724735 - `title: string`
725736
726 - `type: "web_search_result"`
727
728737 - `url: string`
729738
730739 - `page_age: optional string or null`
731740
732741 - `WebSearchToolRequestError object`
733742
743 - `type: "web_search_tool_result_error"`
744
734745 - `error_code: WebSearchToolResultErrorCode`
735746
736747 - `"invalid_tool_input"`
from line 756
745756
746757 - `"request_too_large"`
747758
748 - `type: "web_search_tool_result_error"`
749
750759 - `tool_use_id: string`
751760
752761 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
753762
754 - `type: "web_search_tool_result"`
755
756763 - `cache_control: optional CacheControlEphemeral or null`
757764
758765 Create a cache control breakpoint at this content block.
from line 780
773780
774781 - `WebFetchToolResultBlockParam object`
775782
783 - `type: "web_fetch_tool_result"`
784
776785 - `content: WebFetchToolResultErrorBlockParam or WebFetchBlockParam`
777786
778787 - `WebFetchToolResultErrorBlockParam object`
779788
789 - `type: "web_fetch_tool_result_error"`
790
780791 - `error_code: WebFetchToolResultErrorCode`
781792
782793 - `"invalid_tool_input"`
from line 808
797808
798809 - `"unavailable"`
799810
800 - `type: "web_fetch_tool_result_error"`
811 - `"content_too_large"`
801812
802813 - `WebFetchBlockParam object`
803814
815 - `type: "web_fetch_result"`
816
804817 - `content: DocumentBlockParam`
805818
806 - `type: "web_fetch_result"`
807
808819 - `url: string`
809820
810821 Fetched content URL
from line 828
817828
818829 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
819830
820 - `type: "web_fetch_tool_result"`
821
822831 - `cache_control: optional CacheControlEphemeral or null`
823832
824833 Create a cache control breakpoint at this content block.
from line 848
839848
840849 - `CodeExecutionToolResultBlockParam object`
841850
851 - `type: "code_execution_tool_result"`
852
842853 - `content: CodeExecutionToolResultBlockParamContent`
843854
844855 Code execution result with encrypted stdout for PFC + web_search results.
845856
846857 - `CodeExecutionToolResultErrorParam object`
847858
859 - `type: "code_execution_tool_result_error"`
860
848861 - `error_code: CodeExecutionToolResultErrorCode`
849862
850863 - `"invalid_tool_input"`
from line 868
855868
856869 - `"execution_time_exceeded"`
857870
858 - `type: "code_execution_tool_result_error"`
859
860871 - `CodeExecutionResultBlockParam object`
861872
873 - `type: "code_execution_result"`
874
862875 - `content: array of CodeExecutionOutputBlockParam`
863876
877 - `type: "code_execution_output"`
878
864879 - `file_id: string`
865880
881 - `return_code: number`
882
883 - `stderr: string`
884
885 - `stdout: string`
886
887 - `EncryptedCodeExecutionResultBlockParam object`
888
889 Code execution result with encrypted stdout for PFC + web_search results.
890
891 - `type: "encrypted_code_execution_result"`
892
893 - `content: array of CodeExecutionOutputBlockParam`
894
866895 - `type: "code_execution_output"`
867896
897 - `file_id: string`
898
899 - `encrypted_stdout: string`
900
868901 - `return_code: number`
869902
870903 - `stderr: string`
871904
905 - `tool_use_id: string`
906
907 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
908
909 - `cache_control: optional CacheControlEphemeral or null`
910
911 Create a cache control breakpoint at this content block.
912
913 - `BashCodeExecutionToolResultBlockParam object`
914
915 - `type: "bash_code_execution_tool_result"`
916
917 - `content: BashCodeExecutionToolResultErrorParam or BashCodeExecutionResultBlockParam`
918
919 - `BashCodeExecutionToolResultErrorParam object`
920
921 - `type: "bash_code_execution_tool_result_error"`
922
923 - `error_code: BashCodeExecutionToolResultErrorCode`
924
925 - `"invalid_tool_input"`
926
927 - `"unavailable"`
928
929 - `"too_many_requests"`
930
931 - `"execution_time_exceeded"`
932
933 - `"output_file_too_large"`
934
935 - `BashCodeExecutionResultBlockParam object`
936
937 - `type: "bash_code_execution_result"`
938
939 - `content: array of BashCodeExecutionOutputBlockParam`
940
941 - `type: "bash_code_execution_output"`
942
943 - `file_id: string`
944
945 - `return_code: number`
946
947 - `stderr: string`
948
872949 - `stdout: string`
873950
874 - `type: "code_execution_result"`
875
876 - `EncryptedCodeExecutionResultBlockParam object`
877
878 Code execution result with encrypted stdout for PFC + web_search results.
879
880 - `content: array of CodeExecutionOutputBlockParam`
881
882 - `file_id: string`
883
884 - `type: "code_execution_output"`
885
886 - `encrypted_stdout: string`
887
888 - `return_code: number`
889
890 - `stderr: string`
891
892 - `type: "encrypted_code_execution_result"`
893
894951 - `tool_use_id: string`
895952
896953 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
897954
898 - `type: "code_execution_tool_result"`
899
900955 - `cache_control: optional CacheControlEphemeral or null`
901956
902957 Create a cache control breakpoint at this content block.
903958
904 - `BashCodeExecutionToolResultBlockParam object`
905
906 - `content: BashCodeExecutionToolResultErrorParam or BashCodeExecutionResultBlockParam`
907
908 - `BashCodeExecutionToolResultErrorParam object`
909
910 - `error_code: BashCodeExecutionToolResultErrorCode`
959 - `TextEditorCodeExecutionToolResultBlockParam object`
960
961 - `type: "text_editor_code_execution_tool_result"`
962
963 - `content: TextEditorCodeExecutionToolResultErrorParam or TextEditorCodeExecutionViewResultBlockParam or TextEditorCodeExecutionCreateResultBlockParam or TextEditorCodeExecutionStrReplaceResultBlockParam`
964
965 - `TextEditorCodeExecutionToolResultErrorParam object`
966
967 - `type: "text_editor_code_execution_tool_result_error"`
968
969 - `error_code: TextEditorCodeExecutionToolResultErrorCode`
911970
912971 - `"invalid_tool_input"`
913972
from line 976
917976
918977 - `"execution_time_exceeded"`
919978
920 - `"output_file_too_large"`
921
922 - `type: "bash_code_execution_tool_result_error"`
923
924 - `BashCodeExecutionResultBlockParam object`
925
926 - `content: array of BashCodeExecutionOutputBlockParam`
927
928 - `file_id: string`
929
930 - `type: "bash_code_execution_output"`
931
932 - `return_code: number`
933
934 - `stderr: string`
935
936 - `stdout: string`
937
938 - `type: "bash_code_execution_result"`
979 - `"file_not_found"`
980
981 - `error_message: optional string or null`
982
983 - `TextEditorCodeExecutionViewResultBlockParam object`
984
985 - `type: "text_editor_code_execution_view_result"`
986
987 - `content: string`
988
989 - `file_type: "text" or "image" or "pdf"`
990
991 - `"text"`
992
993 - `"image"`
994
995 - `"pdf"`
996
997 - `num_lines: optional number or null`
998
999 - `start_line: optional number or null`
1000
1001 - `total_lines: optional number or null`
1002
1003 - `TextEditorCodeExecutionCreateResultBlockParam object`
1004
1005 - `type: "text_editor_code_execution_create_result"`
1006
1007 - `is_file_update: boolean`
1008
1009 - `TextEditorCodeExecutionStrReplaceResultBlockParam object`
1010
1011 - `type: "text_editor_code_execution_str_replace_result"`
1012
1013 - `lines: optional array of string or null`
1014
1015 - `new_lines: optional number or null`
1016
1017 - `new_start: optional number or null`
1018
1019 - `old_lines: optional number or null`
1020
1021 - `old_start: optional number or null`
9391022
9401023 - `tool_use_id: string`
9411024
9421025 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
9431026
944 - `type: "bash_code_execution_tool_result"`
945
9461027 - `cache_control: optional CacheControlEphemeral or null`
9471028
9481029 Create a cache control breakpoint at this content block.
9491030
950 - `TextEditorCodeExecutionToolResultBlockParam object`
951
952 - `content: TextEditorCodeExecutionToolResultErrorParam or TextEditorCodeExecutionViewResultBlockParam or TextEditorCodeExecutionCreateResultBlockParam or TextEditorCodeExecutionStrReplaceResultBlockParam`
953
954 - `TextEditorCodeExecutionToolResultErrorParam object`
955
956 - `error_code: TextEditorCodeExecutionToolResultErrorCode`
1031 - `ToolSearchToolResultBlockParam object`
1032
1033 - `type: "tool_search_tool_result"`
1034
1035 - `content: ToolSearchToolResultErrorParam or ToolSearchToolSearchResultBlockParam`
1036
1037 - `ToolSearchToolResultErrorParam object`
1038
1039 - `type: "tool_search_tool_result_error"`
1040
1041 - `error_code: ToolSearchToolResultErrorCode`
9571042
9581043 - `"invalid_tool_input"`
9591044
from line 1048
9631048
9641049 - `"execution_time_exceeded"`
9651050
966 - `"file_not_found"`
967
968 - `type: "text_editor_code_execution_tool_result_error"`
969
9701051 - `error_message: optional string or null`
9711052
972 - `TextEditorCodeExecutionViewResultBlockParam object`
973
974 - `content: string`
975
976 - `file_type: "text" or "image" or "pdf"`
977
978 - `"text"`
979
980 - `"image"`
981
982 - `"pdf"`
983
984 - `type: "text_editor_code_execution_view_result"`
985
986 - `num_lines: optional number or null`
987
988 - `start_line: optional number or null`
989
990 - `total_lines: optional number or null`
991
992 - `TextEditorCodeExecutionCreateResultBlockParam object`
993
994 - `is_file_update: boolean`
995
996 - `type: "text_editor_code_execution_create_result"`
997
998 - `TextEditorCodeExecutionStrReplaceResultBlockParam object`
999
1000 - `type: "text_editor_code_execution_str_replace_result"`
1001
1002 - `lines: optional array of string or null`
1003
1004 - `new_lines: optional number or null`
1005
1006 - `new_start: optional number or null`
1007
1008 - `old_lines: optional number or null`
1009
1010 - `old_start: optional number or null`
1053 - `ToolSearchToolSearchResultBlockParam object`
1054
1055 - `type: "tool_search_tool_search_result"`
1056
1057 - `tool_references: array of ToolReferenceBlockParam`
1058
1059 - `type: "tool_reference"`
1060
1061 - `tool_name: string`
1062
1063 maxLength: 256, minLength: 1, pattern: ^[a-zA-Z0-9_-]{1,256}$
1064
1065 - `cache_control: optional CacheControlEphemeral or null`
1066
1067 Create a cache control breakpoint at this content block.
10111068
10121069 - `tool_use_id: string`
10131070
10141071 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
1015
1016 - `type: "text_editor_code_execution_tool_result"`
1017
1018 - `cache_control: optional CacheControlEphemeral or null`
1019
1020 Create a cache control breakpoint at this content block.
1021
1022 - `ToolSearchToolResultBlockParam object`
1023
1024 - `content: ToolSearchToolResultErrorParam or ToolSearchToolSearchResultBlockParam`
1025
1026 - `ToolSearchToolResultErrorParam object`
1027
1028 - `error_code: ToolSearchToolResultErrorCode`
1029
1030 - `"invalid_tool_input"`
1031
1032 - `"unavailable"`
1033
1034 - `"too_many_requests"`
1035
1036 - `"execution_time_exceeded"`
1037
1038 - `type: "tool_search_tool_result_error"`
1039
1040 - `error_message: optional string or null`
1041
1042 - `ToolSearchToolSearchResultBlockParam object`
1043
1044 - `tool_references: array of ToolReferenceBlockParam`
1045
1046 - `tool_name: string`
1047
1048 maxLength: 256, minLength: 1, pattern: ^[a-zA-Z0-9_-]{1,256}$
1049
1050 - `type: "tool_reference"`
1051
1052 - `cache_control: optional CacheControlEphemeral or null`
1053
1054 Create a cache control breakpoint at this content block.
1055
1056 - `type: "tool_search_tool_search_result"`
1057
1058 - `tool_use_id: string`
1059
1060 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
1061
1062 - `type: "tool_search_tool_result"`
10631072
10641073 - `cache_control: optional CacheControlEphemeral or null`
10651074
from line 1079
10701079 A content block that represents a file to be uploaded to the container
10711080 Files uploaded via this block will be available in the container's input directory.
10721081
1082 - `type: "container_upload"`
1083
10731084 - `file_id: string`
10741085
1075 - `type: "container_upload"`
1076
10771086 - `cache_control: optional CacheControlEphemeral or null`
10781087
10791088 Create a cache control breakpoint at this content block.
from line 1199
11901199
11911200 maxItems: 20
11921201
1202 - `type: "anthropic" or "custom"`
1203
1204 Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
1205
1206 - `"anthropic"`
1207
1208 - `"custom"`
1209
11931210 - `skill_id: string`
11941211
11951212 Skill ID
11961213
11971214 maxLength: 64, minLength: 1
11981215
1199 - `type: "anthropic" or "custom"`
1200
1201 Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
1202
1203 - `"anthropic"`
1204
1205 - `"custom"`
1206
12071216 - `version: optional string`
12081217
12091218 Skill version or 'latest' for most recent version
from line 1259
12501259
12511260 A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)
12521261
1262 - `type: "json_schema"`
1263
12531264 - `schema: map[unknown]`
12541265
12551266 The JSON schema of the format
12561267
1257 - `type: "json_schema"`
1258
12591268 - `service_tier: optional "auto" or "standard_only"`
12601269
12611270 Determines whether to use priority capacity (if available) or standard capacity for this request.
from line 1299
12901299
12911300 - `array of TextBlockParam`
12921301
1302 - `type: "text"`
1303
12931304 - `text: string`
12941305
12951306 minLength: 1
12961307
1297 - `type: "text"`
1298
12991308 - `cache_control: optional CacheControlEphemeral or null`
13001309
13011310 Create a cache control breakpoint at this content block.
from line 1321
13121321
13131322 - `ThinkingConfigEnabled object`
13141323
1324 - `type: "enabled"`
1325
13151326 - `budget_tokens: number`
13161327
13171328 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 1333
13221333
13231334 minimum: 1024
13241335
1325 - `type: "enabled"`
1326
13271336 - `display: optional "summarized" or "omitted" or null`
13281337
13291338 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 1389
13801389
13811390 The model will use the specified tool with `tool_choice.name`.
13821391
1392 - `type: "tool"`
1393
13831394 - `name: string`
13841395
13851396 The name of the tool to use.
1386
1387 - `type: "tool"`
13881397
13891398 - `disable_parallel_tool_use: optional boolean`
13901399
from line 1473
14641473
14651474 - `Tool object`
14661475
1476 - `type: optional "custom" or null`
1477
14671478 - `input_schema: object`
14681479
14691480 [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.
from line 1529
15181529
15191530 When true, guarantees schema validation on tool names and inputs
15201531
1521 - `type: optional "custom" or null`
1522
15231532 - `ToolBash20250124 object`
15241533
1534 - `type: "bash_20250124"`
1535
15251536 - `name: "bash"`
15261537
15271538 Name of the tool.
15281539
15291540 This is how the tool will be called by the model and in `tool_use` blocks.
15301541
1531 - `type: "bash_20250124"`
1532
15331542 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
15341543
15351544 - `"direct"`
from line 1565
15561565
15571566 - `CodeExecutionTool20250522 object`
15581567
1568 - `type: "code_execution_20250522"`
1569
15591570 - `name: "code_execution"`
15601571
15611572 Name of the tool.
15621573
15631574 This is how the tool will be called by the model and in `tool_use` blocks.
15641575
1565 - `type: "code_execution_20250522"`
1566
15671576 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
15681577
15691578 - `"direct"`
from line 1597
15881597
15891598 - `CodeExecutionTool20250825 object`
15901599
1600 - `type: "code_execution_20250825"`
1601
15911602 - `name: "code_execution"`
15921603
15931604 Name of the tool.
15941605
15951606 This is how the tool will be called by the model and in `tool_use` blocks.
15961607
1597 - `type: "code_execution_20250825"`
1598
15991608 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
16001609
16011610 - `"direct"`
from line 1631
16221631
16231632 Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint).
16241633
1634 - `type: "code_execution_20260120"`
1635
16251636 - `name: "code_execution"`
16261637
16271638 Name of the tool.
16281639
16291640 This is how the tool will be called by the model and in `tool_use` blocks.
16301641
1631 - `type: "code_execution_20260120"`
1632
16331642 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
16341643
16351644 - `"direct"`
from line 1665
16561665
16571666 Code execution tool with REPL state persistence.
16581667
1668 - `type: "code_execution_20260521"`
1669
16591670 - `name: "code_execution"`
16601671
16611672 Name of the tool.
16621673
16631674 This is how the tool will be called by the model and in `tool_use` blocks.
1664
1665 - `type: "code_execution_20260521"`
16661675
16671676 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
16681677
from line 1717
17081717 absent. Unknown keys are rejected: the field set is this toolset
17091718 version's complete member set.
17101719
1720 - `type: optional BrowserTypeConfig or null`
1721
1722 `type`'s config overrides.
1723
1724 - `defer_loading: optional boolean or null`
1725
1726 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1727
1728 - `enabled: optional boolean or null`
1729
1730 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.
1731
17111732 - `close_tab: optional BrowserCloseTabConfig or null`
17121733
17131734 `close_tab`'s config overrides.
from line 2065
20442065
20452066 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.
20462067
2047 - `type: optional BrowserTypeConfig or null`
2048
2049 `type`'s config overrides.
2068 - `wait: optional BrowserWaitConfig or null`
2069
2070 `wait`'s config overrides.
20502071
20512072 - `defer_loading: optional boolean or null`
20522073
from line 2077
20562077
20572078 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.
20582079
2059 - `wait: optional BrowserWaitConfig or null`
2060
2061 `wait`'s config overrides.
2080 - `zoom: optional BrowserZoomConfig or null`
2081
2082 `zoom`'s config overrides.
20622083
20632084 - `defer_loading: optional boolean or null`
20642085
from line 2089
20682089
20692090 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.
20702091
2071 - `zoom: optional BrowserZoomConfig or null`
2072
2073 `zoom`'s config overrides.
2074
2075 - `defer_loading: optional boolean or null`
2076
2077 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2078
2079 - `enabled: optional boolean or null`
2080
2081 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.
2082
20832092 - `MemoryTool20250818 object`
20842093
2094 - `type: "memory_20250818"`
2095
20852096 - `name: "memory"`
20862097
20872098 Name of the tool.
20882099
20892100 This is how the tool will be called by the model and in `tool_use` blocks.
2090
2091 - `type: "memory_20250818"`
20922101
20932102 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
20942103
from line 2149
21402149 absent. Unknown keys are rejected: the field set is this toolset
21412150 version's complete member set.
21422151
2152 - `type: optional ComputerTypeConfig or null`
2153
2154 `type`'s config overrides.
2155
2156 - `defer_loading: optional boolean or null`
2157
2158 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2159
2160 - `enabled: optional boolean or null`
2161
2162 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.
2163
21432164 - `cursor_position: optional ComputerCursorPositionConfig or null`
21442165
21452166 `cursor_position`'s config overrides.
from line 2329
23082329
23092330 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.
23102331
2311 - `type: optional ComputerTypeConfig or null`
2312
2313 `type`'s config overrides.
2332 - `wait: optional ComputerWaitConfig or null`
2333
2334 `wait`'s config overrides.
23142335
23152336 - `defer_loading: optional boolean or null`
23162337
from line 2341
23202341
23212342 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.
23222343
2323 - `wait: optional ComputerWaitConfig or null`
2324
2325 `wait`'s config overrides.
2344 - `zoom: optional ComputerZoomConfig or null`
2345
2346 `zoom`'s config overrides.
23262347
23272348 - `defer_loading: optional boolean or null`
23282349
from line 2353
23322353
23332354 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.
23342355
2335 - `zoom: optional ComputerZoomConfig or null`
2336
2337 `zoom`'s config overrides.
2338
2339 - `defer_loading: optional boolean or null`
2340
2341 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2342
2343 - `enabled: optional boolean or null`
2344
2345 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.
2346
23472356 - `ToolTextEditor20250124 object`
23482357
2358 - `type: "text_editor_20250124"`
2359
23492360 - `name: "str_replace_editor"`
23502361
23512362 Name of the tool.
23522363
23532364 This is how the tool will be called by the model and in `tool_use` blocks.
23542365
2355 - `type: "text_editor_20250124"`
2356
23572366 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
23582367
23592368 - `"direct"`
from line 2389
23802389
23812390 - `ToolTextEditor20250429 object`
23822391
2392 - `type: "text_editor_20250429"`
2393
23832394 - `name: "str_replace_based_edit_tool"`
23842395
23852396 Name of the tool.
23862397
23872398 This is how the tool will be called by the model and in `tool_use` blocks.
23882399
2389 - `type: "text_editor_20250429"`
2390
23912400 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
23922401
23932402 - `"direct"`
from line 2423
24142423
24152424 - `ToolTextEditor20250728 object`
24162425
2426 - `type: "text_editor_20250728"`
2427
24172428 - `name: "str_replace_based_edit_tool"`
24182429
24192430 Name of the tool.
24202431
24212432 This is how the tool will be called by the model and in `tool_use` blocks.
24222433
2423 - `type: "text_editor_20250728"`
2424
24252434 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
24262435
24272436 - `"direct"`
from line 2463
24542463
24552464 - `WebSearchTool20250305 object`
24562465
2466 - `type: "web_search_20250305"`
2467
24572468 - `name: "web_search"`
24582469
24592470 Name of the tool.
24602471
24612472 This is how the tool will be called by the model and in `tool_use` blocks.
24622473
2463 - `type: "web_search_20250305"`
2464
24652474 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
24662475
24672476 - `"direct"`
from line 2539
25302539
25312540 - `WebFetchTool20250910 object`
25322541
2542 - `type: "web_fetch_20250910"`
2543
25332544 - `name: "web_fetch"`
25342545
25352546 Name of the tool.
25362547
25372548 This is how the tool will be called by the model and in `tool_use` blocks.
25382549
2539 - `type: "web_fetch_20250910"`
2540
25412550 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
25422551
25432552 - `"direct"`
from line 2595
25862595
25872596 - `WebSearchTool20260209 object`
25882597
2598 - `type: "web_search_20260209"`
2599
25892600 - `name: "web_search"`
25902601
25912602 Name of the tool.
25922603
25932604 This is how the tool will be called by the model and in `tool_use` blocks.
25942605
2595 - `type: "web_search_20260209"`
2596
25972606 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
25982607
25992608 - `"direct"`
from line 2645
26362645
26372646 - `WebFetchTool20260209 object`
26382647
2648 - `type: "web_fetch_20260209"`
2649
26392650 - `name: "web_fetch"`
26402651
26412652 Name of the tool.
26422653
26432654 This is how the tool will be called by the model and in `tool_use` blocks.
26442655
2645 - `type: "web_fetch_20260209"`
2646
26472656 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
26482657
26492658 - `"direct"`
from line 2703
26942703
26952704 Web fetch tool with use_cache parameter for bypassing cached content.
26962705
2706 - `type: "web_fetch_20260309"`
2707
26972708 - `name: "web_fetch"`
26982709
26992710 Name of the tool.
27002711
27012712 This is how the tool will be called by the model and in `tool_use` blocks.
27022713
2703 - `type: "web_fetch_20260309"`
2704
27052714 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
27062715
27072716 - `"direct"`
from line 2763
27542763
27552764 - `WebSearchTool20260318 object`
27562765
2766 - `type: "web_search_20260318"`
2767
27572768 - `name: "web_search"`
27582769
27592770 Name of the tool.
27602771
27612772 This is how the tool will be called by the model and in `tool_use` blocks.
27622773
2763 - `type: "web_search_20260318"`
2764
27652774 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
27662775
27672776 - `"direct"`
from line 2821
28122821
28132822 - `WebFetchTool20260318 object`
28142823
2824 - `type: "web_fetch_20260318"`
2825
28152826 - `name: "web_fetch"`
28162827
28172828 Name of the tool.
28182829
28192830 This is how the tool will be called by the model and in `tool_use` blocks.
28202831
2821 - `type: "web_fetch_20260318"`
2822
28232832 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
28242833
28252834 - `"direct"`
from line 2889
28802889
28812890 - `ToolSearchToolBm25_20251119 object`
28822891
2892 - `type: "tool_search_tool_bm25_20251119" or "tool_search_tool_bm25"`
2893
2894 - `"tool_search_tool_bm25_20251119"`
2895
2896 - `"tool_search_tool_bm25"`
2897
28832898 - `name: "tool_search_tool_bm25"`
28842899
28852900 Name of the tool.
28862901
28872902 This is how the tool will be called by the model and in `tool_use` blocks.
28882903
2889 - `type: "tool_search_tool_bm25_20251119" or "tool_search_tool_bm25"`
2890
2891 - `"tool_search_tool_bm25_20251119"`
2892
2893 - `"tool_search_tool_bm25"`
2894
28952904 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
28962905
28972906 - `"direct"`
from line 2925
29162925
29172926 - `ToolSearchToolRegex20251119 object`
29182927
2928 - `type: "tool_search_tool_regex_20251119" or "tool_search_tool_regex"`
2929
2930 - `"tool_search_tool_regex_20251119"`
2931
2932 - `"tool_search_tool_regex"`
2933
29192934 - `name: "tool_search_tool_regex"`
29202935
29212936 Name of the tool.
29222937
29232938 This is how the tool will be called by the model and in `tool_use` blocks.
29242939
2925 - `type: "tool_search_tool_regex_20251119" or "tool_search_tool_regex"`
2926
2927 - `"tool_search_tool_regex_20251119"`
2928
2929 - `"tool_search_tool_regex"`
2930
29312940 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
29322941
29332942 - `"direct"`
from line 2999
29902999
29913000- `MessageBatch object`
29923001
3002 - `type: "message_batch"`
3003
3004 Object type.
3005
3006 For Message Batches, this is always `"message_batch"`.
3007
3008 default: message_batch
3009
29933010 - `id: string`
29943011
29953012 Unique object identifier.
from line 3104
30873104 URL to a `.jsonl` file containing the results of the Message Batch requests. Specified only once processing ends.
30883105
30893106 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.
3090
3091 - `type: "message_batch"`
3092
3093 Object type.
3094
3095 For Message Batches, this is always `"message_batch"`.
3096
3097 default: message_batch
30983107
30993108### Example
31003109
from line 3168
31593168
31603169 ID of the Message Batch.
31613170
3171### Headers
3172
3173- `"anthropic-workspace-id": optional string`
3174
31623175### Returns
31633176
31643177- `MessageBatch object`
31653178
3179 - `type: "message_batch"`
3180
3181 Object type.
3182
3183 For Message Batches, this is always `"message_batch"`.
3184
3185 default: message_batch
3186
31663187 - `id: string`
31673188
31683189 Unique object identifier.
from line 3281
32603281 URL to a `.jsonl` file containing the results of the Message Batch requests. Specified only once processing ends.
32613282
32623283 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.
3263
3264 - `type: "message_batch"`
3265
3266 Object type.
3267
3268 For Message Batches, this is always `"message_batch"`.
3269
3270 default: message_batch
32713284
32723285### Example
32733286
from line 3339
33263339
33273340 default: 20, maximum: 1000, minimum: 1
33283341
3342### Headers
3343
3344- `"anthropic-workspace-id": optional string`
3345
33293346### Returns
33303347
33313348- `data: array of MessageBatch`
33323349
3350 - `type: "message_batch"`
3351
3352 Object type.
3353
3354 For Message Batches, this is always `"message_batch"`.
3355
3356 default: message_batch
3357
33333358 - `id: string`
33343359
33353360 Unique object identifier.
from line 3452
34273452 URL to a `.jsonl` file containing the results of the Message Batch requests. Specified only once processing ends.
34283453
34293454 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.
3430
3431 - `type: "message_batch"`
3432
3433 Object type.
3434
3435 For Message Batches, this is always `"message_batch"`.
3436
3437 default: message_batch
34383455
34393456- `first_id: string or null`
34403457
from line 3519
35023519
35033520 ID of the Message Batch.
35043521
3522### Headers
3523
3524- `"anthropic-workspace-id": optional string`
3525
35053526### Returns
35063527
35073528- `MessageBatch object`
35083529
3530 - `type: "message_batch"`
3531
3532 Object type.
3533
3534 For Message Batches, this is always `"message_batch"`.
3535
3536 default: message_batch
3537
35093538 - `id: string`
35103539
35113540 Unique object identifier.
from line 3632
36033632 URL to a `.jsonl` file containing the results of the Message Batch requests. Specified only once processing ends.
36043633
36053634 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.
3606
3607 - `type: "message_batch"`
3608
3609 Object type.
3610
3611 For Message Batches, this is always `"message_batch"`.
3612
3613 default: message_batch
36143635
36153636### Example
36163637
from line 3681
36603681
36613682 ID of the Message Batch.
36623683
3684### Headers
3685
3686- `"anthropic-workspace-id": optional string`
3687
36633688### Returns
36643689
36653690- `DeletedMessageBatch object`
36663691
3692 - `type: "message_batch_deleted"`
3693
3694 Deleted object type.
3695
3696 For Message Batches, this is always `"message_batch_deleted"`.
3697
3698 default: message_batch_deleted
3699
36673700 - `id: string`
36683701
36693702 ID of the Message Batch.
3670
3671 - `type: "message_batch_deleted"`
3672
3673 Deleted object type.
3674
3675 For Message Batches, this is always `"message_batch_deleted"`.
3676
3677 default: message_batch_deleted
36783703
36793704### Example
36803705
from line 3735
37103735
37113736 ID of the Message Batch.
37123737
3738### Headers
3739
3740- `"anthropic-workspace-id": optional string`
3741
37133742### Returns
37143743
37153744- `MessageBatchIndividualResponse object`
from line 3759
37303759
37313760 - `MessageBatchSucceededResult object`
37323761
3762 - `type: "succeeded"`
3763
3764 default: succeeded
3765
37333766 - `message: Message`
37343767
3768 - `type: "message"`
3769
3770 Object type.
3771
3772 For Messages, this is always `"message"`.
3773
3774 default: message
3775
37353776 - `id: string`
37363777
37373778 Unique object identifier.
from line 3797
37563797
37573798 Skills loaded in the container
37583799
3800 - `type: "anthropic" or "custom"`
3801
3802 Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
3803
3804 - `"anthropic"`
3805
3806 - `"custom"`
3807
37593808 - `skill_id: string`
37603809
37613810 Skill ID
37623811
37633812 maxLength: 64, minLength: 1
3764
3765 - `type: "anthropic" or "custom"`
3766
3767 Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
3768
3769 - `"anthropic"`
3770
3771 - `"custom"`
37723813
37733814 - `version: string`
37743815
from line 3848
38073848
38083849 - `TextBlock object`
38093850
3851 - `type: "text"`
3852
3853 default: text
3854
38103855 - `citations: array of TextCitation or null`
38113856
38123857 Citations supporting the text block.
from line 3860
38153860
38163861 - `CitationCharLocation object`
38173862
3863 - `type: "char_location"`
3864
3865 default: char_location
3866
38183867 - `cited_text: string`
38193868
38203869 - `document_index: number`
from line 3880
38313880
38323881 minimum: 0
38333882
3834 - `type: "char_location"`
3835
3836 default: char_location
3837
38383883 - `CitationPageLocation object`
38393884
3885 - `type: "page_location"`
3886
3887 default: page_location
3888
38403889 - `cited_text: string`
38413890
38423891 - `document_index: number`
from line 3902
38533902
38543903 minimum: 1
38553904
3856 - `type: "page_location"`
3857
3858 default: page_location
3859
38603905 - `CitationContentBlockLocation object`
38613906
3907 - `type: "content_block_location"`
3908
3909 default: content_block_location
3910
38623911 - `cited_text: string`
38633912
38643913 The full text of the cited block range, concatenated.
from line 3934
38853934
38863935 minimum: 0
38873936
3888 - `type: "content_block_location"`
3889
3890 default: content_block_location
3891
38923937 - `CitationsWebSearchResultLocation object`
38933938
3939 - `type: "web_search_result_location"`
3940
3941 default: web_search_result_location
3942
38943943 - `cited_text: string`
38953944
38963945 - `encrypted_index: string`
from line 3948
38993948
39003949 maxLength: 512
39013950
3902 - `type: "web_search_result_location"`
3903
3904 default: web_search_result_location
3905
39063951 - `url: string`
39073952
39083953 - `CitationsSearchResultLocation object`
39093954
3955 - `type: "search_result_location"`
3956
3957 default: search_result_location
3958
39103959 - `cited_text: string`
39113960
39123961 The full text of the cited block range, concatenated.
from line 3986
39373986
39383987 - `title: string or null`
39393988
3940 - `type: "search_result_location"`
3941
3942 default: search_result_location
3943
39443989 - `text: string`
39453990
3946 maxLength: 5000000, minLength: 0
3947
3948 - `type: "text"`
3949
3950 default: text
3991 minLength: 0
39513992
39523993 - `ThinkingBlock object`
39533994
3995 - `type: "thinking"`
3996
3997 default: thinking
3998
39543999 - `signature: string`
39554000
39564001 A value used to verify that this thinking block was generated by Claude when it is passed back to the API.
from line 4008
39634008
39644009 The text of Claude's thinking process for this block.
39654010
3966 - `type: "thinking"`
3967
3968 default: thinking
3969
39704011 - `RedactedThinkingBlock object`
39714012
4013 - `type: "redacted_thinking"`
4014
4015 default: redacted_thinking
4016
39724017 - `data: string`
39734018
39744019 The contents of this redacted thinking block, returned when portions of the model's thinking were safety-redacted. This field is opaque and encrypted, with no readable content.
from line 4022
39774022
39784023 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details.
39794024
3980 - `type: "redacted_thinking"`
3981
3982 default: redacted_thinking
3983
39844025 - `ToolUseBlock object`
39854026
4027 - `type: "tool_use"`
4028
4029 default: tool_use
4030
39864031 - `id: string`
39874032
39884033 pattern: ^[a-zA-Z0-9_-]+$
from line 4048
40034048
40044049 Tool invocation generated by a server-side tool.
40054050
4051 - `type: "code_execution_20250825"`
4052
40064053 - `tool_id: string`
40074054
40084055 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
40094056
4010 - `type: "code_execution_20250825"`
4011
40124057 - `ServerToolCaller20260120 object`
40134058
4059 - `type: "code_execution_20260120"`
4060
40144061 - `tool_id: string`
40154062
40164063 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
40174064
4018 - `type: "code_execution_20260120"`
4019
40204065 - `input: map[unknown]`
40214066
40224067 - `name: string`
40234068
40244069 minLength: 1
40254070
4026 - `type: "tool_use"`
4027
4028 default: tool_use
4029
40304071 - `toolset_name: optional string or null`
40314072
40324073 For a toolset member tool_use, the toolset family.
from line 4076
40354076
40364077 - `ServerToolUseBlock object`
40374078
4079 - `type: "server_tool_use"`
4080
4081 default: server_tool_use
4082
40384083 - `id: string`
40394084
40404085 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
from line 4118
40734118
40744119 - `"tool_search_tool_bm25"`
40754120
4076 - `type: "server_tool_use"`
4077
4078 default: server_tool_use
4079
40804121 - `WebSearchToolResultBlock object`
40814122
4123 - `type: "web_search_tool_result"`
4124
4125 default: web_search_tool_result
4126
40824127 - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120`
40834128
40844129 Tool invocation directly from the model.
from line 4144
40994144
41004145 - `WebSearchToolResultError object`
41014146
4147 - `type: "web_search_tool_result_error"`
4148
4149 default: web_search_tool_result_error
4150
41024151 - `error_code: WebSearchToolResultErrorCode`
41034152
41044153 - `"invalid_tool_input"`
from line 4162
41134162
41144163 - `"request_too_large"`
41154164
4116 - `type: "web_search_tool_result_error"`
4117
4118 default: web_search_tool_result_error
4119
41204165 - `array of WebSearchResultBlock`
41214166
4167 - `type: "web_search_result"`
4168
4169 default: web_search_result
4170
41224171 - `encrypted_content: string`
41234172
41244173 - `page_age: string or null`
41254174
41264175 - `title: string`
41274176
4128 - `type: "web_search_result"`
4129
4130 default: web_search_result
4131
41324177 - `url: string`
41334178
41344179 - `tool_use_id: string`
41354180
41364181 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
41374182
4138 - `type: "web_search_tool_result"`
4139
4140 default: web_search_tool_result
4141
41424183 - `WebFetchToolResultBlock object`
41434184
4185 - `type: "web_fetch_tool_result"`
4186
4187 default: web_fetch_tool_result
4188
41444189 - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120`
41454190
41464191 Tool invocation directly from the model.
from line 4206
41614206
41624207 - `WebFetchToolResultErrorBlock object`
41634208
4209 - `type: "web_fetch_tool_result_error"`
4210
4211 default: web_fetch_tool_result_error
4212
41644213 - `error_code: WebFetchToolResultErrorCode`
41654214
41664215 - `"invalid_tool_input"`
from line 4230
41814230
41824231 - `"unavailable"`
41834232
4184 - `type: "web_fetch_tool_result_error"`
4185
4186 default: web_fetch_tool_result_error
4233 - `"content_too_large"`
41874234
41884235 - `WebFetchBlock object`
41894236
4237 - `type: "web_fetch_result"`
4238
4239 default: web_fetch_result
4240
41904241 - `content: DocumentBlock`
41914242
4243 - `type: "document"`
4244
4245 default: document
4246
41924247 - `citations: CitationsConfig or null`
41934248
41944249 Citation configuration for the document
from line 4256
42014256
42024257 - `Base64PDFSource object`
42034258
4259 - `type: "base64"`
4260
42044261 - `data: string`
42054262
42064263 format: byte
42074264
42084265 - `media_type: "application/pdf"`
42094266
4210 - `type: "base64"`
4211
42124267 - `PlainTextSource object`
42134268
4269 - `type: "text"`
4270
42144271 - `data: string`
42154272
42164273 - `media_type: "text/plain"`
42174274
4218 - `type: "text"`
4219
42204275 - `title: string or null`
42214276
42224277 The title of the document
42234278
4224 - `type: "document"`
4225
4226 default: document
4227
42284279 - `retrieved_at: string or null`
42294280
42304281 ISO 8601 timestamp when the content was retrieved
42314282
4232 - `type: "web_fetch_result"`
4233
4234 default: web_fetch_result
4235
42364283 - `url: string`
42374284
42384285 Fetched content URL
from line 4288
42414288
42424289 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
42434290
4244 - `type: "web_fetch_tool_result"`
4245
4246 default: web_fetch_tool_result
4247
42484291 - `CodeExecutionToolResultBlock object`
42494292
4293 - `type: "code_execution_tool_result"`
4294
4295 default: code_execution_tool_result
4296
42504297 - `content: CodeExecutionToolResultBlockContent`
42514298
42524299 Code execution result with encrypted stdout for PFC + web_search results.
42534300
42544301 - `CodeExecutionToolResultError object`
42554302
4303 - `type: "code_execution_tool_result_error"`
4304
4305 default: code_execution_tool_result_error
4306
42564307 - `error_code: CodeExecutionToolResultErrorCode`
42574308
42584309 - `"invalid_tool_input"`
from line 4314
42634314
42644315 - `"execution_time_exceeded"`
42654316
4266 - `type: "code_execution_tool_result_error"`
4267
4268 default: code_execution_tool_result_error
4269
42704317 - `CodeExecutionResultBlock object`
42714318
4319 - `type: "code_execution_result"`
4320
4321 default: code_execution_result
4322
42724323 - `content: array of CodeExecutionOutputBlock`
42734324
4325 - `type: "code_execution_output"`
4326
4327 default: code_execution_output
4328
42744329 - `file_id: string`
42754330
4331 - `return_code: number`
4332
4333 - `stderr: string`
4334
4335 - `stdout: string`
4336
4337 - `EncryptedCodeExecutionResultBlock object`
4338
4339 Code execution result with encrypted stdout for PFC + web_search results.
4340
4341 - `type: "encrypted_code_execution_result"`
4342
4343 default: encrypted_code_execution_result
4344
4345 - `content: array of CodeExecutionOutputBlock`
4346
42764347 - `type: "code_execution_output"`
42774348
42784349 default: code_execution_output
42794350
4351 - `file_id: string`
4352
4353 - `encrypted_stdout: string`
4354
42804355 - `return_code: number`
42814356
42824357 - `stderr: string`
42834358
4359 - `tool_use_id: string`
4360
4361 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
4362
4363 - `BashCodeExecutionToolResultBlock object`
4364
4365 - `type: "bash_code_execution_tool_result"`
4366
4367 default: bash_code_execution_tool_result
4368
4369 - `content: BashCodeExecutionToolResultError or BashCodeExecutionResultBlock`
4370
4371 - `BashCodeExecutionToolResultError object`
4372
4373 - `type: "bash_code_execution_tool_result_error"`
4374
4375 default: bash_code_execution_tool_result_error
4376
4377 - `error_code: BashCodeExecutionToolResultErrorCode`
4378
4379 - `"invalid_tool_input"`
4380
4381 - `"unavailable"`
4382
4383 - `"too_many_requests"`
4384
4385 - `"execution_time_exceeded"`
4386
4387 - `"output_file_too_large"`
4388
4389 - `BashCodeExecutionResultBlock object`
4390
4391 - `type: "bash_code_execution_result"`
4392
4393 default: bash_code_execution_result
4394
4395 - `content: array of BashCodeExecutionOutputBlock`
4396
4397 - `type: "bash_code_execution_output"`
4398
4399 default: bash_code_execution_output
4400
4401 - `file_id: string`
4402
4403 - `return_code: number`
4404
4405 - `stderr: string`
4406
42844407 - `stdout: string`
42854408
4286 - `type: "code_execution_result"`
4287
4288 default: code_execution_result
4289
4290 - `EncryptedCodeExecutionResultBlock object`
4291
4292 Code execution result with encrypted stdout for PFC + web_search results.
4293
4294 - `content: array of CodeExecutionOutputBlock`
4295
4296 - `file_id: string`
4297
4298 - `type: "code_execution_output"`
4299
4300 default: code_execution_output
4301
4302 - `encrypted_stdout: string`
4303
4304 - `return_code: number`
4305
4306 - `stderr: string`
4307
4308 - `type: "encrypted_code_execution_result"`
4309
4310 default: encrypted_code_execution_result
4311
43124409 - `tool_use_id: string`
43134410
43144411 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
43154412
4316 - `type: "code_execution_tool_result"`
4317
4318 default: code_execution_tool_result
4319
4320 - `BashCodeExecutionToolResultBlock object`
4321
4322 - `content: BashCodeExecutionToolResultError or BashCodeExecutionResultBlock`
4323
4324 - `BashCodeExecutionToolResultError object`
4325
4326 - `error_code: BashCodeExecutionToolResultErrorCode`
4413 - `TextEditorCodeExecutionToolResultBlock object`
4414
4415 - `type: "text_editor_code_execution_tool_result"`
4416
4417 default: text_editor_code_execution_tool_result
4418
4419 - `content: TextEditorCodeExecutionToolResultError or TextEditorCodeExecutionViewResultBlock or TextEditorCodeExecutionCreateResultBlock or TextEditorCodeExecutionStrReplaceResultBlock`
4420
4421 - `TextEditorCodeExecutionToolResultError object`
4422
4423 - `type: "text_editor_code_execution_tool_result_error"`
4424
4425 default: text_editor_code_execution_tool_result_error
4426
4427 - `error_code: TextEditorCodeExecutionToolResultErrorCode`
43274428
43284429 - `"invalid_tool_input"`
43294430
from line 4434
43334434
43344435 - `"execution_time_exceeded"`
43354436
4336 - `"output_file_too_large"`
4337
4338 - `type: "bash_code_execution_tool_result_error"`
4339
4340 default: bash_code_execution_tool_result_error
4341
4342 - `BashCodeExecutionResultBlock object`
4343
4344 - `content: array of BashCodeExecutionOutputBlock`
4345
4346 - `file_id: string`
4347
4348 - `type: "bash_code_execution_output"`
4349
4350 default: bash_code_execution_output
4351
4352 - `return_code: number`
4353
4354 - `stderr: string`
4355
4356 - `stdout: string`
4357
4358 - `type: "bash_code_execution_result"`
4359
4360 default: bash_code_execution_result
4437 - `"file_not_found"`
4438
4439 - `error_message: string or null`
4440
4441 - `TextEditorCodeExecutionViewResultBlock object`
4442
4443 - `type: "text_editor_code_execution_view_result"`
4444
4445 default: text_editor_code_execution_view_result
4446
4447 - `content: string`
4448
4449 - `file_type: "text" or "image" or "pdf"`
4450
4451 - `"text"`
4452
4453 - `"image"`
4454
4455 - `"pdf"`
4456
4457 - `num_lines: number or null`
4458
4459 - `start_line: number or null`
4460
4461 - `total_lines: number or null`
4462
4463 - `TextEditorCodeExecutionCreateResultBlock object`
4464
4465 - `type: "text_editor_code_execution_create_result"`
4466
4467 default: text_editor_code_execution_create_result
4468
4469 - `is_file_update: boolean`
4470
4471 - `TextEditorCodeExecutionStrReplaceResultBlock object`
4472
4473 - `type: "text_editor_code_execution_str_replace_result"`
4474
4475 default: text_editor_code_execution_str_replace_result
4476
4477 - `lines: array of string or null`
4478
4479 - `new_lines: number or null`
4480
4481 - `new_start: number or null`
4482
4483 - `old_lines: number or null`
4484
4485 - `old_start: number or null`
43614486
43624487 - `tool_use_id: string`
43634488
43644489 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
43654490
4366 - `type: "bash_code_execution_tool_result"`
4367
4368 default: bash_code_execution_tool_result
4369
4370 - `TextEditorCodeExecutionToolResultBlock object`
4371
4372 - `content: TextEditorCodeExecutionToolResultError or TextEditorCodeExecutionViewResultBlock or TextEditorCodeExecutionCreateResultBlock or TextEditorCodeExecutionStrReplaceResultBlock`
4373
4374 - `TextEditorCodeExecutionToolResultError object`
4375
4376 - `error_code: TextEditorCodeExecutionToolResultErrorCode`
4491 - `ToolSearchToolResultBlock object`
4492
4493 - `type: "tool_search_tool_result"`
4494
4495 default: tool_search_tool_result
4496
4497 - `content: ToolSearchToolResultError or ToolSearchToolSearchResultBlock`
4498
4499 - `ToolSearchToolResultError object`
4500
4501 - `type: "tool_search_tool_result_error"`
4502
4503 default: tool_search_tool_result_error
4504
4505 - `error_code: ToolSearchToolResultErrorCode`
43774506
43784507 - `"invalid_tool_input"`
43794508
from line 4512
43834512
43844513 - `"execution_time_exceeded"`
43854514
4386 - `"file_not_found"`
4387
43884515 - `error_message: string or null`
43894516
4390 - `type: "text_editor_code_execution_tool_result_error"`
4391
4392 default: text_editor_code_execution_tool_result_error
4393
4394 - `TextEditorCodeExecutionViewResultBlock object`
4395
4396 - `content: string`
4397
4398 - `file_type: "text" or "image" or "pdf"`
4399
4400 - `"text"`
4401
4402 - `"image"`
4403
4404 - `"pdf"`
4405
4406 - `num_lines: number or null`
4407
4408 - `start_line: number or null`
4409
4410 - `total_lines: number or null`
4411
4412 - `type: "text_editor_code_execution_view_result"`
4413
4414 default: text_editor_code_execution_view_result
4415
4416 - `TextEditorCodeExecutionCreateResultBlock object`
4417
4418 - `is_file_update: boolean`
4419
4420 - `type: "text_editor_code_execution_create_result"`
4421
4422 default: text_editor_code_execution_create_result
4423
4424 - `TextEditorCodeExecutionStrReplaceResultBlock object`
4425
4426 - `lines: array of string or null`
4427
4428 - `new_lines: number or null`
4429
4430 - `new_start: number or null`
4431
4432 - `old_lines: number or null`
4433
4434 - `old_start: number or null`
4435
4436 - `type: "text_editor_code_execution_str_replace_result"`
4437
4438 default: text_editor_code_execution_str_replace_result
4517 - `ToolSearchToolSearchResultBlock object`
4518
4519 - `type: "tool_search_tool_search_result"`
4520
4521 default: tool_search_tool_search_result
4522
4523 - `tool_references: array of ToolReferenceBlock`
4524
4525 - `type: "tool_reference"`
4526
4527 default: tool_reference
4528
4529 - `tool_name: string`
4530
4531 maxLength: 256, minLength: 1, pattern: ^[a-zA-Z0-9_-]{1,256}$
44394532
44404533 - `tool_use_id: string`
44414534
44424535 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
44434536
4444 - `type: "text_editor_code_execution_tool_result"`
4445
4446 default: text_editor_code_execution_tool_result
4447
4448 - `ToolSearchToolResultBlock object`
4449
4450 - `content: ToolSearchToolResultError or ToolSearchToolSearchResultBlock`
4451
4452 - `ToolSearchToolResultError object`
4453
4454 - `error_code: ToolSearchToolResultErrorCode`
4455
4456 - `"invalid_tool_input"`
4457
4458 - `"unavailable"`
4459
4460 - `"too_many_requests"`
4461
4462 - `"execution_time_exceeded"`
4463
4464 - `error_message: string or null`
4465
4466 - `type: "tool_search_tool_result_error"`
4467
4468 default: tool_search_tool_result_error
4469
4470 - `ToolSearchToolSearchResultBlock object`
4471
4472 - `tool_references: array of ToolReferenceBlock`
4473
4474 - `tool_name: string`
4475
4476 maxLength: 256, minLength: 1, pattern: ^[a-zA-Z0-9_-]{1,256}$
4477
4478 - `type: "tool_reference"`
4479
4480 default: tool_reference
4481
4482 - `type: "tool_search_tool_search_result"`
4483
4484 default: tool_search_tool_search_result
4485
4486 - `tool_use_id: string`
4487
4488 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
4489
4490 - `type: "tool_search_tool_result"`
4491
4492 default: tool_search_tool_result
4493
44944537 - `ContainerUploadBlock object`
44954538
44964539 Response model for a file uploaded to the container.
44974540
4541 - `type: "container_upload"`
4542
4543 default: container_upload
4544
44984545 - `file_id: string`
44994546
4500 - `type: "container_upload"`
4501
4502 default: container_upload
4503
45044547 - `model: Model`
45054548
45064549 The model that will complete your prompt.
from line 4638
45954638
45964639 Structured information about a refusal.
45974640
4641 - `type: "refusal"`
4642
4643 default: refusal
4644
45984645 - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null`
45994646
46004647 The policy category that triggered a refusal.
from line 4671
46244671 Human-readable explanation of the refusal.
46254672
46264673 This text is not guaranteed to be stable. `null` when no explanation is available for the category.
4627
4628 - `type: "refusal"`
4629
4630 default: refusal
46314674
46324675 - `stop_reason: StopReason or null`
46334676
from line 4708
46654708
46664709 This value will be a non-null string if one of your custom stop sequences was generated.
46674710
4668 - `type: "message"`
4669
4670 Object type.
4671
4672 For Messages, this is always `"message"`.
4673
4674 default: message
4675
46764711 - `usage: Usage`
46774712
46784713 Billing and rate-limit usage.
from line 4812
47774812
47784813 - `"batch"`
47794814
4780 - `type: "succeeded"`
4781
4782 default: succeeded
4783
47844815 - `MessageBatchErroredResult object`
47854816
4817 - `type: "errored"`
4818
4819 default: errored
4820
47864821 - `error: ErrorResponse`
47874822
4823 - `type: "error"`
4824
4825 default: error
4826
47884827 - `error: ErrorObject`
47894828
47904829 - `InvalidRequestError object`
47914830
4831 - `type: "invalid_request_error"`
4832
4833 default: invalid_request_error
4834
47924835 - `message: string`
47934836
47944837 default: Invalid request
47954838
4796 - `type: "invalid_request_error"`
4797
4798 default: invalid_request_error
4799
48004839 - `AuthenticationError object`
48014840
4841 - `type: "authentication_error"`
4842
4843 default: authentication_error
4844
48024845 - `message: string`
48034846
48044847 default: Authentication error
48054848
4806 - `type: "authentication_error"`
4807
4808 default: authentication_error
4809
48104849 - `BillingError object`
48114850
4851 - `type: "billing_error"`
4852
4853 default: billing_error
4854
48124855 - `message: string`
48134856
48144857 default: Billing error
48154858
4816 - `type: "billing_error"`
4817
4818 default: billing_error
4819
48204859 - `PermissionError object`
48214860
4861 - `type: "permission_error"`
4862
4863 default: permission_error
4864
48224865 - `message: string`
48234866
48244867 default: Permission denied
48254868
4826 - `type: "permission_error"`
4827
4828 default: permission_error
4829
48304869 - `NotFoundError object`
48314870
4871 - `type: "not_found_error"`
4872
4873 default: not_found_error
4874
48324875 - `message: string`
48334876
48344877 default: Not found
48354878
4836 - `type: "not_found_error"`
4837
4838 default: not_found_error
4839
48404879 - `RateLimitError object`
48414880
4881 - `type: "rate_limit_error"`
4882
4883 default: rate_limit_error
4884
48424885 - `message: string`
48434886
48444887 default: Rate limited
48454888
4846 - `type: "rate_limit_error"`
4847
4848 default: rate_limit_error
4849
48504889 - `GatewayTimeoutError object`
48514890
4891 - `type: "timeout_error"`
4892
4893 default: timeout_error
4894
48524895 - `message: string`
48534896
48544897 default: Request timeout
48554898
4856 - `type: "timeout_error"`
4857
4858 default: timeout_error
4859
48604899 - `APIErrorObject object`
48614900
4901 - `type: "api_error"`
4902
4903 default: api_error
4904
48624905 - `message: string`
48634906
48644907 default: Internal server error
48654908
4866 - `type: "api_error"`
4867
4868 default: api_error
4869
48704909 - `OverloadedError object`
48714910
4911 - `type: "overloaded_error"`
4912
4913 default: overloaded_error
4914
48724915 - `message: string`
48734916
48744917 default: Overloaded
48754918
4876 - `type: "overloaded_error"`
4877
4878 default: overloaded_error
4879
48804919 - `request_id: string or null`
4881
4882 - `type: "error"`
4883
4884 default: error
4885
4886 - `type: "errored"`
4887
4888 default: errored
48894920
48904921 - `MessageBatchCanceledResult object`
48914922
from line 4944
49134944
49144945- `DeletedMessageBatch object`
49154946
4947 - `type: "message_batch_deleted"`
4948
4949 Deleted object type.
4950
4951 For Message Batches, this is always `"message_batch_deleted"`.
4952
4953 default: message_batch_deleted
4954
49164955 - `id: string`
49174956
49184957 ID of the Message Batch.
49194958
4920 - `type: "message_batch_deleted"`
4921
4922 Deleted object type.
4923
4924 For Message Batches, this is always `"message_batch_deleted"`.
4925
4926 default: message_batch_deleted
4927
49284959### Message Batch
49294960
49304961- `MessageBatch object`
49314962
4963 - `type: "message_batch"`
4964
4965 Object type.
4966
4967 For Message Batches, this is always `"message_batch"`.
4968
4969 default: message_batch
4970
49324971 - `id: string`
49334972
49344973 Unique object identifier.
from line 5066
50275066
50285067 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.
50295068
5030 - `type: "message_batch"`
5031
5032 Object type.
5033
5034 For Message Batches, this is always `"message_batch"`.
5035
5036 default: message_batch
5037
50385069### Message Batch Canceled Result
50395070
50405071- `MessageBatchCanceledResult object`
from line 5078
50475078
50485079- `MessageBatchErroredResult object`
50495080
5081 - `type: "errored"`
5082
5083 default: errored
5084
50505085 - `error: ErrorResponse`
50515086
5087 - `type: "error"`
5088
5089 default: error
5090
50525091 - `error: ErrorObject`
50535092
50545093 - `InvalidRequestError object`
50555094
5095 - `type: "invalid_request_error"`
5096
5097 default: invalid_request_error
5098
50565099 - `message: string`
50575100
50585101 default: Invalid request
50595102
5060 - `type: "invalid_request_error"`
5061
5062 default: invalid_request_error
5063
50645103 - `AuthenticationError object`
50655104
5105 - `type: "authentication_error"`
5106
5107 default: authentication_error
5108
50665109 - `message: string`
50675110
50685111 default: Authentication error
50695112
5070 - `type: "authentication_error"`
5071
5072 default: authentication_error
5073
50745113 - `BillingError object`
50755114
5115 - `type: "billing_error"`
5116
5117 default: billing_error
5118
50765119 - `message: string`
50775120
50785121 default: Billing error
50795122
5080 - `type: "billing_error"`
5081
5082 default: billing_error
5083
50845123 - `PermissionError object`
50855124
5125 - `type: "permission_error"`
5126
5127 default: permission_error
5128
50865129 - `message: string`
50875130
50885131 default: Permission denied
50895132
5090 - `type: "permission_error"`
5091
5092 default: permission_error
5093
50945133 - `NotFoundError object`
50955134
5135 - `type: "not_found_error"`
5136
5137 default: not_found_error
5138
50965139 - `message: string`
50975140
50985141 default: Not found
50995142
5100 - `type: "not_found_error"`
5101
5102 default: not_found_error
5103
51045143 - `RateLimitError object`
51055144
5145 - `type: "rate_limit_error"`
5146
5147 default: rate_limit_error
5148
51065149 - `message: string`
51075150
51085151 default: Rate limited
51095152
5110 - `type: "rate_limit_error"`
5111
5112 default: rate_limit_error
5113
51145153 - `GatewayTimeoutError object`
51155154
5155 - `type: "timeout_error"`
5156
5157 default: timeout_error
5158
51165159 - `message: string`
51175160
51185161 default: Request timeout
51195162
5120 - `type: "timeout_error"`
5121
5122 default: timeout_error
5123
51245163 - `APIErrorObject object`
51255164
5165 - `type: "api_error"`
5166
5167 default: api_error
5168
51265169 - `message: string`
51275170
51285171 default: Internal server error
51295172
5130 - `type: "api_error"`
5131
5132 default: api_error
5133
51345173 - `OverloadedError object`
51355174
5175 - `type: "overloaded_error"`
5176
5177 default: overloaded_error
5178
51365179 - `message: string`
51375180
51385181 default: Overloaded
51395182
5140 - `type: "overloaded_error"`
5141
5142 default: overloaded_error
5143
51445183 - `request_id: string or null`
51455184
5146 - `type: "error"`
5147
5148 default: error
5149
5150 - `type: "errored"`
5151
5152 default: errored
5153
51545185### Message Batch Expired Result
51555186
51565187- `MessageBatchExpiredResult object`
from line 5210
51795210
51805211 - `MessageBatchSucceededResult object`
51815212
5213 - `type: "succeeded"`
5214
5215 default: succeeded
5216
51825217 - `message: Message`
51835218
5219 - `type: "message"`
5220
5221 Object type.
5222
5223 For Messages, this is always `"message"`.
5224
5225 default: message
5226
51845227 - `id: string`
51855228
51865229 Unique object identifier.
from line 5248
52055248
52065249 Skills loaded in the container
52075250
5251 - `type: "anthropic" or "custom"`
5252
5253 Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
5254
5255 - `"anthropic"`
5256
5257 - `"custom"`
5258
52085259 - `skill_id: string`
52095260
52105261 Skill ID
52115262
52125263 maxLength: 64, minLength: 1
5213
5214 - `type: "anthropic" or "custom"`
5215
5216 Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
5217
5218 - `"anthropic"`
5219
5220 - `"custom"`
52215264
52225265 - `version: string`
52235266
from line 5299
52565299
52575300 - `TextBlock object`
52585301
5302 - `type: "text"`
5303
5304 default: text
5305
52595306 - `citations: array of TextCitation or null`
52605307
52615308 Citations supporting the text block.
from line 5311
52645311
52655312 - `CitationCharLocation object`
52665313
5314 - `type: "char_location"`
5315
5316 default: char_location
5317
52675318 - `cited_text: string`
52685319
52695320 - `document_index: number`
from line 5331
52805331
52815332 minimum: 0
52825333
5283 - `type: "char_location"`
5284
5285 default: char_location
5286
52875334 - `CitationPageLocation object`
52885335
5336 - `type: "page_location"`
5337
5338 default: page_location
5339
52895340 - `cited_text: string`
52905341
52915342 - `document_index: number`
from line 5353
53025353
53035354 minimum: 1
53045355
5305 - `type: "page_location"`
5306
5307 default: page_location
5308
53095356 - `CitationContentBlockLocation object`
53105357
5358 - `type: "content_block_location"`
5359
5360 default: content_block_location
5361
53115362 - `cited_text: string`
53125363
53135364 The full text of the cited block range, concatenated.
from line 5385
53345385
53355386 minimum: 0
53365387
5337 - `type: "content_block_location"`
5338
5339 default: content_block_location
5340
53415388 - `CitationsWebSearchResultLocation object`
53425389
5390 - `type: "web_search_result_location"`
5391
5392 default: web_search_result_location
5393
53435394 - `cited_text: string`
53445395
53455396 - `encrypted_index: string`
from line 5399
53485399
53495400 maxLength: 512
53505401
5351 - `type: "web_search_result_location"`
5352
5353 default: web_search_result_location
5354
53555402 - `url: string`
53565403
53575404 - `CitationsSearchResultLocation object`
53585405
5406 - `type: "search_result_location"`
5407
5408 default: search_result_location
5409
53595410 - `cited_text: string`
53605411
53615412 The full text of the cited block range, concatenated.
from line 5437
53865437
53875438 - `title: string or null`
53885439
5389 - `type: "search_result_location"`
5390
5391 default: search_result_location
5392
53935440 - `text: string`
53945441
5395 maxLength: 5000000, minLength: 0
5396
5397 - `type: "text"`
5398
5399 default: text
5442 minLength: 0
54005443
54015444 - `ThinkingBlock object`
54025445
5446 - `type: "thinking"`
5447
5448 default: thinking
5449
54035450 - `signature: string`
54045451
54055452 A value used to verify that this thinking block was generated by Claude when it is passed back to the API.
from line 5459
54125459
54135460 The text of Claude's thinking process for this block.
54145461
5415 - `type: "thinking"`
5416
5417 default: thinking
5418
54195462 - `RedactedThinkingBlock object`
54205463
5464 - `type: "redacted_thinking"`
5465
5466 default: redacted_thinking
5467
54215468 - `data: string`
54225469
54235470 The contents of this redacted thinking block, returned when portions of the model's thinking were safety-redacted. This field is opaque and encrypted, with no readable content.
from line 5473
54265473
54275474 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details.
54285475
5429 - `type: "redacted_thinking"`
5430
5431 default: redacted_thinking
5432
54335476 - `ToolUseBlock object`
54345477
5478 - `type: "tool_use"`
5479
5480 default: tool_use
5481
54355482 - `id: string`
54365483
54375484 pattern: ^[a-zA-Z0-9_-]+$
from line 5499
54525499
54535500 Tool invocation generated by a server-side tool.
54545501
5502 - `type: "code_execution_20250825"`
5503
54555504 - `tool_id: string`
54565505
54575506 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
54585507
5459 - `type: "code_execution_20250825"`
5460
54615508 - `ServerToolCaller20260120 object`
54625509
5510 - `type: "code_execution_20260120"`
5511
54635512 - `tool_id: string`
54645513
54655514 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
54665515
5467 - `type: "code_execution_20260120"`
5468
54695516 - `input: map[unknown]`
54705517
54715518 - `name: string`
54725519
54735520 minLength: 1
54745521
5475 - `type: "tool_use"`
5476
5477 default: tool_use
5478
54795522 - `toolset_name: optional string or null`
54805523
54815524 For a toolset member tool_use, the toolset family.
from line 5527
54845527
54855528 - `ServerToolUseBlock object`
54865529
5530 - `type: "server_tool_use"`
5531
5532 default: server_tool_use
5533
54875534 - `id: string`
54885535
54895536 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
from line 5569
55225569
55235570 - `"tool_search_tool_bm25"`
55245571
5525 - `type: "server_tool_use"`
5526
5527 default: server_tool_use
5528
55295572 - `WebSearchToolResultBlock object`
55305573
5574 - `type: "web_search_tool_result"`
5575
5576 default: web_search_tool_result
5577
55315578 - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120`
55325579
55335580 Tool invocation directly from the model.
from line 5595
55485595
55495596 - `WebSearchToolResultError object`
55505597
5598 - `type: "web_search_tool_result_error"`
5599
5600 default: web_search_tool_result_error
5601
55515602 - `error_code: WebSearchToolResultErrorCode`
55525603
55535604 - `"invalid_tool_input"`
from line 5613
55625613
55635614 - `"request_too_large"`
55645615
5565 - `type: "web_search_tool_result_error"`
5566
5567 default: web_search_tool_result_error
5568
55695616 - `array of WebSearchResultBlock`
55705617
5618 - `type: "web_search_result"`
5619
5620 default: web_search_result
5621
55715622 - `encrypted_content: string`
55725623
55735624 - `page_age: string or null`
55745625
55755626 - `title: string`
55765627
5577 - `type: "web_search_result"`
5578
5579 default: web_search_result
5580
55815628 - `url: string`
55825629
55835630 - `tool_use_id: string`
55845631
55855632 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
55865633
5587 - `type: "web_search_tool_result"`
5588
5589 default: web_search_tool_result
5590
55915634 - `WebFetchToolResultBlock object`
55925635
5636 - `type: "web_fetch_tool_result"`
5637
5638 default: web_fetch_tool_result
5639
55935640 - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120`
55945641
55955642 Tool invocation directly from the model.
from line 5657
56105657
56115658 - `WebFetchToolResultErrorBlock object`
56125659
5660 - `type: "web_fetch_tool_result_error"`
5661
5662 default: web_fetch_tool_result_error
5663
56135664 - `error_code: WebFetchToolResultErrorCode`
56145665
56155666 - `"invalid_tool_input"`
from line 5681
56305681
56315682 - `"unavailable"`
56325683
5633 - `type: "web_fetch_tool_result_error"`
5634
5635 default: web_fetch_tool_result_error
5684 - `"content_too_large"`
56365685
56375686 - `WebFetchBlock object`
56385687
5688 - `type: "web_fetch_result"`
5689
5690 default: web_fetch_result
5691
56395692 - `content: DocumentBlock`
56405693
5694 - `type: "document"`
5695
5696 default: document
5697
56415698 - `citations: CitationsConfig or null`
56425699
56435700 Citation configuration for the document
from line 5707
56505707
56515708 - `Base64PDFSource object`
56525709
5710 - `type: "base64"`
5711
56535712 - `data: string`
56545713
56555714 format: byte
56565715
56575716 - `media_type: "application/pdf"`
56585717
5659 - `type: "base64"`
5660
56615718 - `PlainTextSource object`
56625719
5720 - `type: "text"`
5721
56635722 - `data: string`
56645723
56655724 - `media_type: "text/plain"`
56665725
5667 - `type: "text"`
5668
56695726 - `title: string or null`
56705727
56715728 The title of the document
56725729
5673 - `type: "document"`
5674
5675 default: document
5676
56775730 - `retrieved_at: string or null`
56785731
56795732 ISO 8601 timestamp when the content was retrieved
56805733
5681 - `type: "web_fetch_result"`
5682
5683 default: web_fetch_result
5684
56855734 - `url: string`
56865735
56875736 Fetched content URL
from line 5739
56905739
56915740 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
56925741
5693 - `type: "web_fetch_tool_result"`
5694
5695 default: web_fetch_tool_result
5696
56975742 - `CodeExecutionToolResultBlock object`
56985743
5744 - `type: "code_execution_tool_result"`
5745
5746 default: code_execution_tool_result
5747
56995748 - `content: CodeExecutionToolResultBlockContent`
57005749
57015750 Code execution result with encrypted stdout for PFC + web_search results.
57025751
57035752 - `CodeExecutionToolResultError object`
57045753
5754 - `type: "code_execution_tool_result_error"`
5755
5756 default: code_execution_tool_result_error
5757
57055758 - `error_code: CodeExecutionToolResultErrorCode`
57065759
57075760 - `"invalid_tool_input"`
from line 5765
57125765
57135766 - `"execution_time_exceeded"`
57145767
5715 - `type: "code_execution_tool_result_error"`
5716
5717 default: code_execution_tool_result_error
5718
57195768 - `CodeExecutionResultBlock object`
57205769
5770 - `type: "code_execution_result"`
5771
5772 default: code_execution_result
5773
57215774 - `content: array of CodeExecutionOutputBlock`
57225775
5776 - `type: "code_execution_output"`
5777
5778 default: code_execution_output
5779
57235780 - `file_id: string`
57245781
5782 - `return_code: number`
5783
5784 - `stderr: string`
5785
5786 - `stdout: string`
5787
5788 - `EncryptedCodeExecutionResultBlock object`
5789
5790 Code execution result with encrypted stdout for PFC + web_search results.
5791
5792 - `type: "encrypted_code_execution_result"`
5793
5794 default: encrypted_code_execution_result
5795
5796 - `content: array of CodeExecutionOutputBlock`
5797
57255798 - `type: "code_execution_output"`
57265799
57275800 default: code_execution_output
57285801
5802 - `file_id: string`
5803
5804 - `encrypted_stdout: string`
5805
57295806 - `return_code: number`
57305807
57315808 - `stderr: string`
57325809
5810 - `tool_use_id: string`
5811
5812 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
5813
5814 - `BashCodeExecutionToolResultBlock object`
5815
5816 - `type: "bash_code_execution_tool_result"`
5817
5818 default: bash_code_execution_tool_result
5819
5820 - `content: BashCodeExecutionToolResultError or BashCodeExecutionResultBlock`
5821
5822 - `BashCodeExecutionToolResultError object`
5823
5824 - `type: "bash_code_execution_tool_result_error"`
5825
5826 default: bash_code_execution_tool_result_error
5827
5828 - `error_code: BashCodeExecutionToolResultErrorCode`
5829
5830 - `"invalid_tool_input"`
5831
5832 - `"unavailable"`
5833
5834 - `"too_many_requests"`
5835
5836 - `"execution_time_exceeded"`
5837
5838 - `"output_file_too_large"`
5839
5840 - `BashCodeExecutionResultBlock object`
5841
5842 - `type: "bash_code_execution_result"`
5843
5844 default: bash_code_execution_result
5845
5846 - `content: array of BashCodeExecutionOutputBlock`
5847
5848 - `type: "bash_code_execution_output"`
5849
5850 default: bash_code_execution_output
5851
5852 - `file_id: string`
5853
5854 - `return_code: number`
5855
5856 - `stderr: string`
5857
57335858 - `stdout: string`
57345859
5735 - `type: "code_execution_result"`
5736
5737 default: code_execution_result
5738
5739 - `EncryptedCodeExecutionResultBlock object`
5740
5741 Code execution result with encrypted stdout for PFC + web_search results.
5742
5743 - `content: array of CodeExecutionOutputBlock`
5744
5745 - `file_id: string`
5746
5747 - `type: "code_execution_output"`
5748
5749 default: code_execution_output
5750
5751 - `encrypted_stdout: string`
5752
5753 - `return_code: number`
5754
5755 - `stderr: string`
5756
5757 - `type: "encrypted_code_execution_result"`
5758
5759 default: encrypted_code_execution_result
5760
57615860 - `tool_use_id: string`
57625861
57635862 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
57645863
5765 - `type: "code_execution_tool_result"`
5766
5767 default: code_execution_tool_result
5768
5769 - `BashCodeExecutionToolResultBlock object`
5770
5771 - `content: BashCodeExecutionToolResultError or BashCodeExecutionResultBlock`
5772
5773 - `BashCodeExecutionToolResultError object`
5774
5775 - `error_code: BashCodeExecutionToolResultErrorCode`
5864 - `TextEditorCodeExecutionToolResultBlock object`
5865
5866 - `type: "text_editor_code_execution_tool_result"`
5867
5868 default: text_editor_code_execution_tool_result
5869
5870 - `content: TextEditorCodeExecutionToolResultError or TextEditorCodeExecutionViewResultBlock or TextEditorCodeExecutionCreateResultBlock or TextEditorCodeExecutionStrReplaceResultBlock`
5871
5872 - `TextEditorCodeExecutionToolResultError object`
5873
5874 - `type: "text_editor_code_execution_tool_result_error"`
5875
5876 default: text_editor_code_execution_tool_result_error
5877
5878 - `error_code: TextEditorCodeExecutionToolResultErrorCode`
57765879
57775880 - `"invalid_tool_input"`
57785881
from line 5885
57825885
57835886 - `"execution_time_exceeded"`
57845887
5785 - `"output_file_too_large"`
5786
5787 - `type: "bash_code_execution_tool_result_error"`
5788
5789 default: bash_code_execution_tool_result_error
5790
5791 - `BashCodeExecutionResultBlock object`
5792
5793 - `content: array of BashCodeExecutionOutputBlock`
5794
5795 - `file_id: string`
5796
5797 - `type: "bash_code_execution_output"`
5798
5799 default: bash_code_execution_output
5800
5801 - `return_code: number`
5802
5803 - `stderr: string`
5804
5805 - `stdout: string`
5806
5807 - `type: "bash_code_execution_result"`
5808
5809 default: bash_code_execution_result
5888 - `"file_not_found"`
5889
5890 - `error_message: string or null`
5891
5892 - `TextEditorCodeExecutionViewResultBlock object`
5893
5894 - `type: "text_editor_code_execution_view_result"`
5895
5896 default: text_editor_code_execution_view_result
5897
5898 - `content: string`
5899
5900 - `file_type: "text" or "image" or "pdf"`
5901
5902 - `"text"`
5903
5904 - `"image"`
5905
5906 - `"pdf"`
5907
5908 - `num_lines: number or null`
5909
5910 - `start_line: number or null`
5911
5912 - `total_lines: number or null`
5913
5914 - `TextEditorCodeExecutionCreateResultBlock object`
5915
5916 - `type: "text_editor_code_execution_create_result"`
5917
5918 default: text_editor_code_execution_create_result
5919
5920 - `is_file_update: boolean`
5921
5922 - `TextEditorCodeExecutionStrReplaceResultBlock object`
5923
5924 - `type: "text_editor_code_execution_str_replace_result"`
5925
5926 default: text_editor_code_execution_str_replace_result
5927
5928 - `lines: array of string or null`
5929
5930 - `new_lines: number or null`
5931
5932 - `new_start: number or null`
5933
5934 - `old_lines: number or null`
5935
5936 - `old_start: number or null`
58105937
58115938 - `tool_use_id: string`
58125939
58135940 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
58145941
5815 - `type: "bash_code_execution_tool_result"`
5816
5817 default: bash_code_execution_tool_result
5818
5819 - `TextEditorCodeExecutionToolResultBlock object`
5820
5821 - `content: TextEditorCodeExecutionToolResultError or TextEditorCodeExecutionViewResultBlock or TextEditorCodeExecutionCreateResultBlock or TextEditorCodeExecutionStrReplaceResultBlock`
5822
5823 - `TextEditorCodeExecutionToolResultError object`
5824
5825 - `error_code: TextEditorCodeExecutionToolResultErrorCode`
5942 - `ToolSearchToolResultBlock object`
5943
5944 - `type: "tool_search_tool_result"`
5945
5946 default: tool_search_tool_result
5947
5948 - `content: ToolSearchToolResultError or ToolSearchToolSearchResultBlock`
5949
5950 - `ToolSearchToolResultError object`
5951
5952 - `type: "tool_search_tool_result_error"`
5953
5954 default: tool_search_tool_result_error
5955
5956 - `error_code: ToolSearchToolResultErrorCode`
58265957
58275958 - `"invalid_tool_input"`
58285959
from line 5963
58325963
58335964 - `"execution_time_exceeded"`
58345965
5835 - `"file_not_found"`
5836
58375966 - `error_message: string or null`
58385967
5839 - `type: "text_editor_code_execution_tool_result_error"`
5840
5841 default: text_editor_code_execution_tool_result_error
5842
5843 - `TextEditorCodeExecutionViewResultBlock object`
5844
5845 - `content: string`
5846
5847 - `file_type: "text" or "image" or "pdf"`
5848
5849 - `"text"`
5850
5851 - `"image"`
5852
5853 - `"pdf"`
5854
5855 - `num_lines: number or null`
5856
5857 - `start_line: number or null`
5858
5859 - `total_lines: number or null`
5860
5861 - `type: "text_editor_code_execution_view_result"`
5862
5863 default: text_editor_code_execution_view_result
5864
5865 - `TextEditorCodeExecutionCreateResultBlock object`
5866
5867 - `is_file_update: boolean`
5868
5869 - `type: "text_editor_code_execution_create_result"`
5870
5871 default: text_editor_code_execution_create_result
5872
5873 - `TextEditorCodeExecutionStrReplaceResultBlock object`
5874
5875 - `lines: array of string or null`
5876
5877 - `new_lines: number or null`
5878
5879 - `new_start: number or null`
5880
5881 - `old_lines: number or null`
5882
5883 - `old_start: number or null`
5884
5885 - `type: "text_editor_code_execution_str_replace_result"`
5886
5887 default: text_editor_code_execution_str_replace_result
5968 - `ToolSearchToolSearchResultBlock object`
5969
5970 - `type: "tool_search_tool_search_result"`
5971
5972 default: tool_search_tool_search_result
5973
5974 - `tool_references: array of ToolReferenceBlock`
5975
5976 - `type: "tool_reference"`
5977
5978 default: tool_reference
5979
5980 - `tool_name: string`
5981
5982 maxLength: 256, minLength: 1, pattern: ^[a-zA-Z0-9_-]{1,256}$
58885983
58895984 - `tool_use_id: string`
58905985
58915986 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
58925987
5893 - `type: "text_editor_code_execution_tool_result"`
5894
5895 default: text_editor_code_execution_tool_result
5896
5897 - `ToolSearchToolResultBlock object`
5898
5899 - `content: ToolSearchToolResultError or ToolSearchToolSearchResultBlock`
5900
5901 - `ToolSearchToolResultError object`
5902
5903 - `error_code: ToolSearchToolResultErrorCode`
5904
5905 - `"invalid_tool_input"`
5906
5907 - `"unavailable"`
5908
5909 - `"too_many_requests"`
5910
5911 - `"execution_time_exceeded"`
5912
5913 - `error_message: string or null`
5914
5915 - `type: "tool_search_tool_result_error"`
5916
5917 default: tool_search_tool_result_error
5918
5919 - `ToolSearchToolSearchResultBlock object`
5920
5921 - `tool_references: array of ToolReferenceBlock`
5922
5923 - `tool_name: string`
5924
5925 maxLength: 256, minLength: 1, pattern: ^[a-zA-Z0-9_-]{1,256}$
5926
5927 - `type: "tool_reference"`
5928
5929 default: tool_reference
5930
5931 - `type: "tool_search_tool_search_result"`
5932
5933 default: tool_search_tool_search_result
5934
5935 - `tool_use_id: string`
5936
5937 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
5938
5939 - `type: "tool_search_tool_result"`
5940
5941 default: tool_search_tool_result
5942
59435988 - `ContainerUploadBlock object`
59445989
59455990 Response model for a file uploaded to the container.
59465991
5992 - `type: "container_upload"`
5993
5994 default: container_upload
5995
59475996 - `file_id: string`
59485997
5949 - `type: "container_upload"`
5950
5951 default: container_upload
5952
59535998 - `model: Model`
59545999
59556000 The model that will complete your prompt.
from line 6089
60446089
60456090 Structured information about a refusal.
60466091
6092 - `type: "refusal"`
6093
6094 default: refusal
6095
60476096 - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null`
60486097
60496098 The policy category that triggered a refusal.
from line 6122
60736122 Human-readable explanation of the refusal.
60746123
60756124 This text is not guaranteed to be stable. `null` when no explanation is available for the category.
6076
6077 - `type: "refusal"`
6078
6079 default: refusal
60806125
60816126 - `stop_reason: StopReason or null`
60826127
from line 6159
61146159
61156160 This value will be a non-null string if one of your custom stop sequences was generated.
61166161
6117 - `type: "message"`
6118
6119 Object type.
6120
6121 For Messages, this is always `"message"`.
6122
6123 default: message
6124
61256162 - `usage: Usage`
61266163
61276164 Billing and rate-limit usage.
from line 6263
62266263
62276264 - `"batch"`
62286265
6229 - `type: "succeeded"`
6230
6231 default: succeeded
6232
62336266 - `MessageBatchErroredResult object`
62346267
6268 - `type: "errored"`
6269
6270 default: errored
6271
62356272 - `error: ErrorResponse`
62366273
6274 - `type: "error"`
6275
6276 default: error
6277
62376278 - `error: ErrorObject`
62386279
62396280 - `InvalidRequestError object`
62406281
6282 - `type: "invalid_request_error"`
6283
6284 default: invalid_request_error
6285
62416286 - `message: string`
62426287
62436288 default: Invalid request
62446289
6245 - `type: "invalid_request_error"`
6246
6247 default: invalid_request_error
6248
62496290 - `AuthenticationError object`
62506291
6292 - `type: "authentication_error"`
6293
6294 default: authentication_error
6295
62516296 - `message: string`
62526297
62536298 default: Authentication error
62546299
6255 - `type: "authentication_error"`
6256
6257 default: authentication_error
6258
62596300 - `BillingError object`
62606301
6302 - `type: "billing_error"`
6303
6304 default: billing_error
6305
62616306 - `message: string`
62626307
62636308 default: Billing error
62646309
6265 - `type: "billing_error"`
6266
6267 default: billing_error
6268
62696310 - `PermissionError object`
62706311
6312 - `type: "permission_error"`
6313
6314 default: permission_error
6315
62716316 - `message: string`
62726317
62736318 default: Permission denied
62746319
6275 - `type: "permission_error"`
6276
6277 default: permission_error
6278
62796320 - `NotFoundError object`
62806321
6322 - `type: "not_found_error"`
6323
6324 default: not_found_error
6325
62816326 - `message: string`
62826327
62836328 default: Not found
62846329
6285 - `type: "not_found_error"`
6286
6287 default: not_found_error
6288
62896330 - `RateLimitError object`
62906331
6332 - `type: "rate_limit_error"`
6333
6334 default: rate_limit_error
6335
62916336 - `message: string`
62926337
62936338 default: Rate limited
62946339
6295 - `type: "rate_limit_error"`
6296
6297 default: rate_limit_error
6298
62996340 - `GatewayTimeoutError object`
63006341
6342 - `type: "timeout_error"`
6343
6344 default: timeout_error
6345
63016346 - `message: string`
63026347
63036348 default: Request timeout
63046349
6305 - `type: "timeout_error"`
6306
6307 default: timeout_error
6308
63096350 - `APIErrorObject object`
63106351
6352 - `type: "api_error"`
6353
6354 default: api_error
6355
63116356 - `message: string`
63126357
63136358 default: Internal server error
63146359
6315 - `type: "api_error"`
6316
6317 default: api_error
6318
63196360 - `OverloadedError object`
63206361
6362 - `type: "overloaded_error"`
6363
6364 default: overloaded_error
6365
63216366 - `message: string`
63226367
63236368 default: Overloaded
63246369
6325 - `type: "overloaded_error"`
6326
6327 default: overloaded_error
6328
63296370 - `request_id: string or null`
63306371
6331 - `type: "error"`
6332
6333 default: error
6334
6335 - `type: "errored"`
6336
6337 default: errored
6338
63396372 - `MessageBatchCanceledResult object`
63406373
63416374 - `type: "canceled"`
from line 6433
64006433
64016434 - `MessageBatchSucceededResult object`
64026435
6436 - `type: "succeeded"`
6437
6438 default: succeeded
6439
64036440 - `message: Message`
64046441
6442 - `type: "message"`
6443
6444 Object type.
6445
6446 For Messages, this is always `"message"`.
6447
6448 default: message
6449
64056450 - `id: string`
64066451
64076452 Unique object identifier.
from line 6471
64266471
64276472 Skills loaded in the container
64286473
6474 - `type: "anthropic" or "custom"`
6475
6476 Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
6477
6478 - `"anthropic"`
6479
6480 - `"custom"`
6481
64296482 - `skill_id: string`
64306483
64316484 Skill ID
64326485
64336486 maxLength: 64, minLength: 1
6434
6435 - `type: "anthropic" or "custom"`
6436
6437 Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
6438
6439 - `"anthropic"`
6440
6441 - `"custom"`
64426487
64436488 - `version: string`
64446489
from line 6522
64776522
64786523 - `TextBlock object`
64796524
6525 - `type: "text"`
6526
6527 default: text
6528
64806529 - `citations: array of TextCitation or null`
64816530
64826531 Citations supporting the text block.
from line 6534
64856534
64866535 - `CitationCharLocation object`
64876536
6537 - `type: "char_location"`
6538
6539 default: char_location
6540
64886541 - `cited_text: string`
64896542
64906543 - `document_index: number`
from line 6554
65016554
65026555 minimum: 0
65036556
6504 - `type: "char_location"`
6505
6506 default: char_location
6507
65086557 - `CitationPageLocation object`
65096558
6559 - `type: "page_location"`
6560
6561 default: page_location
6562
65106563 - `cited_text: string`
65116564
65126565 - `document_index: number`
from line 6576
65236576
65246577 minimum: 1
65256578
6526 - `type: "page_location"`
6527
6528 default: page_location
6529
65306579 - `CitationContentBlockLocation object`
65316580
6581 - `type: "content_block_location"`
6582
6583 default: content_block_location
6584
65326585 - `cited_text: string`
65336586
65346587 The full text of the cited block range, concatenated.
from line 6608
65556608
65566609 minimum: 0
65576610
6558 - `type: "content_block_location"`
6559
6560 default: content_block_location
6561
65626611 - `CitationsWebSearchResultLocation object`
65636612
6613 - `type: "web_search_result_location"`
6614
6615 default: web_search_result_location
6616
65646617 - `cited_text: string`
65656618
65666619 - `encrypted_index: string`
from line 6622
65696622
65706623 maxLength: 512
65716624
6572 - `type: "web_search_result_location"`
6573
6574 default: web_search_result_location
6575
65766625 - `url: string`
65776626
65786627 - `CitationsSearchResultLocation object`
65796628
6629 - `type: "search_result_location"`
6630
6631 default: search_result_location
6632
65806633 - `cited_text: string`
65816634
65826635 The full text of the cited block range, concatenated.
from line 6660
66076660
66086661 - `title: string or null`
66096662
6610 - `type: "search_result_location"`
6611
6612 default: search_result_location
6613
66146663 - `text: string`
66156664
6616 maxLength: 5000000, minLength: 0
6617
6618 - `type: "text"`
6619
6620 default: text
6665 minLength: 0
66216666
66226667 - `ThinkingBlock object`
66236668
6669 - `type: "thinking"`
6670
6671 default: thinking
6672
66246673 - `signature: string`
66256674
66266675 A value used to verify that this thinking block was generated by Claude when it is passed back to the API.
from line 6682
66336682
66346683 The text of Claude's thinking process for this block.
66356684
6636 - `type: "thinking"`
6637
6638 default: thinking
6639
66406685 - `RedactedThinkingBlock object`
66416686
6687 - `type: "redacted_thinking"`
6688
6689 default: redacted_thinking
6690
66426691 - `data: string`
66436692
66446693 The contents of this redacted thinking block, returned when portions of the model's thinking were safety-redacted. This field is opaque and encrypted, with no readable content.
from line 6696
66476696
66486697 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details.
66496698
6650 - `type: "redacted_thinking"`
6651
6652 default: redacted_thinking
6653
66546699 - `ToolUseBlock object`
66556700
6701 - `type: "tool_use"`
6702
6703 default: tool_use
6704
66566705 - `id: string`
66576706
66586707 pattern: ^[a-zA-Z0-9_-]+$
from line 6722
66736722
66746723 Tool invocation generated by a server-side tool.
66756724
6725 - `type: "code_execution_20250825"`
6726
66766727 - `tool_id: string`
66776728
66786729 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
66796730
6680 - `type: "code_execution_20250825"`
6681
66826731 - `ServerToolCaller20260120 object`
66836732
6733 - `type: "code_execution_20260120"`
6734
66846735 - `tool_id: string`
66856736
66866737 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
66876738
6688 - `type: "code_execution_20260120"`
6689
66906739 - `input: map[unknown]`
66916740
66926741 - `name: string`
66936742
66946743 minLength: 1
66956744
6696 - `type: "tool_use"`
6697
6698 default: tool_use
6699
67006745 - `toolset_name: optional string or null`
67016746
67026747 For a toolset member tool_use, the toolset family.
from line 6750
67056750
67066751 - `ServerToolUseBlock object`
67076752
6753 - `type: "server_tool_use"`
6754
6755 default: server_tool_use
6756
67086757 - `id: string`
67096758
67106759 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
from line 6792
67436792
67446793 - `"tool_search_tool_bm25"`
67456794
6746 - `type: "server_tool_use"`
6747
6748 default: server_tool_use
6749
67506795 - `WebSearchToolResultBlock object`
67516796
6797 - `type: "web_search_tool_result"`
6798
6799 default: web_search_tool_result
6800
67526801 - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120`
67536802
67546803 Tool invocation directly from the model.
from line 6818
67696818
67706819 - `WebSearchToolResultError object`
67716820
6821 - `type: "web_search_tool_result_error"`
6822
6823 default: web_search_tool_result_error
6824
67726825 - `error_code: WebSearchToolResultErrorCode`
67736826
67746827 - `"invalid_tool_input"`
from line 6836
67836836
67846837 - `"request_too_large"`
67856838
6786 - `type: "web_search_tool_result_error"`
6787
6788 default: web_search_tool_result_error
6789
67906839 - `array of WebSearchResultBlock`
67916840
6841 - `type: "web_search_result"`
6842
6843 default: web_search_result
6844
67926845 - `encrypted_content: string`
67936846
67946847 - `page_age: string or null`
67956848
67966849 - `title: string`
67976850
6798 - `type: "web_search_result"`
6799
6800 default: web_search_result
6801
68026851 - `url: string`
68036852
68046853 - `tool_use_id: string`
68056854
68066855 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
68076856
6808 - `type: "web_search_tool_result"`
6809
6810 default: web_search_tool_result
6811
68126857 - `WebFetchToolResultBlock object`
68136858
6859 - `type: "web_fetch_tool_result"`
6860
6861 default: web_fetch_tool_result
6862
68146863 - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120`
68156864
68166865 Tool invocation directly from the model.
from line 6880
68316880
68326881 - `WebFetchToolResultErrorBlock object`
68336882
6883 - `type: "web_fetch_tool_result_error"`
6884
6885 default: web_fetch_tool_result_error
6886
68346887 - `error_code: WebFetchToolResultErrorCode`
68356888
68366889 - `"invalid_tool_input"`
from line 6904
68516904
68526905 - `"unavailable"`
68536906
6854 - `type: "web_fetch_tool_result_error"`
6855
6856 default: web_fetch_tool_result_error
6907 - `"content_too_large"`
68576908
68586909 - `WebFetchBlock object`
68596910
6911 - `type: "web_fetch_result"`
6912
6913 default: web_fetch_result
6914
68606915 - `content: DocumentBlock`
68616916
6917 - `type: "document"`
6918
6919 default: document
6920
68626921 - `citations: CitationsConfig or null`
68636922
68646923 Citation configuration for the document
from line 6930
68716930
68726931 - `Base64PDFSource object`
68736932
6933 - `type: "base64"`
6934
68746935 - `data: string`
68756936
68766937 format: byte
68776938
68786939 - `media_type: "application/pdf"`
68796940
6880 - `type: "base64"`
6881
68826941 - `PlainTextSource object`
68836942
6943 - `type: "text"`
6944
68846945 - `data: string`
68856946
68866947 - `media_type: "text/plain"`
68876948
6888 - `type: "text"`
6889
68906949 - `title: string or null`
68916950
68926951 The title of the document
68936952
6894 - `type: "document"`
6895
6896 default: document
6897
68986953 - `retrieved_at: string or null`
68996954
69006955 ISO 8601 timestamp when the content was retrieved
69016956
6902 - `type: "web_fetch_result"`
6903
6904 default: web_fetch_result
6905
69066957 - `url: string`
69076958
69086959 Fetched content URL
from line 6962
69116962
69126963 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
69136964
6914 - `type: "web_fetch_tool_result"`
6915
6916 default: web_fetch_tool_result
6917
69186965 - `CodeExecutionToolResultBlock object`
69196966
6967 - `type: "code_execution_tool_result"`
6968
6969 default: code_execution_tool_result
6970
69206971 - `content: CodeExecutionToolResultBlockContent`
69216972
69226973 Code execution result with encrypted stdout for PFC + web_search results.
69236974
69246975 - `CodeExecutionToolResultError object`
69256976
6977 - `type: "code_execution_tool_result_error"`
6978
6979 default: code_execution_tool_result_error
6980
69266981 - `error_code: CodeExecutionToolResultErrorCode`
69276982
69286983 - `"invalid_tool_input"`
from line 6988
69336988
69346989 - `"execution_time_exceeded"`
69356990
6936 - `type: "code_execution_tool_result_error"`
6937
6938 default: code_execution_tool_result_error
6939
69406991 - `CodeExecutionResultBlock object`
69416992
6993 - `type: "code_execution_result"`
6994
6995 default: code_execution_result
6996
69426997 - `content: array of CodeExecutionOutputBlock`
69436998
6999 - `type: "code_execution_output"`
7000
7001 default: code_execution_output
7002
69447003 - `file_id: string`
69457004
7005 - `return_code: number`
7006
7007 - `stderr: string`
7008
7009 - `stdout: string`
7010
7011 - `EncryptedCodeExecutionResultBlock object`
7012
7013 Code execution result with encrypted stdout for PFC + web_search results.
7014
7015 - `type: "encrypted_code_execution_result"`
7016
7017 default: encrypted_code_execution_result
7018
7019 - `content: array of CodeExecutionOutputBlock`
7020
69467021 - `type: "code_execution_output"`
69477022
69487023 default: code_execution_output
69497024
7025 - `file_id: string`
7026
7027 - `encrypted_stdout: string`
7028
69507029 - `return_code: number`
69517030
69527031 - `stderr: string`
69537032
7033 - `tool_use_id: string`
7034
7035 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
7036
7037 - `BashCodeExecutionToolResultBlock object`
7038
7039 - `type: "bash_code_execution_tool_result"`
7040
7041 default: bash_code_execution_tool_result
7042
7043 - `content: BashCodeExecutionToolResultError or BashCodeExecutionResultBlock`
7044
7045 - `BashCodeExecutionToolResultError object`
7046
7047 - `type: "bash_code_execution_tool_result_error"`
7048
7049 default: bash_code_execution_tool_result_error
7050
7051 - `error_code: BashCodeExecutionToolResultErrorCode`
7052
7053 - `"invalid_tool_input"`
7054
7055 - `"unavailable"`
7056
7057 - `"too_many_requests"`
7058
7059 - `"execution_time_exceeded"`
7060
7061 - `"output_file_too_large"`
7062
7063 - `BashCodeExecutionResultBlock object`
7064
7065 - `type: "bash_code_execution_result"`
7066
7067 default: bash_code_execution_result
7068
7069 - `content: array of BashCodeExecutionOutputBlock`
7070
7071 - `type: "bash_code_execution_output"`
7072
7073 default: bash_code_execution_output
7074
7075 - `file_id: string`
7076
7077 - `return_code: number`
7078
7079 - `stderr: string`
7080
69547081 - `stdout: string`
69557082
6956 - `type: "code_execution_result"`
6957
6958 default: code_execution_result
6959
6960 - `EncryptedCodeExecutionResultBlock object`
6961
6962 Code execution result with encrypted stdout for PFC + web_search results.
6963
6964 - `content: array of CodeExecutionOutputBlock`
6965
6966 - `file_id: string`
6967
6968 - `type: "code_execution_output"`
6969
6970 default: code_execution_output
6971
6972 - `encrypted_stdout: string`
6973
6974 - `return_code: number`
6975
6976 - `stderr: string`
6977
6978 - `type: "encrypted_code_execution_result"`
6979
6980 default: encrypted_code_execution_result
6981
69827083 - `tool_use_id: string`
69837084
69847085 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
69857086
6986 - `type: "code_execution_tool_result"`
6987
6988 default: code_execution_tool_result
6989
6990 - `BashCodeExecutionToolResultBlock object`
6991
6992 - `content: BashCodeExecutionToolResultError or BashCodeExecutionResultBlock`
6993
6994 - `BashCodeExecutionToolResultError object`
6995
6996 - `error_code: BashCodeExecutionToolResultErrorCode`
7087 - `TextEditorCodeExecutionToolResultBlock object`
7088
7089 - `type: "text_editor_code_execution_tool_result"`
7090
7091 default: text_editor_code_execution_tool_result
7092
7093 - `content: TextEditorCodeExecutionToolResultError or TextEditorCodeExecutionViewResultBlock or TextEditorCodeExecutionCreateResultBlock or TextEditorCodeExecutionStrReplaceResultBlock`
7094
7095 - `TextEditorCodeExecutionToolResultError object`
7096
7097 - `type: "text_editor_code_execution_tool_result_error"`
7098
7099 default: text_editor_code_execution_tool_result_error
7100
7101 - `error_code: TextEditorCodeExecutionToolResultErrorCode`
69977102
69987103 - `"invalid_tool_input"`
69997104
from line 7108
70037108
70047109 - `"execution_time_exceeded"`
70057110
7006 - `"output_file_too_large"`
7007
7008 - `type: "bash_code_execution_tool_result_error"`
7009
7010 default: bash_code_execution_tool_result_error
7011
7012 - `BashCodeExecutionResultBlock object`
7013
7014 - `content: array of BashCodeExecutionOutputBlock`
7015
7016 - `file_id: string`
7017
7018 - `type: "bash_code_execution_output"`
7019
7020 default: bash_code_execution_output
7021
7022 - `return_code: number`
7023
7024 - `stderr: string`
7025
7026 - `stdout: string`
7027
7028 - `type: "bash_code_execution_result"`
7029
7030 default: bash_code_execution_result
7111 - `"file_not_found"`
7112
7113 - `error_message: string or null`
7114
7115 - `TextEditorCodeExecutionViewResultBlock object`
7116
7117 - `type: "text_editor_code_execution_view_result"`
7118
7119 default: text_editor_code_execution_view_result
7120
7121 - `content: string`
7122
7123 - `file_type: "text" or "image" or "pdf"`
7124
7125 - `"text"`
7126
7127 - `"image"`
7128
7129 - `"pdf"`
7130
7131 - `num_lines: number or null`
7132
7133 - `start_line: number or null`
7134
7135 - `total_lines: number or null`
7136
7137 - `TextEditorCodeExecutionCreateResultBlock object`
7138
7139 - `type: "text_editor_code_execution_create_result"`
7140
7141 default: text_editor_code_execution_create_result
7142
7143 - `is_file_update: boolean`
7144
7145 - `TextEditorCodeExecutionStrReplaceResultBlock object`
7146
7147 - `type: "text_editor_code_execution_str_replace_result"`
7148
7149 default: text_editor_code_execution_str_replace_result
7150
7151 - `lines: array of string or null`
7152
7153 - `new_lines: number or null`
7154
7155 - `new_start: number or null`
7156
7157 - `old_lines: number or null`
7158
7159 - `old_start: number or null`
70317160
70327161 - `tool_use_id: string`
70337162
70347163 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
70357164
7036 - `type: "bash_code_execution_tool_result"`
7037
7038 default: bash_code_execution_tool_result
7039
7040 - `TextEditorCodeExecutionToolResultBlock object`
7041
7042 - `content: TextEditorCodeExecutionToolResultError or TextEditorCodeExecutionViewResultBlock or TextEditorCodeExecutionCreateResultBlock or TextEditorCodeExecutionStrReplaceResultBlock`
7043
7044 - `TextEditorCodeExecutionToolResultError object`
7045
7046 - `error_code: TextEditorCodeExecutionToolResultErrorCode`
7165 - `ToolSearchToolResultBlock object`
7166
7167 - `type: "tool_search_tool_result"`
7168
7169 default: tool_search_tool_result
7170
7171 - `content: ToolSearchToolResultError or ToolSearchToolSearchResultBlock`
7172
7173 - `ToolSearchToolResultError object`
7174
7175 - `type: "tool_search_tool_result_error"`
7176
7177 default: tool_search_tool_result_error
7178
7179 - `error_code: ToolSearchToolResultErrorCode`
70477180
70487181 - `"invalid_tool_input"`
70497182
from line 7186
70537186
70547187 - `"execution_time_exceeded"`
70557188
7056 - `"file_not_found"`
7057
70587189 - `error_message: string or null`
70597190
7060 - `type: "text_editor_code_execution_tool_result_error"`
7061
7062 default: text_editor_code_execution_tool_result_error
7063
7064 - `TextEditorCodeExecutionViewResultBlock object`
7065
7066 - `content: string`
7067
7068 - `file_type: "text" or "image" or "pdf"`
7069
7070 - `"text"`
7071
7072 - `"image"`
7073
7074 - `"pdf"`
7075
7076 - `num_lines: number or null`
7077
7078 - `start_line: number or null`
7079
7080 - `total_lines: number or null`
7081
7082 - `type: "text_editor_code_execution_view_result"`
7083
7084 default: text_editor_code_execution_view_result
7085
7086 - `TextEditorCodeExecutionCreateResultBlock object`
7087
7088 - `is_file_update: boolean`
7089
7090 - `type: "text_editor_code_execution_create_result"`
7091
7092 default: text_editor_code_execution_create_result
7093
7094 - `TextEditorCodeExecutionStrReplaceResultBlock object`
7095
7096 - `lines: array of string or null`
7097
7098 - `new_lines: number or null`
7099
7100 - `new_start: number or null`
7101
7102 - `old_lines: number or null`
7103
7104 - `old_start: number or null`
7105
7106 - `type: "text_editor_code_execution_str_replace_result"`
7107
7108 default: text_editor_code_execution_str_replace_result
7191 - `ToolSearchToolSearchResultBlock object`
7192
7193 - `type: "tool_search_tool_search_result"`
7194
7195 default: tool_search_tool_search_result
7196
7197 - `tool_references: array of ToolReferenceBlock`
7198
7199 - `type: "tool_reference"`
7200
7201 default: tool_reference
7202
7203 - `tool_name: string`
7204
7205 maxLength: 256, minLength: 1, pattern: ^[a-zA-Z0-9_-]{1,256}$
71097206
71107207 - `tool_use_id: string`
71117208
71127209 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
71137210
7114 - `type: "text_editor_code_execution_tool_result"`
7115
7116 default: text_editor_code_execution_tool_result
7117
7118 - `ToolSearchToolResultBlock object`
7119
7120 - `content: ToolSearchToolResultError or ToolSearchToolSearchResultBlock`
7121
7122 - `ToolSearchToolResultError object`
7123
7124 - `error_code: ToolSearchToolResultErrorCode`
7125
7126 - `"invalid_tool_input"`
7127
7128 - `"unavailable"`
7129
7130 - `"too_many_requests"`
7131
7132 - `"execution_time_exceeded"`
7133
7134 - `error_message: string or null`
7135
7136 - `type: "tool_search_tool_result_error"`
7137
7138 default: tool_search_tool_result_error
7139
7140 - `ToolSearchToolSearchResultBlock object`
7141
7142 - `tool_references: array of ToolReferenceBlock`
7143
7144 - `tool_name: string`
7145
7146 maxLength: 256, minLength: 1, pattern: ^[a-zA-Z0-9_-]{1,256}$
7147
7148 - `type: "tool_reference"`
7149
7150 default: tool_reference
7151
7152 - `type: "tool_search_tool_search_result"`
7153
7154 default: tool_search_tool_search_result
7155
7156 - `tool_use_id: string`
7157
7158 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
7159
7160 - `type: "tool_search_tool_result"`
7161
7162 default: tool_search_tool_result
7163
71647211 - `ContainerUploadBlock object`
71657212
71667213 Response model for a file uploaded to the container.
71677214
7215 - `type: "container_upload"`
7216
7217 default: container_upload
7218
71687219 - `file_id: string`
71697220
7170 - `type: "container_upload"`
7171
7172 default: container_upload
7173
71747221 - `model: Model`
71757222
71767223 The model that will complete your prompt.
from line 7312
72657312
72667313 Structured information about a refusal.
72677314
7315 - `type: "refusal"`
7316
7317 default: refusal
7318
72687319 - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null`
72697320
72707321 The policy category that triggered a refusal.
from line 7345
72947345 Human-readable explanation of the refusal.
72957346
72967347 This text is not guaranteed to be stable. `null` when no explanation is available for the category.
7297
7298 - `type: "refusal"`
7299
7300 default: refusal
73017348
73027349 - `stop_reason: StopReason or null`
73037350
from line 7382
73357382
73367383 This value will be a non-null string if one of your custom stop sequences was generated.
73377384
7338 - `type: "message"`
7339
7340 Object type.
7341
7342 For Messages, this is always `"message"`.
7343
7344 default: message
7345
73467385 - `usage: Usage`
73477386
73487387 Billing and rate-limit usage.
from line 7486
74477486
74487487 - `"batch"`
74497488
7450 - `type: "succeeded"`
7451
7452 default: succeeded
7453
74547489 - `MessageBatchErroredResult object`
74557490
7491 - `type: "errored"`
7492
7493 default: errored
7494
74567495 - `error: ErrorResponse`
74577496
7497 - `type: "error"`
7498
7499 default: error
7500
74587501 - `error: ErrorObject`
74597502
74607503 - `InvalidRequestError object`
74617504
7505 - `type: "invalid_request_error"`
7506
7507 default: invalid_request_error
7508
74627509 - `message: string`
74637510
74647511 default: Invalid request
74657512
7466 - `type: "invalid_request_error"`
7467
7468 default: invalid_request_error
7469
74707513 - `AuthenticationError object`
74717514
7515 - `type: "authentication_error"`
7516
7517 default: authentication_error
7518
74727519 - `message: string`
74737520
74747521 default: Authentication error
74757522
7476 - `type: "authentication_error"`
7477
7478 default: authentication_error
7479
74807523 - `BillingError object`
74817524
7525 - `type: "billing_error"`
7526
7527 default: billing_error
7528
74827529 - `message: string`
74837530
74847531 default: Billing error
74857532
7486 - `type: "billing_error"`
7487
7488 default: billing_error
7489
74907533 - `PermissionError object`
74917534
7535 - `type: "permission_error"`
7536
7537 default: permission_error
7538
74927539 - `message: string`
74937540
74947541 default: Permission denied
74957542
7496 - `type: "permission_error"`
7497
7498 default: permission_error
7499
75007543 - `NotFoundError object`
75017544
7545 - `type: "not_found_error"`
7546
7547 default: not_found_error
7548
75027549 - `message: string`
75037550
75047551 default: Not found
75057552
7506 - `type: "not_found_error"`
7507
7508 default: not_found_error
7509
75107553 - `RateLimitError object`
75117554
7555 - `type: "rate_limit_error"`
7556
7557 default: rate_limit_error
7558
75127559 - `message: string`
75137560
75147561 default: Rate limited
75157562
7516 - `type: "rate_limit_error"`
7517
7518 default: rate_limit_error
7519
75207563 - `GatewayTimeoutError object`
75217564
7565 - `type: "timeout_error"`
7566
7567 default: timeout_error
7568
75227569 - `message: string`
75237570
75247571 default: Request timeout
75257572
7526 - `type: "timeout_error"`
7527
7528 default: timeout_error
7529
75307573 - `APIErrorObject object`
75317574
7575 - `type: "api_error"`
7576
7577 default: api_error
7578
75327579 - `message: string`
75337580
75347581 default: Internal server error
75357582
7536 - `type: "api_error"`
7537
7538 default: api_error
7539
75407583 - `OverloadedError object`
75417584
7585 - `type: "overloaded_error"`
7586
7587 default: overloaded_error
7588
75427589 - `message: string`
75437590
75447591 default: Overloaded
75457592
7546 - `type: "overloaded_error"`
7547
7548 default: overloaded_error
7549
75507593 - `request_id: string or null`
75517594
7552 - `type: "error"`
7553
7554 default: error
7555
7556 - `type: "errored"`
7557
7558 default: errored
7559
75607595 - `MessageBatchCanceledResult object`
75617596
75627597 - `type: "canceled"`
from line 7608
75737608
75747609- `MessageBatchSucceededResult object`
75757610
7611 - `type: "succeeded"`
7612
7613 default: succeeded
7614
75767615 - `message: Message`
75777616
7617 - `type: "message"`
7618
7619 Object type.
7620
7621 For Messages, this is always `"message"`.
7622
7623 default: message
7624
75787625 - `id: string`
75797626
75807627 Unique object identifier.
from line 7646
75997646
76007647 Skills loaded in the container
76017648
7649 - `type: "anthropic" or "custom"`
7650
7651 Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
7652
7653 - `"anthropic"`
7654
7655 - `"custom"`
7656
76027657 - `skill_id: string`
76037658
76047659 Skill ID
76057660
76067661 maxLength: 64, minLength: 1
7607
7608 - `type: "anthropic" or "custom"`
7609
7610 Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
7611
7612 - `"anthropic"`
7613
7614 - `"custom"`
76157662
76167663 - `version: string`
76177664
from line 7697
76507697
76517698 - `TextBlock object`
76527699
7700 - `type: "text"`
7701
7702 default: text
7703
76537704 - `citations: array of TextCitation or null`
76547705
76557706 Citations supporting the text block.
from line 7709
76587709
76597710 - `CitationCharLocation object`
76607711
7712 - `type: "char_location"`
7713
7714 default: char_location
7715
76617716 - `cited_text: string`
76627717
76637718 - `document_index: number`
from line 7729
76747729
76757730 minimum: 0
76767731
7677 - `type: "char_location"`
7678
7679 default: char_location
7680
76817732 - `CitationPageLocation object`
76827733
7734 - `type: "page_location"`
7735
7736 default: page_location
7737
76837738 - `cited_text: string`
76847739
76857740 - `document_index: number`
from line 7751
76967751
76977752 minimum: 1
76987753
7699 - `type: "page_location"`
7700
7701 default: page_location
7702
77037754 - `CitationContentBlockLocation object`
77047755
7756 - `type: "content_block_location"`
7757
7758 default: content_block_location
7759
77057760 - `cited_text: string`
77067761
77077762 The full text of the cited block range, concatenated.
from line 7783
77287783
77297784 minimum: 0
77307785
7731 - `type: "content_block_location"`
7732
7733 default: content_block_location
7734
77357786 - `CitationsWebSearchResultLocation object`
77367787
7788 - `type: "web_search_result_location"`
7789
7790 default: web_search_result_location
7791
77377792 - `cited_text: string`
77387793
77397794 - `encrypted_index: string`
from line 7797
77427797
77437798 maxLength: 512
77447799
7745 - `type: "web_search_result_location"`
7746
7747 default: web_search_result_location
7748
77497800 - `url: string`
77507801
77517802 - `CitationsSearchResultLocation object`
77527803
7804 - `type: "search_result_location"`
7805
7806 default: search_result_location
7807
77537808 - `cited_text: string`
77547809
77557810 The full text of the cited block range, concatenated.
from line 7835
77807835
77817836 - `title: string or null`
77827837
7783 - `type: "search_result_location"`
7784
7785 default: search_result_location
7786
77877838 - `text: string`
77887839
7789 maxLength: 5000000, minLength: 0
7790
7791 - `type: "text"`
7792
7793 default: text
7840 minLength: 0
77947841
77957842 - `ThinkingBlock object`
77967843
7844 - `type: "thinking"`
7845
7846 default: thinking
7847
77977848 - `signature: string`
77987849
77997850 A value used to verify that this thinking block was generated by Claude when it is passed back to the API.
from line 7857
78067857
78077858 The text of Claude's thinking process for this block.
78087859
7809 - `type: "thinking"`
7810
7811 default: thinking
7812
78137860 - `RedactedThinkingBlock object`
78147861
7862 - `type: "redacted_thinking"`
7863
7864 default: redacted_thinking
7865
78157866 - `data: string`
78167867
78177868 The contents of this redacted thinking block, returned when portions of the model's thinking were safety-redacted. This field is opaque and encrypted, with no readable content.
from line 7871
78207871
78217872 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details.
78227873
7823 - `type: "redacted_thinking"`
7824
7825 default: redacted_thinking
7826
78277874 - `ToolUseBlock object`
78287875
7876 - `type: "tool_use"`
7877
7878 default: tool_use
7879
78297880 - `id: string`
78307881
78317882 pattern: ^[a-zA-Z0-9_-]+$
from line 7897
78467897
78477898 Tool invocation generated by a server-side tool.
78487899
7900 - `type: "code_execution_20250825"`
7901
78497902 - `tool_id: string`
78507903
78517904 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
78527905
7853 - `type: "code_execution_20250825"`
7854
78557906 - `ServerToolCaller20260120 object`
78567907
7908 - `type: "code_execution_20260120"`
7909
78577910 - `tool_id: string`
78587911
78597912 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
78607913
7861 - `type: "code_execution_20260120"`
7862
78637914 - `input: map[unknown]`
78647915
78657916 - `name: string`
78667917
78677918 minLength: 1
78687919
7869 - `type: "tool_use"`
7870
7871 default: tool_use
7872
78737920 - `toolset_name: optional string or null`
78747921
78757922 For a toolset member tool_use, the toolset family.
from line 7925
78787925
78797926 - `ServerToolUseBlock object`
78807927
7928 - `type: "server_tool_use"`
7929
7930 default: server_tool_use
7931
78817932 - `id: string`
78827933
78837934 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
from line 7967
79167967
79177968 - `"tool_search_tool_bm25"`
79187969
7919 - `type: "server_tool_use"`
7920
7921 default: server_tool_use
7922
79237970 - `WebSearchToolResultBlock object`
79247971
7972 - `type: "web_search_tool_result"`
7973
7974 default: web_search_tool_result
7975
79257976 - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120`
79267977
79277978 Tool invocation directly from the model.
from line 7993
79427993
79437994 - `WebSearchToolResultError object`
79447995
7996 - `type: "web_search_tool_result_error"`
7997
7998 default: web_search_tool_result_error
7999
79458000 - `error_code: WebSearchToolResultErrorCode`
79468001
79478002 - `"invalid_tool_input"`
from line 8011
79568011
79578012 - `"request_too_large"`
79588013
7959 - `type: "web_search_tool_result_error"`
7960
7961 default: web_search_tool_result_error
7962
79638014 - `array of WebSearchResultBlock`
79648015
8016 - `type: "web_search_result"`
8017
8018 default: web_search_result
8019
79658020 - `encrypted_content: string`
79668021
79678022 - `page_age: string or null`
79688023
79698024 - `title: string`
79708025
7971 - `type: "web_search_result"`
7972
7973 default: web_search_result
7974
79758026 - `url: string`
79768027
79778028 - `tool_use_id: string`
79788029
79798030 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
79808031
7981 - `type: "web_search_tool_result"`
7982
7983 default: web_search_tool_result
7984
79858032 - `WebFetchToolResultBlock object`
79868033
8034 - `type: "web_fetch_tool_result"`
8035
8036 default: web_fetch_tool_result
8037
79878038 - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120`
79888039
79898040 Tool invocation directly from the model.
from line 8055
80048055
80058056 - `WebFetchToolResultErrorBlock object`
80068057
8058 - `type: "web_fetch_tool_result_error"`
8059
8060 default: web_fetch_tool_result_error
8061
80078062 - `error_code: WebFetchToolResultErrorCode`
80088063
80098064 - `"invalid_tool_input"`
from line 8079
80248079
80258080 - `"unavailable"`
80268081
8027 - `type: "web_fetch_tool_result_error"`
8028
8029 default: web_fetch_tool_result_error
8082 - `"content_too_large"`
80308083
80318084 - `WebFetchBlock object`
80328085
8086 - `type: "web_fetch_result"`
8087
8088 default: web_fetch_result
8089
80338090 - `content: DocumentBlock`
80348091
8092 - `type: "document"`
8093
8094 default: document
8095
80358096 - `citations: CitationsConfig or null`
80368097
80378098 Citation configuration for the document
from line 8105
80448105
80458106 - `Base64PDFSource object`
80468107
8108 - `type: "base64"`
8109
80478110 - `data: string`
80488111
80498112 format: byte
80508113
80518114 - `media_type: "application/pdf"`
80528115
8053 - `type: "base64"`
8054
80558116 - `PlainTextSource object`
80568117
8118 - `type: "text"`
8119
80578120 - `data: string`
80588121
80598122 - `media_type: "text/plain"`
80608123
8061 - `type: "text"`
8062
80638124 - `title: string or null`
80648125
80658126 The title of the document
80668127
8067 - `type: "document"`
8068
8069 default: document
8070
80718128 - `retrieved_at: string or null`
80728129
80738130 ISO 8601 timestamp when the content was retrieved
80748131
8075 - `type: "web_fetch_result"`
8076
8077 default: web_fetch_result
8078
80798132 - `url: string`
80808133
80818134 Fetched content URL
from line 8137
80848137
80858138 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
80868139
8087 - `type: "web_fetch_tool_result"`
8088
8089 default: web_fetch_tool_result
8090
80918140 - `CodeExecutionToolResultBlock object`
80928141
8142 - `type: "code_execution_tool_result"`
8143
8144 default: code_execution_tool_result
8145
80938146 - `content: CodeExecutionToolResultBlockContent`
80948147
80958148 Code execution result with encrypted stdout for PFC + web_search results.
80968149
80978150 - `CodeExecutionToolResultError object`
80988151
8152 - `type: "code_execution_tool_result_error"`
8153
8154 default: code_execution_tool_result_error
8155
80998156 - `error_code: CodeExecutionToolResultErrorCode`
81008157
81018158 - `"invalid_tool_input"`
from line 8163
81068163
81078164 - `"execution_time_exceeded"`
81088165
8109 - `type: "code_execution_tool_result_error"`
8110
8111 default: code_execution_tool_result_error
8112
81138166 - `CodeExecutionResultBlock object`
81148167
8168 - `type: "code_execution_result"`
8169
8170 default: code_execution_result
8171
81158172 - `content: array of CodeExecutionOutputBlock`
81168173
8174 - `type: "code_execution_output"`
8175
8176 default: code_execution_output
8177
81178178 - `file_id: string`
81188179
8180 - `return_code: number`
8181
8182 - `stderr: string`
8183
8184 - `stdout: string`
8185
8186 - `EncryptedCodeExecutionResultBlock object`
8187
8188 Code execution result with encrypted stdout for PFC + web_search results.
8189
8190 - `type: "encrypted_code_execution_result"`
8191
8192 default: encrypted_code_execution_result
8193
8194 - `content: array of CodeExecutionOutputBlock`
8195
81198196 - `type: "code_execution_output"`
81208197
81218198 default: code_execution_output
81228199
8200 - `file_id: string`
8201
8202 - `encrypted_stdout: string`
8203
81238204 - `return_code: number`
81248205
81258206 - `stderr: string`
81268207
8208 - `tool_use_id: string`
8209
8210 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
8211
8212 - `BashCodeExecutionToolResultBlock object`
8213
8214 - `type: "bash_code_execution_tool_result"`
8215
8216 default: bash_code_execution_tool_result
8217
8218 - `content: BashCodeExecutionToolResultError or BashCodeExecutionResultBlock`
8219
8220 - `BashCodeExecutionToolResultError object`
8221
8222 - `type: "bash_code_execution_tool_result_error"`
8223
8224 default: bash_code_execution_tool_result_error
8225
8226 - `error_code: BashCodeExecutionToolResultErrorCode`
8227
8228 - `"invalid_tool_input"`
8229
8230 - `"unavailable"`
8231
8232 - `"too_many_requests"`
8233
8234 - `"execution_time_exceeded"`
8235
8236 - `"output_file_too_large"`
8237
8238 - `BashCodeExecutionResultBlock object`
8239
8240 - `type: "bash_code_execution_result"`
8241
8242 default: bash_code_execution_result
8243
8244 - `content: array of BashCodeExecutionOutputBlock`
8245
8246 - `type: "bash_code_execution_output"`
8247
8248 default: bash_code_execution_output
8249
8250 - `file_id: string`
8251
8252 - `return_code: number`
8253
8254 - `stderr: string`
8255
81278256 - `stdout: string`
81288257
8129 - `type: "code_execution_result"`
8130
8131 default: code_execution_result
8132
8133 - `EncryptedCodeExecutionResultBlock object`
8134
8135 Code execution result with encrypted stdout for PFC + web_search results.
8136
8137 - `content: array of CodeExecutionOutputBlock`
8138
8139 - `file_id: string`
8140
8141 - `type: "code_execution_output"`
8142
8143 default: code_execution_output
8144
8145 - `encrypted_stdout: string`
8146
8147 - `return_code: number`
8148
8149 - `stderr: string`
8150
8151 - `type: "encrypted_code_execution_result"`
8152
8153 default: encrypted_code_execution_result
8154
81558258 - `tool_use_id: string`
81568259
81578260 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
81588261
8159 - `type: "code_execution_tool_result"`
8160
8161 default: code_execution_tool_result
8162
8163 - `BashCodeExecutionToolResultBlock object`
8164
8165 - `content: BashCodeExecutionToolResultError or BashCodeExecutionResultBlock`
8166
8167 - `BashCodeExecutionToolResultError object`
8168
8169 - `error_code: BashCodeExecutionToolResultErrorCode`
8262 - `TextEditorCodeExecutionToolResultBlock object`
8263
8264 - `type: "text_editor_code_execution_tool_result"`
8265
8266 default: text_editor_code_execution_tool_result
8267
8268 - `content: TextEditorCodeExecutionToolResultError or TextEditorCodeExecutionViewResultBlock or TextEditorCodeExecutionCreateResultBlock or TextEditorCodeExecutionStrReplaceResultBlock`
8269
8270 - `TextEditorCodeExecutionToolResultError object`
8271
8272 - `type: "text_editor_code_execution_tool_result_error"`
8273
8274 default: text_editor_code_execution_tool_result_error
8275
8276 - `error_code: TextEditorCodeExecutionToolResultErrorCode`
81708277
81718278 - `"invalid_tool_input"`
81728279
from line 8283
81768283
81778284 - `"execution_time_exceeded"`
81788285
8179 - `"output_file_too_large"`
8180
8181 - `type: "bash_code_execution_tool_result_error"`
8182
8183 default: bash_code_execution_tool_result_error
8184
8185 - `BashCodeExecutionResultBlock object`
8186
8187 - `content: array of BashCodeExecutionOutputBlock`
8188
8189 - `file_id: string`
8190
8191 - `type: "bash_code_execution_output"`
8192
8193 default: bash_code_execution_output
8194
8195 - `return_code: number`
8196
8197 - `stderr: string`
8198
8199 - `stdout: string`
8200
8201 - `type: "bash_code_execution_result"`
8202
8203 default: bash_code_execution_result
8286 - `"file_not_found"`
8287
8288 - `error_message: string or null`
8289
8290 - `TextEditorCodeExecutionViewResultBlock object`
8291
8292 - `type: "text_editor_code_execution_view_result"`
8293
8294 default: text_editor_code_execution_view_result
8295
8296 - `content: string`
8297
8298 - `file_type: "text" or "image" or "pdf"`
8299
8300 - `"text"`
8301
8302 - `"image"`
8303
8304 - `"pdf"`
8305
8306 - `num_lines: number or null`
8307
8308 - `start_line: number or null`
8309
8310 - `total_lines: number or null`
8311
8312 - `TextEditorCodeExecutionCreateResultBlock object`
8313
8314 - `type: "text_editor_code_execution_create_result"`
8315
8316 default: text_editor_code_execution_create_result
8317
8318 - `is_file_update: boolean`
8319
8320 - `TextEditorCodeExecutionStrReplaceResultBlock object`
8321
8322 - `type: "text_editor_code_execution_str_replace_result"`
8323
8324 default: text_editor_code_execution_str_replace_result
8325
8326 - `lines: array of string or null`
8327
8328 - `new_lines: number or null`
8329
8330 - `new_start: number or null`
8331
8332 - `old_lines: number or null`
8333
8334 - `old_start: number or null`
82048335
82058336 - `tool_use_id: string`
82068337
82078338 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
82088339
8209 - `type: "bash_code_execution_tool_result"`
8210
8211 default: bash_code_execution_tool_result
8212
8213 - `TextEditorCodeExecutionToolResultBlock object`
8214
8215 - `content: TextEditorCodeExecutionToolResultError or TextEditorCodeExecutionViewResultBlock or TextEditorCodeExecutionCreateResultBlock or TextEditorCodeExecutionStrReplaceResultBlock`
8216
8217 - `TextEditorCodeExecutionToolResultError object`
8218
8219 - `error_code: TextEditorCodeExecutionToolResultErrorCode`
8340 - `ToolSearchToolResultBlock object`
8341
8342 - `type: "tool_search_tool_result"`
8343
8344 default: tool_search_tool_result
8345
8346 - `content: ToolSearchToolResultError or ToolSearchToolSearchResultBlock`
8347
8348 - `ToolSearchToolResultError object`
8349
8350 - `type: "tool_search_tool_result_error"`
8351
8352 default: tool_search_tool_result_error
8353
8354 - `error_code: ToolSearchToolResultErrorCode`
82208355
82218356 - `"invalid_tool_input"`
82228357
from line 8361
82268361
82278362 - `"execution_time_exceeded"`
82288363
8229 - `"file_not_found"`
8230
82318364 - `error_message: string or null`
82328365
8233 - `type: "text_editor_code_execution_tool_result_error"`
8234
8235 default: text_editor_code_execution_tool_result_error
8236
8237 - `TextEditorCodeExecutionViewResultBlock object`
8238
8239 - `content: string`
8240
8241 - `file_type: "text" or "image" or "pdf"`
8242
8243 - `"text"`
8244
8245 - `"image"`
8246
8247 - `"pdf"`
8248
8249 - `num_lines: number or null`
8250
8251 - `start_line: number or null`
8252
8253 - `total_lines: number or null`
8254
8255 - `type: "text_editor_code_execution_view_result"`
8256
8257 default: text_editor_code_execution_view_result
8258
8259 - `TextEditorCodeExecutionCreateResultBlock object`
8260
8261 - `is_file_update: boolean`
8262
8263 - `type: "text_editor_code_execution_create_result"`
8264
8265 default: text_editor_code_execution_create_result
8266
8267 - `TextEditorCodeExecutionStrReplaceResultBlock object`
8268
8269 - `lines: array of string or null`
8270
8271 - `new_lines: number or null`
8272
8273 - `new_start: number or null`
8274
8275 - `old_lines: number or null`
8276
8277 - `old_start: number or null`
8278
8279 - `type: "text_editor_code_execution_str_replace_result"`
8280
8281 default: text_editor_code_execution_str_replace_result
8366 - `ToolSearchToolSearchResultBlock object`
8367
8368 - `type: "tool_search_tool_search_result"`
8369
8370 default: tool_search_tool_search_result
8371
8372 - `tool_references: array of ToolReferenceBlock`
8373
8374 - `type: "tool_reference"`
8375
8376 default: tool_reference
8377
8378 - `tool_name: string`
8379
8380 maxLength: 256, minLength: 1, pattern: ^[a-zA-Z0-9_-]{1,256}$
82828381
82838382 - `tool_use_id: string`
82848383
82858384 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
82868385
8287 - `type: "text_editor_code_execution_tool_result"`
8288
8289 default: text_editor_code_execution_tool_result
8290
8291 - `ToolSearchToolResultBlock object`
8292
8293 - `content: ToolSearchToolResultError or ToolSearchToolSearchResultBlock`
8294
8295 - `ToolSearchToolResultError object`
8296
8297 - `error_code: ToolSearchToolResultErrorCode`
8298
8299 - `"invalid_tool_input"`
8300
8301 - `"unavailable"`
8302
8303 - `"too_many_requests"`
8304
8305 - `"execution_time_exceeded"`
8306
8307 - `error_message: string or null`
8308
8309 - `type: "tool_search_tool_result_error"`
8310
8311 default: tool_search_tool_result_error
8312
8313 - `ToolSearchToolSearchResultBlock object`
8314
8315 - `tool_references: array of ToolReferenceBlock`
8316
8317 - `tool_name: string`
8318
8319 maxLength: 256, minLength: 1, pattern: ^[a-zA-Z0-9_-]{1,256}$
8320
8321 - `type: "tool_reference"`
8322
8323 default: tool_reference
8324
8325 - `type: "tool_search_tool_search_result"`
8326
8327 default: tool_search_tool_search_result
8328
8329 - `tool_use_id: string`
8330
8331 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
8332
8333 - `type: "tool_search_tool_result"`
8334
8335 default: tool_search_tool_result
8336
83378386 - `ContainerUploadBlock object`
83388387
83398388 Response model for a file uploaded to the container.
83408389
8390 - `type: "container_upload"`
8391
8392 default: container_upload
8393
83418394 - `file_id: string`
83428395
8343 - `type: "container_upload"`
8344
8345 default: container_upload
8346
83478396 - `model: Model`
83488397
83498398 The model that will complete your prompt.
from line 8487
84388487
84398488 Structured information about a refusal.
84408489
8490 - `type: "refusal"`
8491
8492 default: refusal
8493
84418494 - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null`
84428495
84438496 The policy category that triggered a refusal.
from line 8520
84678520 Human-readable explanation of the refusal.
84688521
84698522 This text is not guaranteed to be stable. `null` when no explanation is available for the category.
8470
8471 - `type: "refusal"`
8472
8473 default: refusal
84748523
84758524 - `stop_reason: StopReason or null`
84768525
from line 8557
85088557
85098558 This value will be a non-null string if one of your custom stop sequences was generated.
85108559
8511 - `type: "message"`
8512
8513 Object type.
8514
8515 For Messages, this is always `"message"`.
8516
8517 default: message
8518
85198560 - `usage: Usage`
85208561
85218562 Billing and rate-limit usage.
from line 8660
86198660 - `"priority"`
86208661
86218662 - `"batch"`
8622
8623 - `type: "succeeded"`
8624
8625 default: succeeded
86268663