Repository Public
1---2title: Retrieve Message Batch results3url: https://platform.claude.com/docs/en/api/beta/messages/batches/results4---56# Retrieve Message Batch results78**GET** `/v1/messages/batches/{message_batch_id}/results`910Streams the results of a Message Batch as a `.jsonl` file.1112Each line in the file is a JSON object containing the result of a single request in the Message Batch. Results are not guaranteed to be in the same order as requests. Use the `custom_id` field to match results to requests.1314Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)1516## Path parameters1718- `message_batch_id: string`1920 ID of the Message Batch.2122## Headers2324- `"anthropic-beta": optional array of AnthropicBeta`2526 Optional header to specify the beta version(s) you want to use.2728 - `string`2930 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`3132 - `"message-batches-2024-09-24"`3334 - `"prompt-caching-2024-07-31"`3536 - `"computer-use-2024-10-22"`3738 - `"computer-use-2025-01-24"`3940 - `"pdfs-2024-09-25"`4142 - `"token-counting-2024-11-01"`4344 - `"token-efficient-tools-2025-02-19"`4546 - `"output-128k-2025-02-19"`4748 - `"files-api-2025-04-14"`4950 - `"mcp-client-2025-04-04"`5152 - `"mcp-client-2025-11-20"`5354 - `"dev-full-thinking-2025-05-14"`5556 - `"interleaved-thinking-2025-05-14"`5758 - `"code-execution-2025-05-22"`5960 - `"extended-cache-ttl-2025-04-11"`6162 - `"context-1m-2025-08-07"`6364 - `"context-management-2025-06-27"`6566 - `"model-context-window-exceeded-2025-08-26"`6768 - `"skills-2025-10-02"`6970 - `"fast-mode-2026-02-01"`7172 - `"output-300k-2026-03-24"`7374 - `"user-profiles-2026-03-24"`7576 - `"user-profiles-2026-08-18"`7778 - `"user-profiles-2026-09-04"`7980 - `"advisor-tool-2026-03-01"`8182 - `"managed-agents-2026-04-01"`8384 - `"cache-diagnosis-2026-04-07"`8586 - `"dreaming-2026-04-21"`8788 - `"thinking-token-count-2026-05-13"`8990 - `"server-side-fallback-2026-06-01"`9192 - `"server-side-fallback-2026-07-01"`9394 - `"fallback-credit-2026-06-01"`9596 - `"fallback-credit-2026-07-01"`9798 - `"agent-memory-2026-07-22"`99100 - `"mid-conversation-tool-changes-2026-07-01"`101102 - `"compact-2026-01-12"`103104 - `"computer-use-2025-11-24"`105106 - `"mcp-tunnels-2026-06-22"`107108 - `"structured-outputs-2025-11-13"`109110 - `"task-budgets-2026-03-13"`111112 - `"thinking-display-updates-2026-08-18"`113114 - `"ce-user-management-2026-07-13"`115116 - `"mid-conversation-output-config-2026-07-01"`117118 - `"thinking-binding-controls-2026-08-01"`119120 - `"mid-conversation-system-clear-at-2026-08-21"`121122 - `"compact-2026-09-04"`123124- `"anthropic-workspace-id": optional string`125126## Returns127128- `BetaMessageBatchIndividualResponse object`129130 This is a single line in the response `.jsonl` file and does not represent the response as a whole.131132 - `custom_id: string`133134 Developer-provided ID created for each request in a Message Batch. Useful for matching results to requests, as results may be given out of request order.135136 Must be unique for each request within the Message Batch.137138 - `result: BetaMessageBatchResult`139140 Processing result for this request.141142 Contains a Message output if processing was successful, an error response if processing failed, or the reason why processing was not attempted, such as cancellation or expiration.143144 - `BetaMessageBatchSucceededResult object`145146 - `type: "succeeded"`147148 default: succeeded149150 - `message: BetaMessage`151152 - `type: "message"`153154 Object type.155156 For Messages, this is always `"message"`.157158 default: message159160 - `id: string`161162 Unique object identifier.163164 The format and length of IDs may change over time.165166 - `container: BetaContainer or null`167168 Information about the container used in the request (for the code execution tool)169170 - `id: string`171172 Identifier for the container used in this request173174 - `expires_at: string`175176 The time at which the container will expire.177178 format: date-time179180 - `skills: array of BetaContainerSkill or null`181182 Skills loaded in the container183184 - `type: "anthropic" or "custom"`185186 Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)187188 - `"anthropic"`189190 - `"custom"`191192 - `skill_id: string`193194 Skill ID195196 maxLength: 64, minLength: 1197198 - `version: string`199200 The resolved version: a skill version ID for custom skills.201202 maxLength: 64, minLength: 1203204 - `content: array of BetaContentBlock`205206 Content generated by the model.207208 This is an array of content blocks, each of which has a `type` that determines its shape.209210 Example:211212 ```json213 [{"type": "text", "text": "Hi, I'm Claude."}]214 ```215216 If the request input `messages` ended with an `assistant` turn, then the response `content` will continue directly from that last turn. You can use this to constrain the model's output.217218 For example, if the input `messages` were:219220 ```json221 [222 {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"},223 {"role": "assistant", "content": "The best answer is ("}224 ]225 ```226227 Then the response `content` might be:228229 ```json230 [{"type": "text", "text": "B)"}]231 ```232233 - `BetaTextBlock object`234235 - `type: "text"`236237 default: text238239 - `citations: array of BetaTextCitation or null`240241 Citations supporting the text block.242243 The type of citation returned will depend on the type of document being cited. Citing a PDF results in `page_location`, plain text results in `char_location`, and content document results in `content_block_location`.244245 - `BetaCitationCharLocation object`246247 - `type: "char_location"`248249 default: char_location250251 - `cited_text: string`252253 - `document_index: number`254255 minimum: 0256257 - `document_title: string or null`258259 - `end_char_index: number`260261 - `file_id: string or null`262263 - `start_char_index: number`264265 minimum: 0266267 - `BetaCitationPageLocation object`268269 - `type: "page_location"`270271 default: page_location272273 - `cited_text: string`274275 - `document_index: number`276277 minimum: 0278279 - `document_title: string or null`280281 - `end_page_number: number`282283 - `file_id: string or null`284285 - `start_page_number: number`286287 minimum: 1288289 - `BetaCitationContentBlockLocation object`290291 - `type: "content_block_location"`292293 default: content_block_location294295 - `cited_text: string`296297 The full text of the cited block range, concatenated.298299 Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.300301 - `document_index: number`302303 minimum: 0304305 - `document_title: string or null`306307 - `end_block_index: number`308309 Exclusive 0-based end index of the cited block range in the source's `content` array.310311 Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.312313 - `file_id: string or null`314315 - `start_block_index: number`316317 0-based index of the first cited block in the source's `content` array.318319 minimum: 0320321 - `BetaCitationsWebSearchResultLocation object`322323 - `type: "web_search_result_location"`324325 default: web_search_result_location326327 - `cited_text: string`328329 - `encrypted_index: string`330331 - `title: string or null`332333 maxLength: 512334335 - `url: string`336337 - `BetaCitationSearchResultLocation object`338339 - `type: "search_result_location"`340341 default: search_result_location342343 - `cited_text: string`344345 The full text of the cited block range, concatenated.346347 Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.348349 - `end_block_index: number`350351 Exclusive 0-based end index of the cited block range in the source's `content` array.352353 Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.354355 - `search_result_index: number`356357 0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.358359 Counted separately from `document_index`; server-side web search results are not included in this count.360361 minimum: 0362363 - `source: string`364365 - `start_block_index: number`366367 0-based index of the first cited block in the source's `content` array.368369 minimum: 0370371 - `title: string or null`372373 - `text: string`374375 minLength: 0376377 - `BetaThinkingBlock object`378379 - `type: "thinking"`380381 default: thinking382383 - `signature: string`384385 A value used to verify that this thinking block was generated by Claude when it is passed back to the API.386387 This is an opaque field and should not be interpreted or parsed. When passing thinking blocks back to the API (required when using tools with extended thinking), pass them back exactly as received, with this field intact.388389 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details.390391 - `thinking: string`392393 The text of Claude's thinking process for this block.394395 - `BetaRedactedThinkingBlock object`396397 - `type: "redacted_thinking"`398399 default: redacted_thinking400401 - `data: string`402403 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.404405 Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation.406407 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details.408409 - `BetaToolUseBlock object`410411 - `type: "tool_use"`412413 default: tool_use414415 - `id: string`416417 pattern: ^[a-zA-Z0-9_-]+$418419 - `input: map[unknown]`420421 - `name: string`422423 minLength: 1424425 - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120`426427 - `BetaDirectCaller object`428429 Tool invocation directly from the model.430431 - `type: "direct"`432433 - `BetaServerToolCaller object`434435 Tool invocation generated by a server-side tool.436437 - `type: "code_execution_20250825"`438439 - `tool_id: string`440441 pattern: ^srvtoolu_[a-zA-Z0-9_]+$442443 - `BetaServerToolCaller20260120 object`444445 - `type: "code_execution_20260120"`446447 - `tool_id: string`448449 pattern: ^srvtoolu_[a-zA-Z0-9_]+$450451 - `toolset_name: optional string or null`452453 For a toolset member tool_use, the toolset family.454455 maxLength: 64, minLength: 1, pattern: ^[a-zA-Z0-9_-]+$456457 - `BetaServerToolUseBlock object`458459 - `type: "server_tool_use"`460461 default: server_tool_use462463 - `id: string`464465 pattern: ^srvtoolu_[a-zA-Z0-9_]+$466467 - `input: map[unknown]`468469 - `name: "advisor" or "web_search" or "web_fetch" or 5 more`470471 - `"advisor"`472473 - `"web_search"`474475 - `"web_fetch"`476477 - `"code_execution"`478479 - `"bash_code_execution"`480481 - `"text_editor_code_execution"`482483 - `"tool_search_tool_regex"`484485 - `"tool_search_tool_bm25"`486487 - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120`488489 - `BetaDirectCaller object`490491 Tool invocation directly from the model.492493 - `BetaServerToolCaller object`494495 Tool invocation generated by a server-side tool.496497 - `BetaServerToolCaller20260120 object`498499 - `BetaWebSearchToolResultBlock object`500501 - `type: "web_search_tool_result"`502503 default: web_search_tool_result504505 - `content: BetaWebSearchToolResultBlockContent`506507 - `BetaWebSearchToolResultError object`508509 - `type: "web_search_tool_result_error"`510511 default: web_search_tool_result_error512513 - `error_code: BetaWebSearchToolResultErrorCode`514515 - `"invalid_tool_input"`516517 - `"unavailable"`518519 - `"max_uses_exceeded"`520521 - `"too_many_requests"`522523 - `"query_too_long"`524525 - `"request_too_large"`526527 - `array of BetaWebSearchResultBlock`528529 - `type: "web_search_result"`530531 default: web_search_result532533 - `encrypted_content: string`534535 - `page_age: string or null`536537 - `title: string`538539 - `url: string`540541 - `tool_use_id: string`542543 pattern: ^srvtoolu_[a-zA-Z0-9_]+$544545 - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120`546547 - `BetaDirectCaller object`548549 Tool invocation directly from the model.550551 - `BetaServerToolCaller object`552553 Tool invocation generated by a server-side tool.554555 - `BetaServerToolCaller20260120 object`556557 - `BetaWebFetchToolResultBlock object`558559 - `type: "web_fetch_tool_result"`560561 default: web_fetch_tool_result562563 - `content: BetaWebFetchToolResultErrorBlock or BetaWebFetchBlock`564565 - `BetaWebFetchToolResultErrorBlock object`566567 - `type: "web_fetch_tool_result_error"`568569 default: web_fetch_tool_result_error570571 - `error_code: BetaWebFetchToolResultErrorCode`572573 - `"invalid_tool_input"`574575 - `"url_too_long"`576577 - `"url_not_allowed"`578579 - `"url_not_in_prior_context"`580581 - `"url_not_accessible"`582583 - `"unsupported_content_type"`584585 - `"too_many_requests"`586587 - `"max_uses_exceeded"`588589 - `"unavailable"`590591 - `"content_too_large"`592593 - `BetaWebFetchBlock object`594595 - `type: "web_fetch_result"`596597 default: web_fetch_result598599 - `content: BetaDocumentBlock`600601 - `type: "document"`602603 default: document604605 - `citations: BetaCitationConfig or null`606607 Citation configuration for the document608609 - `enabled: boolean`610611 default: false612613 - `source: BetaBase64PDFSource or BetaPlainTextSource`614615 - `BetaBase64PDFSource object`616617 - `type: "base64"`618619 - `data: string`620621 format: byte622623 - `media_type: "application/pdf"`624625 - `BetaPlainTextSource object`626627 - `type: "text"`628629 - `data: string`630631 - `media_type: "text/plain"`632633 - `title: string or null`634635 The title of the document636637 - `retrieved_at: string or null`638639 ISO 8601 timestamp when the content was retrieved640641 - `url: string`642643 Fetched content URL644645 - `tool_use_id: string`646647 pattern: ^srvtoolu_[a-zA-Z0-9_]+$648649 - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120`650651 - `BetaDirectCaller object`652653 Tool invocation directly from the model.654655 - `BetaServerToolCaller object`656657 Tool invocation generated by a server-side tool.658659 - `BetaServerToolCaller20260120 object`660661 - `BetaAdvisorToolResultBlock object`662663 - `type: "advisor_tool_result"`664665 default: advisor_tool_result666667 - `content: BetaAdvisorToolResultError or BetaAdvisorResultBlock or BetaAdvisorRedactedResultBlock`668669 - `BetaAdvisorToolResultError object`670671 - `type: "advisor_tool_result_error"`672673 default: advisor_tool_result_error674675 - `error_code: "max_uses_exceeded" or "prompt_too_long" or "too_many_requests" or 4 more`676677 - `"max_uses_exceeded"`678679 - `"prompt_too_long"`680681 - `"too_many_requests"`682683 - `"overloaded"`684685 - `"unavailable"`686687 - `"execution_time_exceeded"`688689 - `"model_not_found"`690691 - `BetaAdvisorResultBlock object`692693 - `type: "advisor_result"`694695 default: advisor_result696697 - `stop_reason: string or null`698699 The advisor sub-inference's stop reason (same values as the top-level message `stop_reason`). `max_tokens` indicates the advisor's output was truncated at the tool's `max_tokens` value or the advisor model's policy cap.700701 - `text: string`702703 - `BetaAdvisorRedactedResultBlock object`704705 - `type: "advisor_redacted_result"`706707 default: advisor_redacted_result708709 - `encrypted_content: string`710711 Opaque blob containing the advisor's output. Round-trip verbatim; do not inspect or modify.712713 - `stop_reason: string or null`714715 The advisor sub-inference's stop reason (same values as the top-level message `stop_reason`).716717 - `tool_use_id: string`718719 pattern: ^srvtoolu_[a-zA-Z0-9_]+$720721 - `BetaCodeExecutionToolResultBlock object`722723 - `type: "code_execution_tool_result"`724725 default: code_execution_tool_result726727 - `content: BetaCodeExecutionToolResultBlockContent`728729 - `BetaCodeExecutionToolResultError object`730731 - `type: "code_execution_tool_result_error"`732733 default: code_execution_tool_result_error734735 - `error_code: BetaCodeExecutionToolResultErrorCode`736737 - `"invalid_tool_input"`738739 - `"unavailable"`740741 - `"too_many_requests"`742743 - `"execution_time_exceeded"`744745 - `BetaCodeExecutionResultBlock object`746747 - `type: "code_execution_result"`748749 default: code_execution_result750751 - `content: array of BetaCodeExecutionOutputBlock`752753 - `type: "code_execution_output"`754755 default: code_execution_output756757 - `file_id: string`758759 - `return_code: number`760761 - `stderr: string`762763 - `stdout: string`764765 - `BetaEncryptedCodeExecutionResultBlock object`766767 Code execution result with encrypted stdout for PFC + web_search results.768769 - `type: "encrypted_code_execution_result"`770771 default: encrypted_code_execution_result772773 - `content: array of BetaCodeExecutionOutputBlock`774775 - `type: "code_execution_output"`776777 default: code_execution_output778779 - `file_id: string`780781 - `encrypted_stdout: string`782783 - `return_code: number`784785 - `stderr: string`786787 - `tool_use_id: string`788789 pattern: ^srvtoolu_[a-zA-Z0-9_]+$790791 - `BetaBashCodeExecutionToolResultBlock object`792793 - `type: "bash_code_execution_tool_result"`794795 default: bash_code_execution_tool_result796797 - `content: BetaBashCodeExecutionToolResultError or BetaBashCodeExecutionResultBlock`798799 - `BetaBashCodeExecutionToolResultError object`800801 - `type: "bash_code_execution_tool_result_error"`802803 default: bash_code_execution_tool_result_error804805 - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more`806807 - `"invalid_tool_input"`808809 - `"unavailable"`810811 - `"too_many_requests"`812813 - `"execution_time_exceeded"`814815 - `"output_file_too_large"`816817 - `BetaBashCodeExecutionResultBlock object`818819 - `type: "bash_code_execution_result"`820821 default: bash_code_execution_result822823 - `content: array of BetaBashCodeExecutionOutputBlock`824825 - `type: "bash_code_execution_output"`826827 default: bash_code_execution_output828829 - `file_id: string`830831 - `return_code: number`832833 - `stderr: string`834835 - `stdout: string`836837 - `tool_use_id: string`838839 pattern: ^srvtoolu_[a-zA-Z0-9_]+$840841 - `BetaTextEditorCodeExecutionToolResultBlock object`842843 - `type: "text_editor_code_execution_tool_result"`844845 default: text_editor_code_execution_tool_result846847 - `content: BetaTextEditorCodeExecutionToolResultError or BetaTextEditorCodeExecutionViewResultBlock or BetaTextEditorCodeExecutionCreateResultBlock or BetaTextEditorCodeExecutionStrReplaceResultBlock`848849 - `BetaTextEditorCodeExecutionToolResultError object`850851 - `type: "text_editor_code_execution_tool_result_error"`852853 default: text_editor_code_execution_tool_result_error854855 - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more`856857 - `"invalid_tool_input"`858859 - `"unavailable"`860861 - `"too_many_requests"`862863 - `"execution_time_exceeded"`864865 - `"file_not_found"`866867 - `error_message: string or null`868869 - `BetaTextEditorCodeExecutionViewResultBlock object`870871 - `type: "text_editor_code_execution_view_result"`872873 default: text_editor_code_execution_view_result874875 - `content: string`876877 - `file_type: "text" or "image" or "pdf"`878879 - `"text"`880881 - `"image"`882883 - `"pdf"`884885 - `num_lines: number or null`886887 - `start_line: number or null`888889 - `total_lines: number or null`890891 - `BetaTextEditorCodeExecutionCreateResultBlock object`892893 - `type: "text_editor_code_execution_create_result"`894895 default: text_editor_code_execution_create_result896897 - `is_file_update: boolean`898899 - `BetaTextEditorCodeExecutionStrReplaceResultBlock object`900901 - `type: "text_editor_code_execution_str_replace_result"`902903 default: text_editor_code_execution_str_replace_result904905 - `lines: array of string or null`906907 - `new_lines: number or null`908909 - `new_start: number or null`910911 - `old_lines: number or null`912913 - `old_start: number or null`914915 - `tool_use_id: string`916917 pattern: ^srvtoolu_[a-zA-Z0-9_]+$918919 - `BetaToolSearchToolResultBlock object`920921 - `type: "tool_search_tool_result"`922923 default: tool_search_tool_result924925 - `content: BetaToolSearchToolResultError or BetaToolSearchToolSearchResultBlock`926927 - `BetaToolSearchToolResultError object`928929 - `type: "tool_search_tool_result_error"`930931 default: tool_search_tool_result_error932933 - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"`934935 - `"invalid_tool_input"`936937 - `"unavailable"`938939 - `"too_many_requests"`940941 - `"execution_time_exceeded"`942943 - `error_message: string or null`944945 - `BetaToolSearchToolSearchResultBlock object`946947 - `type: "tool_search_tool_search_result"`948949 default: tool_search_tool_search_result950951 - `tool_references: array of BetaToolReferenceBlock`952953 - `type: "tool_reference"`954955 default: tool_reference956957 - `tool_name: string`958959 maxLength: 256, minLength: 1, pattern: ^[a-zA-Z0-9_-]{1,256}$960961 - `tool_use_id: string`962963 pattern: ^srvtoolu_[a-zA-Z0-9_]+$964965 - `BetaMCPToolUseBlock object`966967 - `type: "mcp_tool_use"`968969 default: mcp_tool_use970971 - `id: string`972973 pattern: ^[a-zA-Z0-9_-]+$974975 - `input: map[unknown]`976977 - `name: string`978979 The name of the MCP tool980981 - `server_name: string`982983 The name of the MCP server984985 - `BetaMCPToolResultBlock object`986987 - `type: "mcp_tool_result"`988989 default: mcp_tool_result990991 - `content: string or array of BetaTextBlock`992993 - `string`994995 - `BetaMCPToolResultBlockContent = array of BetaTextBlock`996997 - `type: "text"`998999 default: text10001001 - `citations: array of BetaTextCitation or null`10021003 Citations supporting the text block.10041005 The type of citation returned will depend on the type of document being cited. Citing a PDF results in `page_location`, plain text results in `char_location`, and content document results in `content_block_location`.10061007 - `text: string`10081009 minLength: 010101011 - `is_error: boolean`10121013 default: false10141015 - `tool_use_id: string`10161017 pattern: ^[a-zA-Z0-9_-]+$10181019 - `BetaContainerUploadBlock object`10201021 Response model for a file uploaded to the container.10221023 - `type: "container_upload"`10241025 default: container_upload10261027 - `file_id: string`10281029 - `BetaCompactionBlock object`10301031 A compaction block returned when autocompact is triggered.10321033 When content is None, it indicates the compaction failed to produce a valid1034 summary (e.g., malformed output from the model). Clients may round-trip1035 compaction blocks with null content; the server treats them as no-ops.10361037 - `type: "compaction"`10381039 default: compaction10401041 - `content: string or null`10421043 Summary of compacted content, or null if compaction failed10441045 - `encrypted_content: string or null`10461047 Opaque metadata from prior compaction, to be round-tripped verbatim10481049 - `signature: optional string or null`10501051 Signature over the summary, to be sent back with the block verbatim10521053 - `BetaFallbackBlock object`10541055 Marks the point in `content` where one model's output gives way to the next.10561057 One block appears per hop where a preceding model actually ran this turn and1058 declined. A turn where no preceding model ran and declined has no such1059 boundary and carries no block — the signal for whether a fallback model1060 served the response is the presence of a `fallback_message` entry in1061 `usage.iterations`, not this block.10621063 The block is treated like a server-tool content block for streaming: it1064 arrives via the standard `content_block_start` / `content_block_stop`1065 pair and carries no deltas.10661067 - `type: "fallback"`10681069 default: fallback10701071 - `from: BetaFallbackInfo`10721073 The model whose output ends at this point — the model that declined at this hop. When the declining hop is the requested model, its `model` echoes the top-level `model` string the caller sent (alias or canonical); when the declining hop is a fallback model, its `model` is that model's canonical id.10741075 - `model: Model`10761077 The model that will complete your prompt.10781079 See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.10801081 - `"claude-fable-5-1" or "claude-mythos-5-1" or "claude-sonnet-5" or 14 more`10821083 The model that will complete your prompt.10841085 See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.10861087 - `"claude-fable-5-1"`10881089 Frontier intelligence for ambitious tasks across coding, scientific discovery, and enterprise workflows10901091 - `"claude-mythos-5-1"`10921093 Our most capable model for cybersecurity and biology research, available through trusted access programs10941095 - `"claude-sonnet-5"`10961097 High-performance model for coding and agents10981099 - `"claude-fable-5"`11001101 Next generation of intelligence for the hardest knowledge work and coding problems11021103 - `"claude-mythos-5"`11041105 Most capable model for cybersecurity and biology research11061107 - `"claude-opus-5"`11081109 Powerful intelligence for long-running agents and coding11101111 - `"claude-opus-4-8"`11121113 Powerful intelligence for long-running agents and coding11141115 - `"claude-opus-4-7"`11161117 Powerful intelligence for long-running agents and coding11181119 - `"claude-mythos-preview"`11201121 New class of intelligence, strongest in coding and cybersecurity11221123 - `"claude-opus-4-6"`11241125 Powerful intelligence for long-running agents and coding11261127 - `"claude-sonnet-4-6"`11281129 Best combination of speed and intelligence11301131 - `"claude-haiku-4-5"`11321133 Fastest model with near-frontier intelligence11341135 - `"claude-haiku-4-5-20251001"`11361137 Fastest model with near-frontier intelligence11381139 - `"claude-opus-4-5"`11401141 Powerful intelligence for long-running agents and coding11421143 - `"claude-opus-4-5-20251101"`11441145 Powerful intelligence for long-running agents and coding11461147 - `"claude-sonnet-4-5"`11481149 High-performance model for agents and coding11501151 - `"claude-sonnet-4-5-20250929"`11521153 High-performance model for agents and coding11541155 - `string`11561157 - `to: BetaFallbackInfo`11581159 The fallback model producing the content that follows this block. Its `model` is always the canonical id.11601161 - `trigger: BetaFallbackRefusalTrigger`11621163 What caused the `from` model to hand over at this hop.11641165 - `type: "refusal"`11661167 default: refusal11681169 - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null`11701171 The policy category that triggered a refusal.11721173 - `"cyber"`11741175 The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category.11761177 - `"bio"`11781179 The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category.11801181 - `"frontier_llm"`11821183 The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category.11841185 - `"reasoning_extraction"`11861187 The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking).11881189 - `"general_harms"`11901191 The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category.11921193 - `context_management: BetaContextManagementResponse or null`11941195 Context management response.11961197 Information about context management strategies applied during the request.11981199 - `applied_edits: array of BetaClearToolUses20250919EditResponse or BetaClearThinking20251015EditResponse`12001201 List of context management edits that were applied.12021203 - `BetaClearToolUses20250919EditResponse object`12041205 - `type: "clear_tool_uses_20250919"`12061207 The type of context management edit applied.12081209 default: clear_tool_uses_2025091912101211 - `cleared_input_tokens: number`12121213 Number of input tokens cleared by this edit.12141215 minimum: 012161217 - `cleared_tool_uses: number`12181219 Number of tool uses that were cleared.12201221 minimum: 012221223 - `BetaClearThinking20251015EditResponse object`12241225 - `type: "clear_thinking_20251015"`12261227 The type of context management edit applied.12281229 default: clear_thinking_2025101512301231 - `cleared_input_tokens: number`12321233 Number of input tokens cleared by this edit.12341235 minimum: 012361237 - `cleared_thinking_turns: number`12381239 Number of thinking turns that were cleared.12401241 minimum: 012421243 - `diagnostics: BetaDiagnostics or null`12441245 Response envelope for request-level diagnostics. Present (possibly1246 null) whenever the caller supplied `diagnostics` on the request.12471248 - `cache_miss_reason: BetaCacheMissModelChanged or BetaCacheMissSystemChanged or BetaCacheMissToolsChanged or 3 more or null`12491250 Explains why the prompt cache could not fully reuse the prefix from the request identified by `diagnostics.previous_message_id`. `null` means diagnosis is still pending — the response was serialized before the background comparison completed.12511252 - `BetaCacheMissModelChanged object`12531254 - `type: "model_changed"`12551256 default: model_changed12571258 - `cache_missed_input_tokens: number`12591260 Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.12611262 - `BetaCacheMissSystemChanged object`12631264 - `type: "system_changed"`12651266 default: system_changed12671268 - `cache_missed_input_tokens: number`12691270 Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.12711272 - `BetaCacheMissToolsChanged object`12731274 - `type: "tools_changed"`12751276 default: tools_changed12771278 - `cache_missed_input_tokens: number`12791280 Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.12811282 - `BetaCacheMissMessagesChanged object`12831284 - `type: "messages_changed"`12851286 default: messages_changed12871288 - `cache_missed_input_tokens: number`12891290 Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.12911292 - `BetaCacheMissPreviousMessageNotFound object`12931294 - `type: "previous_message_not_found"`12951296 default: previous_message_not_found12971298 - `BetaCacheMissUnavailable object`12991300 - `type: "unavailable"`13011302 default: unavailable13031304 - `model: Model`13051306 The model that will complete your prompt.13071308 See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.13091310 - `role: "assistant"`13111312 Conversational role of the generated message.13131314 This will always be `"assistant"`.13151316 default: assistant13171318 - `stop_details: BetaRefusalStopDetails or null`13191320 Structured information about a refusal.13211322 - `type: "refusal"`13231324 default: refusal13251326 - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null`13271328 The policy category that triggered a refusal.13291330 - `"cyber"`13311332 The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category.13331334 - `"bio"`13351336 The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category.13371338 - `"frontier_llm"`13391340 The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category.13411342 - `"reasoning_extraction"`13431344 The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking).13451346 - `"general_harms"`13471348 The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category.13491350 - `explanation: string or null`13511352 Human-readable explanation of the refusal.13531354 This text is not guaranteed to be stable. `null` when no explanation is available for the category.13551356 - `fallback_credit_token: string or null`13571358 Opaque code that refunds the cache-miss cost when retrying this refused1359 request on the fallback model. Pass it as `fallback_credit_token` on the1360 retry request. Expires 5 minutes after the refusal.13611362 The retry is sent either with the same request body (`system`, `messages`,1363 `tools`, and other render-shaping fields), or with the same body plus one1364 appended `assistant` message whose content is the partial text (with any1365 trailing whitespace stripped from the final text block) and paired1366 server-tool blocks from this refusal — which also authorizes that1367 appended turn as an assistant-prefill continuation on models that otherwise1368 disallow prefill. A token minted mid-server-tool-loop whose partial content1369 was continuable may only be redeemed the second way — if a same-body retry1370 is rejected with a 400 saying the token must be redeemed by continuing the1371 partial response, retry the second way instead. Either way: same workspace,1372 same platform; a mismatch is a 400. Resending a token for an already-warm1373 prefix is permitted but yields no additional credit.13741375 `null` when the refused model isn't eligible for a fallback credit.13761377 - `fallback_has_prefill_claim: boolean or null`13781379 Whether the accompanying `fallback_credit_token` may be redeemed with the1380 appended-assistant retry form. Only set when `fallback_credit_token` is1381 present.13821383 `true`: retry by resending the same request body plus one appended1384 `assistant` message whose content is this response's `content` with any1385 trailing whitespace stripped from the final text block and unpaired1386 `tool_use` blocks omitted (the same appended-turn shape described on1387 `fallback_credit_token`), with the token attached. `false`: retry by1388 resending the original request body unchanged, with the token attached —1389 the appended-assistant form is not available for this refusal (no1390 continuable partial content, or the request uses `output_format` or a1391 `tool_choice` that forces tool use). One exception: when the request used1392 `output_format` or a forced `tool_choice` and the refusal arrived after1393 server tools (including MCP connector tools) had already executed, the1394 token may not be redeemable by either retry form; if the exact-body retry1395 is then rejected with a 400 saying the token must be redeemed by1396 continuing the partial response, discard the token and retry without it.13971398 Advisory: if an appended-assistant retry is rejected with a 400 despite1399 `true`, fall back to resending the original request body with the token.14001401 - `recommended_model: string or null`14021403 The server's suggested retry target for this refusal. Populated when a fallback attempt could not be made (the fallback model's rate limit was exhausted, or it was overloaded); names the fallback model the caller can retry directly. Null otherwise.14041405 - `stop_reason: BetaStopReason or null`14061407 The reason that we stopped.14081409 This may be one the following values:14101411 * `"end_turn"`: the model reached a natural stopping point1412 * `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum1413 * `"stop_sequence"`: one of your provided custom `stop_sequences` was generated1414 * `"tool_use"`: the model invoked one or more tools1415 * `"pause_turn"`: we paused a long-running turn. You may provide the response back as-is in a subsequent request to let the model continue.1416 * `"refusal"`: when streaming classifiers intervene to handle potential policy violations1417 * `"model_context_window_exceeded"`: we exceeded the model's context window14181419 In non-streaming mode this value is always non-null. In streaming mode, it is null in the `message_start` event and non-null otherwise.14201421 - `"end_turn"`14221423 - `"max_tokens"`14241425 - `"stop_sequence"`14261427 - `"tool_use"`14281429 - `"pause_turn"`14301431 - `"compaction"`14321433 - `"refusal"`14341435 - `"model_context_window_exceeded"`14361437 - `stop_sequence: string or null`14381439 Which custom stop sequence was generated, if any.14401441 This value will be a non-null string if one of your custom stop sequences was generated.14421443 - `usage: BetaUsage`14441445 Billing and rate-limit usage.14461447 Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems.14481449 Under the hood, the API transforms requests into a format suitable for the model. The model's output then goes through a parsing stage before becoming an API response. As a result, the token counts in `usage` will not match one-to-one with the exact visible content of an API request or response.14501451 For example, `output_tokens` will be non-zero, even for an empty string response from Claude.14521453 Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`.14541455 - `cache_creation: BetaCacheCreation or null`14561457 Breakdown of cached tokens by TTL14581459 - `ephemeral_1h_input_tokens: number`14601461 The number of input tokens used to create the 1 hour cache entry.14621463 default: 0, minimum: 014641465 - `ephemeral_5m_input_tokens: number`14661467 The number of input tokens used to create the 5 minute cache entry.14681469 default: 0, minimum: 014701471 - `cache_creation_input_tokens: number or null`14721473 The number of input tokens used to create the cache entry.14741475 minimum: 014761477 - `cache_read_input_tokens: number or null`14781479 The number of input tokens read from the cache.14801481 minimum: 014821483 - `fallback_credit: BetaFallbackCreditUsage or null`14841485 Outcome of the `fallback_credit_token` presented on this request.14861487 - `status: BetaFallbackCreditRedeemed or BetaFallbackCreditNotApplied`14881489 Whether the fallback-credit reprice was applied to this response's billing.14901491 A union discriminated on `type`. `redeemed`: the retry is billed as if1492 the conversation had been on the retry model all along — including when the1493 resulting shift is zero because there was nothing to move. `not_applied`:1494 no reprice was applied; the arm's `reason` says why.14951496 - `BetaFallbackCreditRedeemed object`14971498 The reprice was applied: the retry is billed as if the conversation1499 had been on the retry model all along.15001501 - `type: "redeemed"`15021503 default: redeemed15041505 - `BetaFallbackCreditNotApplied object`15061507 No reprice was applied; `reason` says why.15081509 - `type: "not_applied"`15101511 default: not_applied15121513 - `reason: "body_mismatch" or "continuation_excluded" or "continuation_only" or 9 more`15141515 Why the reprice was not applied.15161517 A closed enum; additions to the redemption-check vocabulary arrive as1518 deliberate schema updates.15191520 - `"body_mismatch"`15211522 - `"continuation_excluded"`15231524 - `"continuation_only"`15251526 - `"expired"`15271528 - `"invalid_target_model"`15291530 - `"not_enabled"`15311532 - `"reprice_unavailable"`15331534 - `"temporarily_unavailable"`15351536 - `"variant_fields_present"`15371538 - `"wrong_organization"`15391540 - `"wrong_platform"`15411542 - `"wrong_workspace"`15431544 - `remove_to_redeem: optional array of string or null`15451546 Request fields to remove before retrying, so the retry can redeem this1547 token.15481549 Present exactly when `reason` is `variant_fields_present` — never null,1550 never an empty array; absent otherwise. Fields are named only from your own request, and only after1551 the sealed variant hash matched. A served best-effort retry has already1552 been billed at normal price; nothing redeems retroactively, but a corrected1553 re-send inside the token's five-minute window can still redeem.15541555 - `inference_geo: string or null`15561557 The geographic region where inference was performed for this request.15581559 - `input_tokens: number`15601561 The number of input tokens which were used.15621563 minimum: 015641565 - `iterations: BetaIterationsUsage or null`15661567 Per-iteration token usage breakdown.15681569 Each entry represents one sampling iteration, with its own input/output token counts and cache statistics, discriminated by `type`. For `message` entries (model sampling iterations, such as the turns of a server-side tool use loop), this allows you to:15701571 - Determine which iterations exceeded long context thresholds (>=200k tokens)1572 - Calculate the context window size from the last `message` entry1573 - Understand token accumulation across server-side tool use loops15741575 A `compaction` entry reports the token usage of the compaction operation itself — the server-side request that summarizes the context being closed — NOT the size of the context that was compacted away, and its token counts can be much smaller than that closed context (for example, a compaction that closes a ~200k-token context can report only a few thousand tokens). Do not derive the context window size from a `compaction` entry, even when it is the last entry. A `compaction` entry's tokens are not included in the top-level `usage` fields. When an input-token trigger is in effect (the default — 150,000 tokens unless configured otherwise), each `compaction` entry closes a context that had reached at least that threshold, though the context can exceed it by the final iteration's output and tool results.15761577 - `BetaMessageIterationUsage object`15781579 Token usage for a sampling iteration.15801581 - `type: "message"`15821583 Usage for a sampling iteration15841585 default: message15861587 - `cache_creation: BetaCacheCreation or null`15881589 Breakdown of cached tokens by TTL15901591 - `cache_creation_input_tokens: number`15921593 The number of input tokens used to create the cache entry.15941595 default: 0, minimum: 015961597 - `cache_read_input_tokens: number`15981599 The number of input tokens read from the cache.16001601 default: 0, minimum: 016021603 - `input_tokens: number`16041605 The number of input tokens which were used.16061607 minimum: 016081609 - `model: Model or null`16101611 The model that will complete your prompt.16121613 See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.16141615 - `output_tokens: number`16161617 The number of output tokens which were used.16181619 minimum: 016201621 - `BetaCompactionIterationUsage object`16221623 Token usage for a compaction iteration.16241625 - `type: "compaction"`16261627 Usage for a compaction iteration16281629 default: compaction16301631 - `cache_creation: BetaCacheCreation or null`16321633 Breakdown of cached tokens by TTL16341635 - `cache_creation_input_tokens: number`16361637 The number of input tokens used to create the cache entry.16381639 default: 0, minimum: 016401641 - `cache_read_input_tokens: number`16421643 The number of input tokens read from the cache.16441645 default: 0, minimum: 016461647 - `input_tokens: number`16481649 The number of input tokens which were used.16501651 minimum: 016521653 - `output_tokens: number`16541655 The number of output tokens which were used.16561657 minimum: 016581659 - `BetaAdvisorMessageIterationUsage object`16601661 Token usage for an advisor sub-inference iteration.16621663 - `type: "advisor_message"`16641665 Usage for an advisor sub-inference iteration16661667 default: advisor_message16681669 - `cache_creation: BetaCacheCreation or null`16701671 Breakdown of cached tokens by TTL16721673 - `cache_creation_input_tokens: number`16741675 The number of input tokens used to create the cache entry.16761677 default: 0, minimum: 016781679 - `cache_read_input_tokens: number`16801681 The number of input tokens read from the cache.16821683 default: 0, minimum: 016841685 - `input_tokens: number`16861687 The number of input tokens which were used.16881689 minimum: 016901691 - `model: Model`16921693 The model that will complete your prompt.16941695 See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.16961697 - `output_tokens: number`16981699 The number of output tokens which were used.17001701 minimum: 017021703 - `BetaFallbackMessageIterationUsage object`17041705 Token usage for the fallback-model attempt of a server-side fallback request.17061707 The terminal entry of a fallback-served turn: when a fallback hop's1708 output is the returned message, the entry for the iteration that1709 completed it carries this type in place of `message`. A declined hop1710 and the serving hop's earlier tool-loop iterations produce `message`1711 entries. Whether a fallback model served the response is signalled by1712 the presence of this entry in `usage.iterations`.17131714 - `type: "fallback_message"`17151716 Usage for the fallback-model attempt that served the response17171718 default: fallback_message17191720 - `cache_creation: BetaCacheCreation or null`17211722 Breakdown of cached tokens by TTL17231724 - `cache_creation_input_tokens: number`17251726 The number of input tokens used to create the cache entry.17271728 default: 0, minimum: 017291730 - `cache_read_input_tokens: number`17311732 The number of input tokens read from the cache.17331734 default: 0, minimum: 017351736 - `input_tokens: number`17371738 The number of input tokens which were used.17391740 minimum: 017411742 - `model: Model`17431744 The model that will complete your prompt.17451746 See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.17471748 - `output_tokens: number`17491750 The number of output tokens which were used.17511752 minimum: 017531754 - `output_tokens: number`17551756 The number of output tokens which were used.17571758 minimum: 017591760 - `output_tokens_details: BetaOutputTokensDetails or null`17611762 Breakdown of output tokens by category.17631764 `output_tokens` remains the inclusive, authoritative total used for billing.1765 This object provides a read-only decomposition for observability — for example,1766 how many of the billed output tokens were spent on internal reasoning that may1767 have been summarized before being returned to you.17681769 - `thinking_tokens: number`17701771 Number of output tokens the model generated as internal reasoning, including1772 the thinking-block delimiter tokens.17731774 Reflects the raw reasoning the model produced, not the (possibly shorter)1775 summarized thinking text returned in the response body. Computed by1776 re-tokenizing the raw reasoning text, so it may differ from the model's exact1777 generation count by a small number of tokens. Always ≤ `output_tokens`;1778 `output_tokens - thinking_tokens` approximates the non-reasoning output.17791780 default: 0, minimum: 017811782 - `server_tool_use: BetaServerToolUsage or null`17831784 The number of server tool requests.17851786 - `web_fetch_requests: number`17871788 The number of web fetch tool requests.17891790 default: 0, minimum: 017911792 - `web_search_requests: number`17931794 The number of web search tool requests.17951796 default: 0, minimum: 017971798 - `service_tier: "standard" or "priority" or "batch" or null`17991800 If the request used the priority, standard, or batch tier.18011802 - `"standard"`18031804 - `"priority"`18051806 - `"batch"`18071808 - `speed: "standard" or "fast" or null`18091810 Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time.18111812 - `"standard"`18131814 - `"fast"`18151816 - `input_transformations: optional array of BetaInputTransformation or null`18171818 Changes the API made to the request's input before showing it to the model,1819 and blocks that failed a binding check but were left unchanged: one entry per1820 block, in request order. Two entry types today. `thinking_dropped` — a1821 `thinking`, `redacted_thinking` or `connector_text` block from the request's1822 `messages` that was removed from the prompt instead of being shown to the1823 model because it failed a binding check. `thinking_mismatch_allowed` — a1824 `thinking` or `redacted_thinking` block that failed the conversation check1825 (the conversation before it differs from the one it was created in, or it1826 carries no record of one on a model that requires it) and was shown to the1827 model all the same, because that check is not enforced for this request.1828 More entry types may be added over time; ignore types you do not recognize.18291830 Requires `anthropic-beta: thinking-binding-controls-2026-08-01`. Present on1831 every such response from a model that supports extended thinking, as `[]`1832 when there is no entry to report; without the beta, blocks are removed or1833 left in place all the same but nothing is reported. Removed blocks contribute1834 nothing to `usage.input_tokens`; blocks left in place count as sent. When1835 streaming, the array is final in `message_start`; the final `message_delta`1836 event carries it only when a server-side model fallback happened mid-stream,1837 in which case it holds the serving model's entries and replaces the one in1838 `message_start`.18391840 - `BetaThinkingDroppedInputTransformation object`18411842 - `type: "thinking_dropped"`18431844 Always `thinking_dropped` for this entry type.18451846 default: thinking_dropped18471848 - `path: string`18491850 Where the removed block was in your request, as `messages.{i}.content.{j}`:1851 `i` indexes the `messages` array you sent and `j` that message's `content`1852 array — the same form error messages use.18531854 - `reason: "model_binding_mismatch" or "prefix_binding_mismatch" or "organization_binding_mismatch" or "end_user_binding_mismatch"`18551856 Which binding check removed the block: `model_binding_mismatch` — it was1857 created by a model whose reasoning the requested model may not read;1858 `prefix_binding_mismatch` — the conversation before it differs from the1859 conversation it was created in (the rest of that turn's consecutive thinking1860 blocks are removed with it, each with this reason);1861 `organization_binding_mismatch` — it was created under a different1862 organization (an Anthropic organization, AWS account or Google Cloud project)1863 and this organization is not one of its additional organizations;1864 `end_user_binding_mismatch` — it was created for a different end user, or1865 was removed by the consumer-organization binding. A block that would fail1866 several checks reports one reason, in this order of precedence:1867 `organization_binding_mismatch`, `end_user_binding_mismatch`,1868 `model_binding_mismatch`, `prefix_binding_mismatch`.18691870 - `"model_binding_mismatch"`18711872 - `"prefix_binding_mismatch"`18731874 - `"organization_binding_mismatch"`18751876 - `"end_user_binding_mismatch"`18771878 - `BetaThinkingMismatchAllowedInputTransformation object`18791880 - `type: "thinking_mismatch_allowed"`18811882 Always `thinking_mismatch_allowed` for this entry type.18831884 default: thinking_mismatch_allowed18851886 - `path: string`18871888 Where the block is in your request, as `messages.{i}.content.{j}`:1889 `i` indexes the `messages` array you sent and `j` that message's `content`1890 array — the same form error messages use.18911892 - `reason: "model_binding_mismatch" or "prefix_binding_mismatch" or "organization_binding_mismatch" or "end_user_binding_mismatch"`18931894 Which binding check the block failed; the block was shown to the model all1895 the same. Always `prefix_binding_mismatch` today — the conversation before1896 the block differs from the conversation it was created in, or the block1897 carries no record of one on a model that requires it. Were the check1898 enforced for this request, the block would have been removed or the request1899 rejected (`thinking.block_binding.prefix_mismatch_behavior`). A removal also1900 takes the rest of that turn's consecutive thinking blocks, whereas here each1901 block is checked on its own, so `thinking_mismatch_allowed` entries are a1902 lower bound on what enforcement would remove.19031904 - `"model_binding_mismatch"`19051906 - `"prefix_binding_mismatch"`19071908 - `"organization_binding_mismatch"`19091910 - `"end_user_binding_mismatch"`19111912 - `BetaMessageBatchErroredResult object`19131914 - `type: "errored"`19151916 default: errored19171918 - `error: BetaErrorResponse`19191920 - `type: "error"`19211922 default: error19231924 - `error: BetaError`19251926 - `BetaInvalidRequestError object`19271928 - `type: "invalid_request_error"`19291930 default: invalid_request_error19311932 - `message: string`19331934 default: Invalid request19351936 - `BetaAuthenticationError object`19371938 - `type: "authentication_error"`19391940 default: authentication_error19411942 - `message: string`19431944 default: Authentication error19451946 - `BetaBillingError object`19471948 - `type: "billing_error"`19491950 default: billing_error19511952 - `message: string`19531954 default: Billing error19551956 - `BetaPermissionError object`19571958 - `type: "permission_error"`19591960 default: permission_error19611962 - `message: string`19631964 default: Permission denied19651966 - `BetaNotFoundError object`19671968 - `type: "not_found_error"`19691970 default: not_found_error19711972 - `message: string`19731974 default: Not found19751976 - `BetaRateLimitError object`19771978 - `type: "rate_limit_error"`19791980 default: rate_limit_error19811982 - `message: string`19831984 default: Rate limited19851986 - `BetaGatewayTimeoutError object`19871988 - `type: "timeout_error"`19891990 default: timeout_error19911992 - `message: string`19931994 default: Request timeout19951996 - `BetaAPIError object`19971998 - `type: "api_error"`19992000 default: api_error20012002 - `message: string`20032004 default: Internal server error20052006 - `BetaOverloadedError object`20072008 - `type: "overloaded_error"`20092010 default: overloaded_error20112012 - `message: string`20132014 default: Overloaded20152016 - `request_id: string or null`20172018 - `BetaMessageBatchCanceledResult object`20192020 - `type: "canceled"`20212022 default: canceled20232024 - `BetaMessageBatchExpiredResult object`20252026 - `type: "expired"`20272028 default: expired20292030## Example20312032```bash2033curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \2034 -H 'anthropic-version: 2023-06-01' \2035 -H 'anthropic-beta: message-batches-2024-09-24' \2036 -H "X-Api-Key: $ANTHROPIC_API_KEY"2037```2038