## Headers
The whole hunk
from line 1, old and new numbered
/
lines
from line 1
1---
2title: Retrieve Message Batch results
3url: https://platform.claude.com/docs/en/api/messages/batches/results
4---
5
16# Retrieve Message Batch results
27
38**GET** `/v1/messages/batches/{message_batch_id}/results`
from line 19
1419
1520 ID of the Message Batch.
1621
22## Headers
23
24- `"anthropic-workspace-id": optional string`
25
1726## Returns
1827
1928- `MessageBatchIndividualResponse object`
from line 43
3443
3544 - `MessageBatchSucceededResult object`
3645
46 - `type: "succeeded"`
47
48 default: succeeded
49
3750 - `message: Message`
3851
52 - `type: "message"`
53
54 Object type.
55
56 For Messages, this is always `"message"`.
57
58 default: message
59
3960 - `id: string`
4061
4162 Unique object identifier.
from line 81
6081
6182 Skills loaded in the container
6283
63 - `skill_id: string`
64
65 Skill ID
66
67 maxLength: 64, minLength: 1
68
6984 - `type: "anthropic" or "custom"`
7085
7186 Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
from line 89
7489
7590 - `"custom"`
7691
92 - `skill_id: string`
93
94 Skill ID
95
96 maxLength: 64, minLength: 1
97
7798 - `version: string`
7899
79100 The resolved version: a skill version ID for custom skills.
from line 132
111132
112133 - `TextBlock object`
113134
135 - `type: "text"`
136
137 default: text
138
114139 - `citations: array of TextCitation or null`
115140
116141 Citations supporting the text block.
from line 144
119144
120145 - `CitationCharLocation object`
121146
147 - `type: "char_location"`
148
149 default: char_location
150
122151 - `cited_text: string`
123152
124153 - `document_index: number`
from line 164
135164
136165 minimum: 0
137166
138 - `type: "char_location"`
167 - `CitationPageLocation object`
139168
140 default: char_location
169 - `type: "page_location"`
141170
142 - `CitationPageLocation object`
171 default: page_location
143172
144173 - `cited_text: string`
145174
from line 186
157186
158187 minimum: 1
159188
160 - `type: "page_location"`
189 - `CitationContentBlockLocation object`
161190
162 default: page_location
191 - `type: "content_block_location"`
163192
164 - `CitationContentBlockLocation object`
193 default: content_block_location
165194
166195 - `cited_text: string`
167196
from line 218
189218
190219 minimum: 0
191220
192 - `type: "content_block_location"`
221 - `CitationsWebSearchResultLocation object`
193222
194 default: content_block_location
223 - `type: "web_search_result_location"`
195224
196 - `CitationsWebSearchResultLocation object`
225 default: web_search_result_location
197226
198227 - `cited_text: string`
199228
from line 232
203232
204233 maxLength: 512
205234
206 - `type: "web_search_result_location"`
207
208 default: web_search_result_location
209
210235 - `url: string`
211236
212237 - `CitationsSearchResultLocation object`
213238
239 - `type: "search_result_location"`
240
241 default: search_result_location
242
214243 - `cited_text: string`
215244
216245 The full text of the cited block range, concatenated.
from line 270
241270
242271 - `title: string or null`
243272
244 - `type: "search_result_location"`
245
246 default: search_result_location
247
248273 - `text: string`
249274
250 maxLength: 5000000, minLength: 0
275 minLength: 0
251276
252 - `type: "text"`
277 - `ThinkingBlock object`
253278
254 default: text
279 - `type: "thinking"`
255280
256 - `ThinkingBlock object`
281 default: thinking
257282
258283 - `signature: string`
259284
from line 292
267292
268293 The text of Claude's thinking process for this block.
269294
270 - `type: "thinking"`
295 - `RedactedThinkingBlock object`
271296
272 default: thinking
297 - `type: "redacted_thinking"`
273298
274 - `RedactedThinkingBlock object`
299 default: redacted_thinking
275300
276301 - `data: string`
277302
from line 306
281306
282307 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details.
283308
284 - `type: "redacted_thinking"`
309 - `ToolUseBlock object`
285310
286 default: redacted_thinking
311 - `type: "tool_use"`
287312
288 - `ToolUseBlock object`
313 default: tool_use
289314
290315 - `id: string`
291316
from line 332
307332
308333 Tool invocation generated by a server-side tool.
309334
335 - `type: "code_execution_20250825"`
336
310337 - `tool_id: string`
311338
312339 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
313340
314 - `type: "code_execution_20250825"`
315
316341 - `ServerToolCaller20260120 object`
317342
343 - `type: "code_execution_20260120"`
344
318345 - `tool_id: string`
319346
320347 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
321348
322 - `type: "code_execution_20260120"`
323
324349 - `input: map[unknown]`
325350
326351 - `name: string`
from line 352
327352
328353 minLength: 1
329354
330 - `type: "tool_use"`
331
332 default: tool_use
333
334355 - `toolset_name: optional string or null`
335356
336357 For a toolset member tool_use, the toolset family.
from line 360
339360
340361 - `ServerToolUseBlock object`
341362
363 - `type: "server_tool_use"`
364
365 default: server_tool_use
366
342367 - `id: string`
343368
344369 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
from line 402
377402
378403 - `"tool_search_tool_bm25"`
379404
380 - `type: "server_tool_use"`
405 - `WebSearchToolResultBlock object`
381406
382 default: server_tool_use
407 - `type: "web_search_tool_result"`
383408
384 - `WebSearchToolResultBlock object`
409 default: web_search_tool_result
385410
386411 - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120`
387412
from line 428
403428
404429 - `WebSearchToolResultError object`
405430
431 - `type: "web_search_tool_result_error"`
432
433 default: web_search_tool_result_error
434
406435 - `error_code: WebSearchToolResultErrorCode`
407436
408437 - `"invalid_tool_input"`
from line 446
417446
418447 - `"request_too_large"`
419448
420 - `type: "web_search_tool_result_error"`
449 - `array of WebSearchResultBlock`
421450
422 default: web_search_tool_result_error
451 - `type: "web_search_result"`
423452
424 - `array of WebSearchResultBlock`
453 default: web_search_result
425454
426455 - `encrypted_content: string`
427456
from line 458
429458
430459 - `title: string`
431460
432 - `type: "web_search_result"`
433
434 default: web_search_result
435
436461 - `url: string`
437462
438463 - `tool_use_id: string`
from line 464
439464
440465 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
441466
442 - `type: "web_search_tool_result"`
467 - `WebFetchToolResultBlock object`
443468
444 default: web_search_tool_result
469 - `type: "web_fetch_tool_result"`
445470
446 - `WebFetchToolResultBlock object`
471 default: web_fetch_tool_result
447472
448473 - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120`
449474
from line 490
465490
466491 - `WebFetchToolResultErrorBlock object`
467492
493 - `type: "web_fetch_tool_result_error"`
494
495 default: web_fetch_tool_result_error
496
468497 - `error_code: WebFetchToolResultErrorCode`
469498
470499 - `"invalid_tool_input"`
from line 514
485514
486515 - `"unavailable"`
487516
488 - `type: "web_fetch_tool_result_error"`
517 - `"content_too_large"`
489518
490 default: web_fetch_tool_result_error
491
492519 - `WebFetchBlock object`
493520
521 - `type: "web_fetch_result"`
522
523 default: web_fetch_result
524
494525 - `content: DocumentBlock`
495526
527 - `type: "document"`
528
529 default: document
530
496531 - `citations: CitationsConfig or null`
497532
498533 Citation configuration for the document
from line 540
505540
506541 - `Base64PDFSource object`
507542
543 - `type: "base64"`
544
508545 - `data: string`
509546
510547 format: byte
from line 548
511548
512549 - `media_type: "application/pdf"`
513550
514 - `type: "base64"`
515
516551 - `PlainTextSource object`
517552
553 - `type: "text"`
554
518555 - `data: string`
519556
520557 - `media_type: "text/plain"`
521558
522 - `type: "text"`
523
524559 - `title: string or null`
525560
526561 The title of the document
527562
528 - `type: "document"`
529
530 default: document
531
532563 - `retrieved_at: string or null`
533564
534565 ISO 8601 timestamp when the content was retrieved
535566
536 - `type: "web_fetch_result"`
537
538 default: web_fetch_result
539
540567 - `url: string`
541568
542569 Fetched content URL
from line 572
545572
546573 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
547574
548 - `type: "web_fetch_tool_result"`
575 - `CodeExecutionToolResultBlock object`
549576
550 default: web_fetch_tool_result
577 - `type: "code_execution_tool_result"`
551578
552 - `CodeExecutionToolResultBlock object`
579 default: code_execution_tool_result
553580
554581 - `content: CodeExecutionToolResultBlockContent`
555582
from line 584
557584
558585 - `CodeExecutionToolResultError object`
559586
587 - `type: "code_execution_tool_result_error"`
588
589 default: code_execution_tool_result_error
590
560591 - `error_code: CodeExecutionToolResultErrorCode`
561592
562593 - `"invalid_tool_input"`
from line 598
567598
568599 - `"execution_time_exceeded"`
569600
570 - `type: "code_execution_tool_result_error"`
601 - `CodeExecutionResultBlock object`
571602
572 default: code_execution_tool_result_error
603 - `type: "code_execution_result"`
573604
574 - `CodeExecutionResultBlock object`
605 default: code_execution_result
575606
576607 - `content: array of CodeExecutionOutputBlock`
577608
578 - `file_id: string`
579
580609 - `type: "code_execution_output"`
581610
582611 default: code_execution_output
583612
613 - `file_id: string`
614
584615 - `return_code: number`
585616
586617 - `stderr: string`
from line 618
587618
588619 - `stdout: string`
589620
590 - `type: "code_execution_result"`
591
592 default: code_execution_result
593
594621 - `EncryptedCodeExecutionResultBlock object`
595622
596623 Code execution result with encrypted stdout for PFC + web_search results.
597624
598 - `content: array of CodeExecutionOutputBlock`
625 - `type: "encrypted_code_execution_result"`
599626
600 - `file_id: string`
627 default: encrypted_code_execution_result
601628
629 - `content: array of CodeExecutionOutputBlock`
630
602631 - `type: "code_execution_output"`
603632
604633 default: code_execution_output
605634
635 - `file_id: string`
636
606637 - `encrypted_stdout: string`
607638
608639 - `return_code: number`
from line 640
609640
610641 - `stderr: string`
611642
612 - `type: "encrypted_code_execution_result"`
613
614 default: encrypted_code_execution_result
615
616643 - `tool_use_id: string`
617644
618645 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
619646
620 - `type: "code_execution_tool_result"`
647 - `BashCodeExecutionToolResultBlock object`
621648
622 default: code_execution_tool_result
649 - `type: "bash_code_execution_tool_result"`
623650
624 - `BashCodeExecutionToolResultBlock object`
651 default: bash_code_execution_tool_result
625652
626653 - `content: BashCodeExecutionToolResultError or BashCodeExecutionResultBlock`
627654
628655 - `BashCodeExecutionToolResultError object`
629656
657 - `type: "bash_code_execution_tool_result_error"`
658
659 default: bash_code_execution_tool_result_error
660
630661 - `error_code: BashCodeExecutionToolResultErrorCode`
631662
632663 - `"invalid_tool_input"`
from line 670
639670
640671 - `"output_file_too_large"`
641672
642 - `type: "bash_code_execution_tool_result_error"`
673 - `BashCodeExecutionResultBlock object`
643674
644 default: bash_code_execution_tool_result_error
675 - `type: "bash_code_execution_result"`
645676
646 - `BashCodeExecutionResultBlock object`
677 default: bash_code_execution_result
647678
648679 - `content: array of BashCodeExecutionOutputBlock`
649680
650 - `file_id: string`
651
652681 - `type: "bash_code_execution_output"`
653682
654683 default: bash_code_execution_output
655684
685 - `file_id: string`
686
656687 - `return_code: number`
657688
658689 - `stderr: string`
from line 690
659690
660691 - `stdout: string`
661692
662 - `type: "bash_code_execution_result"`
663
664 default: bash_code_execution_result
665
666693 - `tool_use_id: string`
667694
668695 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
669696
670 - `type: "bash_code_execution_tool_result"`
697 - `TextEditorCodeExecutionToolResultBlock object`
671698
672 default: bash_code_execution_tool_result
699 - `type: "text_editor_code_execution_tool_result"`
673700
674 - `TextEditorCodeExecutionToolResultBlock object`
701 default: text_editor_code_execution_tool_result
675702
676703 - `content: TextEditorCodeExecutionToolResultError or TextEditorCodeExecutionViewResultBlock or TextEditorCodeExecutionCreateResultBlock or TextEditorCodeExecutionStrReplaceResultBlock`
677704
678705 - `TextEditorCodeExecutionToolResultError object`
679706
707 - `type: "text_editor_code_execution_tool_result_error"`
708
709 default: text_editor_code_execution_tool_result_error
710
680711 - `error_code: TextEditorCodeExecutionToolResultErrorCode`
681712
682713 - `"invalid_tool_input"`
from line 722
691722
692723 - `error_message: string or null`
693724
694 - `type: "text_editor_code_execution_tool_result_error"`
725 - `TextEditorCodeExecutionViewResultBlock object`
695726
696 default: text_editor_code_execution_tool_result_error
727 - `type: "text_editor_code_execution_view_result"`
697728
698 - `TextEditorCodeExecutionViewResultBlock object`
729 default: text_editor_code_execution_view_result
699730
700731 - `content: string`
701732
from line 744
713744
714745 - `total_lines: number or null`
715746
716 - `type: "text_editor_code_execution_view_result"`
717
718 default: text_editor_code_execution_view_result
719
720747 - `TextEditorCodeExecutionCreateResultBlock object`
721748
722 - `is_file_update: boolean`
723
724749 - `type: "text_editor_code_execution_create_result"`
725750
726751 default: text_editor_code_execution_create_result
727752
753 - `is_file_update: boolean`
754
728755 - `TextEditorCodeExecutionStrReplaceResultBlock object`
729756
757 - `type: "text_editor_code_execution_str_replace_result"`
758
759 default: text_editor_code_execution_str_replace_result
760
730761 - `lines: array of string or null`
731762
732763 - `new_lines: number or null`
from line 768
737768
738769 - `old_start: number or null`
739770
740 - `type: "text_editor_code_execution_str_replace_result"`
741
742 default: text_editor_code_execution_str_replace_result
743
744771 - `tool_use_id: string`
745772
746773 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
747774
748 - `type: "text_editor_code_execution_tool_result"`
775 - `ToolSearchToolResultBlock object`
749776
750 default: text_editor_code_execution_tool_result
777 - `type: "tool_search_tool_result"`
751778
752 - `ToolSearchToolResultBlock object`
779 default: tool_search_tool_result
753780
754781 - `content: ToolSearchToolResultError or ToolSearchToolSearchResultBlock`
755782
756783 - `ToolSearchToolResultError object`
757784
785 - `type: "tool_search_tool_result_error"`
786
787 default: tool_search_tool_result_error
788
758789 - `error_code: ToolSearchToolResultErrorCode`
759790
760791 - `"invalid_tool_input"`
from line 798
767798
768799 - `error_message: string or null`
769800
770 - `type: "tool_search_tool_result_error"`
801 - `ToolSearchToolSearchResultBlock object`
771802
772 default: tool_search_tool_result_error
803 - `type: "tool_search_tool_search_result"`
773804
774 - `ToolSearchToolSearchResultBlock object`
805 default: tool_search_tool_search_result
775806
776807 - `tool_references: array of ToolReferenceBlock`
777808
778 - `tool_name: string`
779
780 maxLength: 256, minLength: 1, pattern: ^[a-zA-Z0-9_-]{1,256}$
781
782809 - `type: "tool_reference"`
783810
784811 default: tool_reference
785812
786 - `type: "tool_search_tool_search_result"`
813 - `tool_name: string`
787814
788 default: tool_search_tool_search_result
815 maxLength: 256, minLength: 1, pattern: ^[a-zA-Z0-9_-]{1,256}$
789816
790817 - `tool_use_id: string`
791818
792819 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
793820
794 - `type: "tool_search_tool_result"`
795
796 default: tool_search_tool_result
797
798821 - `ContainerUploadBlock object`
799822
800823 Response model for a file uploaded to the container.
801824
802 - `file_id: string`
803
804825 - `type: "container_upload"`
805826
806827 default: container_upload
807828
829 - `file_id: string`
830
808831 - `model: Model`
809832
810833 The model that will complete your prompt.
from line 922
899922
900923 Structured information about a refusal.
901924
925 - `type: "refusal"`
926
927 default: refusal
928
902929 - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null`
903930
904931 The policy category that triggered a refusal.
from line 956
929956
930957 This text is not guaranteed to be stable. `null` when no explanation is available for the category.
931958
932 - `type: "refusal"`
933
934 default: refusal
935
936959 - `stop_reason: StopReason or null`
937960
938961 The reason that we stopped.
from line 992
969992
970993 This value will be a non-null string if one of your custom stop sequences was generated.
971994
972 - `type: "message"`
973
974 Object type.
975
976 For Messages, this is always `"message"`.
977
978 default: message
979
980995 - `usage: Usage`
981996
982997 Billing and rate-limit usage.
from line 1096
10811096
10821097 - `"batch"`
10831098
1084 - `type: "succeeded"`
1099 - `MessageBatchErroredResult object`
10851100
1086 default: succeeded
1101 - `type: "errored"`
10871102
1088 - `MessageBatchErroredResult object`
1103 default: errored
10891104
10901105 - `error: ErrorResponse`
10911106
1107 - `type: "error"`
1108
1109 default: error
1110
10921111 - `error: ErrorObject`
10931112
10941113 - `InvalidRequestError object`
10951114
1096 - `message: string`
1097
1098 default: Invalid request
1099
11001115 - `type: "invalid_request_error"`
11011116
11021117 default: invalid_request_error
11031118
1104 - `AuthenticationError object`
1105
11061119 - `message: string`
11071120
1108 default: Authentication error
1121 default: Invalid request
11091122
1123 - `AuthenticationError object`
1124
11101125 - `type: "authentication_error"`
11111126
11121127 default: authentication_error
11131128
1114 - `BillingError object`
1115
11161129 - `message: string`
11171130
1118 default: Billing error
1131 default: Authentication error
11191132
1133 - `BillingError object`
1134
11201135 - `type: "billing_error"`
11211136
11221137 default: billing_error
11231138
1124 - `PermissionError object`
1125
11261139 - `message: string`
11271140
1128 default: Permission denied
1141 default: Billing error
11291142
1143 - `PermissionError object`
1144
11301145 - `type: "permission_error"`
11311146
11321147 default: permission_error
11331148
1134 - `NotFoundError object`
1135
11361149 - `message: string`
11371150
1138 default: Not found
1151 default: Permission denied
11391152
1153 - `NotFoundError object`
1154
11401155 - `type: "not_found_error"`
11411156
11421157 default: not_found_error
11431158
1144 - `RateLimitError object`
1145
11461159 - `message: string`
11471160
1148 default: Rate limited
1161 default: Not found
11491162
1163 - `RateLimitError object`
1164
11501165 - `type: "rate_limit_error"`
11511166
11521167 default: rate_limit_error
11531168
1154 - `GatewayTimeoutError object`
1155
11561169 - `message: string`
11571170
1158 default: Request timeout
1171 default: Rate limited
11591172
1173 - `GatewayTimeoutError object`
1174
11601175 - `type: "timeout_error"`
11611176
11621177 default: timeout_error
11631178
1164 - `APIErrorObject object`
1165
11661179 - `message: string`
11671180
1168 default: Internal server error
1181 default: Request timeout
11691182
1183 - `APIErrorObject object`
1184
11701185 - `type: "api_error"`
11711186
11721187 default: api_error
11731188
1174 - `OverloadedError object`
1175
11761189 - `message: string`
11771190
1178 default: Overloaded
1191 default: Internal server error
11791192
1193 - `OverloadedError object`
1194
11801195 - `type: "overloaded_error"`
11811196
11821197 default: overloaded_error
11831198
1184 - `request_id: string or null`
1199 - `message: string`
11851200
1186 - `type: "error"`
1201 default: Overloaded
11871202
1188 default: error
1189
1190 - `type: "errored"`
1191
1192 default: errored
1203 - `request_id: string or null`
11931204
11941205 - `MessageBatchCanceledResult object`
11951206