SPB Git

Repository Public

results.md 33.1 KB 1,214 lines markdown

1---2title: Retrieve Message Batch results3url: https://platform.claude.com/docs/en/api/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-workspace-id": optional string`2526## Returns2728- `MessageBatchIndividualResponse object`2930  This is a single line in the response `.jsonl` file and does not represent the response as a whole.3132  - `custom_id: string`3334    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.3536    Must be unique for each request within the Message Batch.3738  - `result: MessageBatchResult`3940    Processing result for this request.4142    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.4344    - `MessageBatchSucceededResult object`4546      - `type: "succeeded"`4748        default: succeeded4950      - `message: Message`5152        - `type: "message"`5354          Object type.5556          For Messages, this is always `"message"`.5758          default: message5960        - `id: string`6162          Unique object identifier.6364          The format and length of IDs may change over time.6566        - `container: Container or null`6768          Information about the container used in the request (for the code execution tool)6970          - `id: string`7172            Identifier for the container used in this request7374          - `expires_at: string`7576            The time at which the container will expire.7778            format: date-time7980          - `skills: array of ContainerSkill or null`8182            Skills loaded in the container8384            - `type: "anthropic" or "custom"`8586              Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)8788              - `"anthropic"`8990              - `"custom"`9192            - `skill_id: string`9394              Skill ID9596              maxLength: 64, minLength: 19798            - `version: string`99100              The resolved version: a skill version ID for custom skills.101102              maxLength: 64, minLength: 1103104        - `content: array of ContentBlock`105106          Content generated by the model.107108          This is an array of content blocks, each of which has a `type` that determines its shape.109110          Example:111112          ```json113          [{"type": "text", "text": "Hi, I'm Claude."}]114          ```115116          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.117118          For example, if the input `messages` were:119120          ```json121          [122            {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"},123            {"role": "assistant", "content": "The best answer is ("}124          ]125          ```126127          Then the response `content` might be:128129          ```json130          [{"type": "text", "text": "B)"}]131          ```132133          - `TextBlock object`134135            - `type: "text"`136137              default: text138139            - `citations: array of TextCitation or null`140141              Citations supporting the text block.142143              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`.144145              - `CitationCharLocation object`146147                - `type: "char_location"`148149                  default: char_location150151                - `cited_text: string`152153                - `document_index: number`154155                  minimum: 0156157                - `document_title: string or null`158159                - `end_char_index: number`160161                - `file_id: string or null`162163                - `start_char_index: number`164165                  minimum: 0166167              - `CitationPageLocation object`168169                - `type: "page_location"`170171                  default: page_location172173                - `cited_text: string`174175                - `document_index: number`176177                  minimum: 0178179                - `document_title: string or null`180181                - `end_page_number: number`182183                - `file_id: string or null`184185                - `start_page_number: number`186187                  minimum: 1188189              - `CitationContentBlockLocation object`190191                - `type: "content_block_location"`192193                  default: content_block_location194195                - `cited_text: string`196197                  The full text of the cited block range, concatenated.198199                  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.200201                - `document_index: number`202203                  minimum: 0204205                - `document_title: string or null`206207                - `end_block_index: number`208209                  Exclusive 0-based end index of the cited block range in the source's `content` array.210211                  Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.212213                - `file_id: string or null`214215                - `start_block_index: number`216217                  0-based index of the first cited block in the source's `content` array.218219                  minimum: 0220221              - `CitationsWebSearchResultLocation object`222223                - `type: "web_search_result_location"`224225                  default: web_search_result_location226227                - `cited_text: string`228229                - `encrypted_index: string`230231                - `title: string or null`232233                  maxLength: 512234235                - `url: string`236237              - `CitationsSearchResultLocation object`238239                - `type: "search_result_location"`240241                  default: search_result_location242243                - `cited_text: string`244245                  The full text of the cited block range, concatenated.246247                  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.248249                - `end_block_index: number`250251                  Exclusive 0-based end index of the cited block range in the source's `content` array.252253                  Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.254255                - `search_result_index: number`256257                  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.258259                  Counted separately from `document_index`; server-side web search results are not included in this count.260261                  minimum: 0262263                - `source: string`264265                - `start_block_index: number`266267                  0-based index of the first cited block in the source's `content` array.268269                  minimum: 0270271                - `title: string or null`272273            - `text: string`274275              minLength: 0276277          - `ThinkingBlock object`278279            - `type: "thinking"`280281              default: thinking282283            - `signature: string`284285              A value used to verify that this thinking block was generated by Claude when it is passed back to the API.286287              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.288289              See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details.290291            - `thinking: string`292293              The text of Claude's thinking process for this block.294295          - `RedactedThinkingBlock object`296297            - `type: "redacted_thinking"`298299              default: redacted_thinking300301            - `data: string`302303              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.304305              Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation.306307              See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details.308309          - `ToolUseBlock object`310311            - `type: "tool_use"`312313              default: tool_use314315            - `id: string`316317              pattern: ^[a-zA-Z0-9_-]+$318319            - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120`320321              default: {"type":"direct"}322323              - `DirectCaller object`324325                Tool invocation directly from the model.326327                - `type: "direct"`328329              - `ServerToolCaller object`330331                Tool invocation generated by a server-side tool.332333                - `type: "code_execution_20250825"`334335                - `tool_id: string`336337                  pattern: ^srvtoolu_[a-zA-Z0-9_]+$338339              - `ServerToolCaller20260120 object`340341                - `type: "code_execution_20260120"`342343                - `tool_id: string`344345                  pattern: ^srvtoolu_[a-zA-Z0-9_]+$346347            - `input: map[unknown]`348349            - `name: string`350351              minLength: 1352353            - `toolset_name: optional string or null`354355              For a toolset member tool_use, the toolset family.356357              maxLength: 64, minLength: 1, pattern: ^[a-zA-Z0-9_-]+$358359          - `ServerToolUseBlock object`360361            - `type: "server_tool_use"`362363              default: server_tool_use364365            - `id: string`366367              pattern: ^srvtoolu_[a-zA-Z0-9_]+$368369            - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120`370371              default: {"type":"direct"}372373              - `DirectCaller object`374375                Tool invocation directly from the model.376377              - `ServerToolCaller object`378379                Tool invocation generated by a server-side tool.380381              - `ServerToolCaller20260120 object`382383            - `input: map[unknown]`384385            - `name: "web_search" or "web_fetch" or "code_execution" or 4 more`386387              - `"web_search"`388389              - `"web_fetch"`390391              - `"code_execution"`392393              - `"bash_code_execution"`394395              - `"text_editor_code_execution"`396397              - `"tool_search_tool_regex"`398399              - `"tool_search_tool_bm25"`400401          - `WebSearchToolResultBlock object`402403            - `type: "web_search_tool_result"`404405              default: web_search_tool_result406407            - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120`408409              default: {"type":"direct"}410411              - `DirectCaller object`412413                Tool invocation directly from the model.414415              - `ServerToolCaller object`416417                Tool invocation generated by a server-side tool.418419              - `ServerToolCaller20260120 object`420421            - `content: WebSearchToolResultBlockContent`422423              - `WebSearchToolResultError object`424425                - `type: "web_search_tool_result_error"`426427                  default: web_search_tool_result_error428429                - `error_code: WebSearchToolResultErrorCode`430431                  - `"invalid_tool_input"`432433                  - `"unavailable"`434435                  - `"max_uses_exceeded"`436437                  - `"too_many_requests"`438439                  - `"query_too_long"`440441                  - `"request_too_large"`442443              - `array of WebSearchResultBlock`444445                - `type: "web_search_result"`446447                  default: web_search_result448449                - `encrypted_content: string`450451                - `page_age: string or null`452453                - `title: string`454455                - `url: string`456457            - `tool_use_id: string`458459              pattern: ^srvtoolu_[a-zA-Z0-9_]+$460461          - `WebFetchToolResultBlock object`462463            - `type: "web_fetch_tool_result"`464465              default: web_fetch_tool_result466467            - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120`468469              default: {"type":"direct"}470471              - `DirectCaller object`472473                Tool invocation directly from the model.474475              - `ServerToolCaller object`476477                Tool invocation generated by a server-side tool.478479              - `ServerToolCaller20260120 object`480481            - `content: WebFetchToolResultErrorBlock or WebFetchBlock`482483              - `WebFetchToolResultErrorBlock object`484485                - `type: "web_fetch_tool_result_error"`486487                  default: web_fetch_tool_result_error488489                - `error_code: WebFetchToolResultErrorCode`490491                  - `"invalid_tool_input"`492493                  - `"url_too_long"`494495                  - `"url_not_allowed"`496497                  - `"url_not_in_prior_context"`498499                  - `"url_not_accessible"`500501                  - `"unsupported_content_type"`502503                  - `"too_many_requests"`504505                  - `"max_uses_exceeded"`506507                  - `"unavailable"`508509                  - `"content_too_large"`510511              - `WebFetchBlock object`512513                - `type: "web_fetch_result"`514515                  default: web_fetch_result516517                - `content: DocumentBlock`518519                  - `type: "document"`520521                    default: document522523                  - `citations: CitationsConfig or null`524525                    Citation configuration for the document526527                    - `enabled: boolean`528529                      default: false530531                  - `source: Base64PDFSource or PlainTextSource`532533                    - `Base64PDFSource object`534535                      - `type: "base64"`536537                      - `data: string`538539                        format: byte540541                      - `media_type: "application/pdf"`542543                    - `PlainTextSource object`544545                      - `type: "text"`546547                      - `data: string`548549                      - `media_type: "text/plain"`550551                  - `title: string or null`552553                    The title of the document554555                - `retrieved_at: string or null`556557                  ISO 8601 timestamp when the content was retrieved558559                - `url: string`560561                  Fetched content URL562563            - `tool_use_id: string`564565              pattern: ^srvtoolu_[a-zA-Z0-9_]+$566567          - `CodeExecutionToolResultBlock object`568569            - `type: "code_execution_tool_result"`570571              default: code_execution_tool_result572573            - `content: CodeExecutionToolResultBlockContent`574575              - `CodeExecutionToolResultError object`576577                - `type: "code_execution_tool_result_error"`578579                  default: code_execution_tool_result_error580581                - `error_code: CodeExecutionToolResultErrorCode`582583                  - `"invalid_tool_input"`584585                  - `"unavailable"`586587                  - `"too_many_requests"`588589                  - `"execution_time_exceeded"`590591              - `CodeExecutionResultBlock object`592593                - `type: "code_execution_result"`594595                  default: code_execution_result596597                - `content: array of CodeExecutionOutputBlock`598599                  - `type: "code_execution_output"`600601                    default: code_execution_output602603                  - `file_id: string`604605                - `return_code: number`606607                - `stderr: string`608609                - `stdout: string`610611              - `EncryptedCodeExecutionResultBlock object`612613                Code execution result with encrypted stdout for PFC + web_search results.614615                - `type: "encrypted_code_execution_result"`616617                  default: encrypted_code_execution_result618619                - `content: array of CodeExecutionOutputBlock`620621                  - `type: "code_execution_output"`622623                    default: code_execution_output624625                  - `file_id: string`626627                - `encrypted_stdout: string`628629                - `return_code: number`630631                - `stderr: string`632633            - `tool_use_id: string`634635              pattern: ^srvtoolu_[a-zA-Z0-9_]+$636637          - `BashCodeExecutionToolResultBlock object`638639            - `type: "bash_code_execution_tool_result"`640641              default: bash_code_execution_tool_result642643            - `content: BashCodeExecutionToolResultError or BashCodeExecutionResultBlock`644645              - `BashCodeExecutionToolResultError object`646647                - `type: "bash_code_execution_tool_result_error"`648649                  default: bash_code_execution_tool_result_error650651                - `error_code: BashCodeExecutionToolResultErrorCode`652653                  - `"invalid_tool_input"`654655                  - `"unavailable"`656657                  - `"too_many_requests"`658659                  - `"execution_time_exceeded"`660661                  - `"output_file_too_large"`662663              - `BashCodeExecutionResultBlock object`664665                - `type: "bash_code_execution_result"`666667                  default: bash_code_execution_result668669                - `content: array of BashCodeExecutionOutputBlock`670671                  - `type: "bash_code_execution_output"`672673                    default: bash_code_execution_output674675                  - `file_id: string`676677                - `return_code: number`678679                - `stderr: string`680681                - `stdout: string`682683            - `tool_use_id: string`684685              pattern: ^srvtoolu_[a-zA-Z0-9_]+$686687          - `TextEditorCodeExecutionToolResultBlock object`688689            - `type: "text_editor_code_execution_tool_result"`690691              default: text_editor_code_execution_tool_result692693            - `content: TextEditorCodeExecutionToolResultError or TextEditorCodeExecutionViewResultBlock or TextEditorCodeExecutionCreateResultBlock or TextEditorCodeExecutionStrReplaceResultBlock`694695              - `TextEditorCodeExecutionToolResultError object`696697                - `type: "text_editor_code_execution_tool_result_error"`698699                  default: text_editor_code_execution_tool_result_error700701                - `error_code: TextEditorCodeExecutionToolResultErrorCode`702703                  - `"invalid_tool_input"`704705                  - `"unavailable"`706707                  - `"too_many_requests"`708709                  - `"execution_time_exceeded"`710711                  - `"file_not_found"`712713                - `error_message: string or null`714715              - `TextEditorCodeExecutionViewResultBlock object`716717                - `type: "text_editor_code_execution_view_result"`718719                  default: text_editor_code_execution_view_result720721                - `content: string`722723                - `file_type: "text" or "image" or "pdf"`724725                  - `"text"`726727                  - `"image"`728729                  - `"pdf"`730731                - `num_lines: number or null`732733                - `start_line: number or null`734735                - `total_lines: number or null`736737              - `TextEditorCodeExecutionCreateResultBlock object`738739                - `type: "text_editor_code_execution_create_result"`740741                  default: text_editor_code_execution_create_result742743                - `is_file_update: boolean`744745              - `TextEditorCodeExecutionStrReplaceResultBlock object`746747                - `type: "text_editor_code_execution_str_replace_result"`748749                  default: text_editor_code_execution_str_replace_result750751                - `lines: array of string or null`752753                - `new_lines: number or null`754755                - `new_start: number or null`756757                - `old_lines: number or null`758759                - `old_start: number or null`760761            - `tool_use_id: string`762763              pattern: ^srvtoolu_[a-zA-Z0-9_]+$764765          - `ToolSearchToolResultBlock object`766767            - `type: "tool_search_tool_result"`768769              default: tool_search_tool_result770771            - `content: ToolSearchToolResultError or ToolSearchToolSearchResultBlock`772773              - `ToolSearchToolResultError object`774775                - `type: "tool_search_tool_result_error"`776777                  default: tool_search_tool_result_error778779                - `error_code: ToolSearchToolResultErrorCode`780781                  - `"invalid_tool_input"`782783                  - `"unavailable"`784785                  - `"too_many_requests"`786787                  - `"execution_time_exceeded"`788789                - `error_message: string or null`790791              - `ToolSearchToolSearchResultBlock object`792793                - `type: "tool_search_tool_search_result"`794795                  default: tool_search_tool_search_result796797                - `tool_references: array of ToolReferenceBlock`798799                  - `type: "tool_reference"`800801                    default: tool_reference802803                  - `tool_name: string`804805                    maxLength: 256, minLength: 1, pattern: ^[a-zA-Z0-9_-]{1,256}$806807            - `tool_use_id: string`808809              pattern: ^srvtoolu_[a-zA-Z0-9_]+$810811          - `ContainerUploadBlock object`812813            Response model for a file uploaded to the container.814815            - `type: "container_upload"`816817              default: container_upload818819            - `file_id: string`820821        - `model: Model`822823          The model that will complete your prompt.824825          See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.826827          - `"claude-fable-5-1" or "claude-mythos-5-1" or "claude-sonnet-5" or 14 more`828829            The model that will complete your prompt.830831            See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.832833            - `"claude-fable-5-1"`834835              Frontier intelligence for ambitious tasks across coding, scientific discovery, and enterprise workflows836837            - `"claude-mythos-5-1"`838839              Our most capable model for cybersecurity and biology research, available through trusted access programs840841            - `"claude-sonnet-5"`842843              High-performance model for coding and agents844845            - `"claude-fable-5"`846847              Next generation of intelligence for the hardest knowledge work and coding problems848849            - `"claude-mythos-5"`850851              Most capable model for cybersecurity and biology research852853            - `"claude-opus-5"`854855              Powerful intelligence for long-running agents and coding856857            - `"claude-opus-4-8"`858859              Powerful intelligence for long-running agents and coding860861            - `"claude-opus-4-7"`862863              Powerful intelligence for long-running agents and coding864865            - `"claude-mythos-preview"`866867              New class of intelligence, strongest in coding and cybersecurity868869            - `"claude-opus-4-6"`870871              Powerful intelligence for long-running agents and coding872873            - `"claude-sonnet-4-6"`874875              Best combination of speed and intelligence876877            - `"claude-haiku-4-5"`878879              Fastest model with near-frontier intelligence880881            - `"claude-haiku-4-5-20251001"`882883              Fastest model with near-frontier intelligence884885            - `"claude-opus-4-5"`886887              Powerful intelligence for long-running agents and coding888889            - `"claude-opus-4-5-20251101"`890891              Powerful intelligence for long-running agents and coding892893            - `"claude-sonnet-4-5"`894895              High-performance model for agents and coding896897            - `"claude-sonnet-4-5-20250929"`898899              High-performance model for agents and coding900901          - `string`902903        - `role: "assistant"`904905          Conversational role of the generated message.906907          This will always be `"assistant"`.908909          default: assistant910911        - `stop_details: RefusalStopDetails or null`912913          Structured information about a refusal.914915          - `type: "refusal"`916917            default: refusal918919          - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null`920921            The policy category that triggered a refusal.922923            - `"cyber"`924925              The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category.926927            - `"bio"`928929              The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category.930931            - `"frontier_llm"`932933              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.934935            - `"reasoning_extraction"`936937              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).938939            - `"general_harms"`940941              The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category.942943          - `explanation: string or null`944945            Human-readable explanation of the refusal.946947            This text is not guaranteed to be stable. `null` when no explanation is available for the category.948949        - `stop_reason: StopReason or null`950951          The reason that we stopped.952953          This may be one the following values:954955          * `"end_turn"`: the model reached a natural stopping point956          * `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum957          * `"stop_sequence"`: one of your provided custom `stop_sequences` was generated958          * `"tool_use"`: the model invoked one or more tools959          * `"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.960          * `"refusal"`: when streaming classifiers intervene to handle potential policy violations961          * `"model_context_window_exceeded"`: we exceeded the model's context window962963          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.964965          - `"end_turn"`966967          - `"max_tokens"`968969          - `"stop_sequence"`970971          - `"tool_use"`972973          - `"pause_turn"`974975          - `"refusal"`976977          - `"model_context_window_exceeded"`978979        - `stop_sequence: string or null`980981          Which custom stop sequence was generated, if any.982983          This value will be a non-null string if one of your custom stop sequences was generated.984985        - `usage: Usage`986987          Billing and rate-limit usage.988989          Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems.990991          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.992993          For example, `output_tokens` will be non-zero, even for an empty string response from Claude.994995          Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`.996997          - `cache_creation: CacheCreation or null`998999            Breakdown of cached tokens by TTL10001001            - `ephemeral_1h_input_tokens: number`10021003              The number of input tokens used to create the 1 hour cache entry.10041005              default: 0, minimum: 010061007            - `ephemeral_5m_input_tokens: number`10081009              The number of input tokens used to create the 5 minute cache entry.10101011              default: 0, minimum: 010121013          - `cache_creation_input_tokens: number or null`10141015            The number of input tokens used to create the cache entry.10161017            minimum: 010181019          - `cache_read_input_tokens: number or null`10201021            The number of input tokens read from the cache.10221023            minimum: 010241025          - `inference_geo: string or null`10261027            The geographic region where inference was performed for this request.10281029          - `input_tokens: number`10301031            The number of input tokens which were used.10321033            minimum: 010341035          - `output_tokens: number`10361037            The number of output tokens which were used.10381039            minimum: 010401041          - `output_tokens_details: OutputTokensDetails or null`10421043            Breakdown of output tokens by category.10441045            `output_tokens` remains the inclusive, authoritative total used for billing.1046            This object provides a read-only decomposition for observability — for example,1047            how many of the billed output tokens were spent on internal reasoning that may1048            have been summarized before being returned to you.10491050            - `thinking_tokens: number`10511052              Number of output tokens the model generated as internal reasoning, including1053              the thinking-block delimiter tokens.10541055              Reflects the raw reasoning the model produced, not the (possibly shorter)1056              summarized thinking text returned in the response body. Computed by1057              re-tokenizing the raw reasoning text, so it may differ from the model's exact1058              generation count by a small number of tokens. Always ≤ `output_tokens`;1059              `output_tokens - thinking_tokens` approximates the non-reasoning output.10601061              default: 0, minimum: 010621063          - `server_tool_use: ServerToolUsage or null`10641065            The number of server tool requests.10661067            - `web_fetch_requests: number`10681069              The number of web fetch tool requests.10701071              default: 0, minimum: 010721073            - `web_search_requests: number`10741075              The number of web search tool requests.10761077              default: 0, minimum: 010781079          - `service_tier: "standard" or "priority" or "batch" or null`10801081            If the request used the priority, standard, or batch tier.10821083            - `"standard"`10841085            - `"priority"`10861087            - `"batch"`10881089    - `MessageBatchErroredResult object`10901091      - `type: "errored"`10921093        default: errored10941095      - `error: ErrorResponse`10961097        - `type: "error"`10981099          default: error11001101        - `error: ErrorObject`11021103          - `InvalidRequestError object`11041105            - `type: "invalid_request_error"`11061107              default: invalid_request_error11081109            - `message: string`11101111              default: Invalid request11121113          - `AuthenticationError object`11141115            - `type: "authentication_error"`11161117              default: authentication_error11181119            - `message: string`11201121              default: Authentication error11221123          - `BillingError object`11241125            - `type: "billing_error"`11261127              default: billing_error11281129            - `message: string`11301131              default: Billing error11321133          - `PermissionError object`11341135            - `type: "permission_error"`11361137              default: permission_error11381139            - `message: string`11401141              default: Permission denied11421143          - `NotFoundError object`11441145            - `type: "not_found_error"`11461147              default: not_found_error11481149            - `message: string`11501151              default: Not found11521153          - `RateLimitError object`11541155            - `type: "rate_limit_error"`11561157              default: rate_limit_error11581159            - `message: string`11601161              default: Rate limited11621163          - `GatewayTimeoutError object`11641165            - `type: "timeout_error"`11661167              default: timeout_error11681169            - `message: string`11701171              default: Request timeout11721173          - `APIErrorObject object`11741175            - `type: "api_error"`11761177              default: api_error11781179            - `message: string`11801181              default: Internal server error11821183          - `OverloadedError object`11841185            - `type: "overloaded_error"`11861187              default: overloaded_error11881189            - `message: string`11901191              default: Overloaded11921193        - `request_id: string or null`11941195    - `MessageBatchCanceledResult object`11961197      - `type: "canceled"`11981199        default: canceled12001201    - `MessageBatchExpiredResult object`12021203      - `type: "expired"`12041205        default: expired12061207## Example12081209```bash1210curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \1211    -H 'anthropic-version: 2023-06-01' \1212    -H "X-Api-Key: $ANTHROPIC_API_KEY"1213```1214
Files main
Menu

Theme