SPB Git

Repository Public

create.md 143.2 KB 4,265 lines markdown

1---2title: Create a Message Batch3url: https://platform.claude.com/docs/en/api/beta/messages/batches/create4---56# Create a Message Batch78**POST** `/v1/messages/batches`910Send a batch of Message creation requests.1112The Message Batches API can be used to process multiple Messages API requests at once. Once a Message Batch is created, it begins processing immediately. Batches can take up to 24 hours to complete.1314Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)1516## Headers1718- `"anthropic-beta": optional array of AnthropicBeta`1920  Optional header to specify the beta version(s) you want to use.2122  - `string`2324  - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`2526    - `"message-batches-2024-09-24"`2728    - `"prompt-caching-2024-07-31"`2930    - `"computer-use-2024-10-22"`3132    - `"computer-use-2025-01-24"`3334    - `"pdfs-2024-09-25"`3536    - `"token-counting-2024-11-01"`3738    - `"token-efficient-tools-2025-02-19"`3940    - `"output-128k-2025-02-19"`4142    - `"files-api-2025-04-14"`4344    - `"mcp-client-2025-04-04"`4546    - `"mcp-client-2025-11-20"`4748    - `"dev-full-thinking-2025-05-14"`4950    - `"interleaved-thinking-2025-05-14"`5152    - `"code-execution-2025-05-22"`5354    - `"extended-cache-ttl-2025-04-11"`5556    - `"context-1m-2025-08-07"`5758    - `"context-management-2025-06-27"`5960    - `"model-context-window-exceeded-2025-08-26"`6162    - `"skills-2025-10-02"`6364    - `"fast-mode-2026-02-01"`6566    - `"output-300k-2026-03-24"`6768    - `"user-profiles-2026-03-24"`6970    - `"user-profiles-2026-08-18"`7172    - `"user-profiles-2026-09-04"`7374    - `"advisor-tool-2026-03-01"`7576    - `"managed-agents-2026-04-01"`7778    - `"cache-diagnosis-2026-04-07"`7980    - `"dreaming-2026-04-21"`8182    - `"thinking-token-count-2026-05-13"`8384    - `"server-side-fallback-2026-06-01"`8586    - `"server-side-fallback-2026-07-01"`8788    - `"fallback-credit-2026-06-01"`8990    - `"fallback-credit-2026-07-01"`9192    - `"agent-memory-2026-07-22"`9394    - `"mid-conversation-tool-changes-2026-07-01"`9596    - `"compact-2026-01-12"`9798    - `"computer-use-2025-11-24"`99100    - `"mcp-tunnels-2026-06-22"`101102    - `"structured-outputs-2025-11-13"`103104    - `"task-budgets-2026-03-13"`105106    - `"thinking-display-updates-2026-08-18"`107108    - `"ce-user-management-2026-07-13"`109110    - `"mid-conversation-output-config-2026-07-01"`111112    - `"thinking-binding-controls-2026-08-01"`113114    - `"mid-conversation-system-clear-at-2026-08-21"`115116    - `"compact-2026-09-04"`117118- `"anthropic-user-profile-id": optional string`119120  The user profile ID to attribute the requests in this batch to. Use when acting on behalf of a party other than your organization. Requires the `user-profiles` beta header. Applies to every request in the batch; an individual request whose `user_profile_id` body field conflicts with this header is errored.121122- `"anthropic-workspace-id": optional string`123124## Body parameters125126- `requests: array of object`127128  List of requests for prompt completion. Each is an individual request to create a Message.129130  maxItems: 100000, minItems: 1131132  - `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    maxLength: 64, minLength: 1, pattern: ^[a-zA-Z0-9_-]{1,64}$139140  - `params: object`141142    Messages API creation parameters for the individual request.143144    See the [Messages API reference](https://platform.claude.com/docs/en/api/messages) for full documentation on available parameters.145146    - `max_tokens: number`147148      The maximum number of tokens to generate before stopping.149150      Note that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate.151152      Set to `0` to populate the [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pre-warming-the-cache) without generating a response.153154      Different models have different maximum values for this parameter.  See [models](https://platform.claude.com/docs/en/about-claude/models/overview) for details.155156      minimum: 0157158    - `messages: array of BetaMessageParam`159160      Input messages.161162      Our models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn.163164      Each input message must be an object with a `role` and `content`. You can specify a single `user`-role message, or you can include multiple `user` and `assistant` messages.165166      If the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response.167168      Example with a single `user` message:169170      ```json171      [{"role": "user", "content": "Hello, Claude"}]172      ```173174      Example with multiple conversational turns:175176      ```json177      [178        {"role": "user", "content": "Hello there."},179        {"role": "assistant", "content": "Hi, I'm Claude. How can I help you?"},180        {"role": "user", "content": "Can you explain LLMs in plain English?"},181      ]182      ```183184      Example with a partially-filled response from Claude:185186      ```json187      [188        {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"},189        {"role": "assistant", "content": "The best answer is ("},190      ]191      ```192193      Each input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `"text"`. The following input messages are equivalent:194195      ```json196      {"role": "user", "content": "Hello, Claude"}197      ```198199      ```json200      {"role": "user", "content": [{"type": "text", "text": "Hello, Claude"}]}201      ```202203      See [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages).204205      Note that if you want to include a [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role), you can use the top-level `system` parameter — there is no `"system"` role for input messages in the Messages API.206207      There is a limit of 100,000 messages in a single request.208209      - `content: string or array of BetaContentBlockParam`210211        - `string`212213        - `array of BetaContentBlockParam`214215          - `BetaTextBlockParam object`216217            - `type: "text"`218219            - `text: string`220221              minLength: 1222223            - `cache_control: optional BetaCacheControlEphemeral or null`224225              Create a cache control breakpoint at this content block.226227              - `type: "ephemeral"`228229              - `ttl: optional "5m" or "1h"`230231                The time-to-live for the cache control breakpoint.232233                This may be one the following values:234235                - `5m`: 5 minutes236                - `1h`: 1 hour237238                Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details.239240                - `"5m"`241242                - `"1h"`243244            - `citations: optional array of BetaTextCitationParam or null`245246              - `BetaCitationCharLocationParam object`247248                - `type: "char_location"`249250                - `cited_text: string`251252                - `document_index: number`253254                  minimum: 0255256                - `document_title: string or null`257258                  maxLength: 500, minLength: 1259260                - `end_char_index: number`261262                - `start_char_index: number`263264                  minimum: 0265266              - `BetaCitationPageLocationParam object`267268                - `type: "page_location"`269270                - `cited_text: string`271272                - `document_index: number`273274                  minimum: 0275276                - `document_title: string or null`277278                  maxLength: 500, minLength: 1279280                - `end_page_number: number`281282                - `start_page_number: number`283284                  minimum: 1285286              - `BetaCitationContentBlockLocationParam object`287288                - `type: "content_block_location"`289290                - `cited_text: string`291292                  The full text of the cited block range, concatenated.293294                  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.295296                - `document_index: number`297298                  minimum: 0299300                - `document_title: string or null`301302                  maxLength: 500, minLength: 1303304                - `end_block_index: number`305306                  Exclusive 0-based end index of the cited block range in the source's `content` array.307308                  Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.309310                - `start_block_index: number`311312                  0-based index of the first cited block in the source's `content` array.313314                  minimum: 0315316              - `BetaCitationWebSearchResultLocationParam object`317318                - `type: "web_search_result_location"`319320                - `cited_text: string`321322                - `encrypted_index: string`323324                - `title: string or null`325326                  maxLength: 512, minLength: 1327328                - `url: string`329330                  minLength: 1331332              - `BetaCitationSearchResultLocationParam object`333334                - `type: "search_result_location"`335336                - `cited_text: string`337338                  The full text of the cited block range, concatenated.339340                  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.341342                - `end_block_index: number`343344                  Exclusive 0-based end index of the cited block range in the source's `content` array.345346                  Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.347348                - `search_result_index: number`349350                  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.351352                  Counted separately from `document_index`; server-side web search results are not included in this count.353354                  minimum: 0355356                - `source: string`357358                - `start_block_index: number`359360                  0-based index of the first cited block in the source's `content` array.361362                  minimum: 0363364                - `title: string or null`365366          - `BetaImageBlockParam object`367368            - `type: "image"`369370            - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource`371372              - `BetaBase64ImageSource object`373374                - `type: "base64"`375376                - `data: string`377378                  format: byte379380                - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"`381382                  - `"image/jpeg"`383384                  - `"image/png"`385386                  - `"image/gif"`387388                  - `"image/webp"`389390              - `BetaURLImageSource object`391392                - `type: "url"`393394                - `url: string`395396              - `BetaFileImageSource object`397398                - `type: "file"`399400                - `file_id: string`401402            - `cache_control: optional BetaCacheControlEphemeral or null`403404              Create a cache control breakpoint at this content block.405406            - `transformations: optional BetaImageTransformationsParam or null`407408              Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field.409410              - `oversized_image: optional "downsize" or "error"`411412                What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately — your image is never silently scaled down.413414                - `"downsize"`415416                - `"error"`417418          - `BetaRequestDocumentBlock object`419420            - `type: "document"`421422            - `source: BetaBase64PDFSource or BetaPlainTextSource or BetaContentBlockSource or 2 more`423424              - `BetaBase64PDFSource object`425426                - `type: "base64"`427428                - `data: string`429430                  format: byte431432                - `media_type: "application/pdf"`433434              - `BetaPlainTextSource object`435436                - `type: "text"`437438                - `data: string`439440                - `media_type: "text/plain"`441442              - `BetaContentBlockSource object`443444                - `type: "content"`445446                - `content: string or array of BetaContentBlockSourceContent`447448                  - `string`449450                  - `BetaContentBlockSourceContent = array of BetaContentBlockSourceContent`451452                    - `BetaTextBlockParam object`453454                    - `BetaImageBlockParam object`455456              - `BetaURLPDFSource object`457458                - `type: "url"`459460                - `url: string`461462              - `BetaFileDocumentSource object`463464                - `type: "file"`465466                - `file_id: string`467468            - `cache_control: optional BetaCacheControlEphemeral or null`469470              Create a cache control breakpoint at this content block.471472            - `citations: optional BetaCitationsConfigParam or null`473474              - `enabled: optional boolean`475476            - `context: optional string or null`477478              minLength: 1479480            - `title: optional string or null`481482              maxLength: 500, minLength: 1483484          - `BetaSearchResultBlockParam object`485486            - `type: "search_result"`487488            - `content: array of BetaTextBlockParam`489490              - `type: "text"`491492              - `text: string`493494                minLength: 1495496              - `cache_control: optional BetaCacheControlEphemeral or null`497498                Create a cache control breakpoint at this content block.499500              - `citations: optional array of BetaTextCitationParam or null`501502            - `source: string`503504            - `title: string`505506            - `cache_control: optional BetaCacheControlEphemeral or null`507508              Create a cache control breakpoint at this content block.509510            - `citations: optional BetaCitationsConfigParam`511512          - `BetaThinkingBlockParam object`513514            - `type: "thinking"`515516            - `signature: string`517518              The `signature` value of this thinking block, exactly as returned by the API in a previous response. Used to verify that the block was generated by Claude.519520              Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`.521522            - `thinking: string`523524              The `thinking` text of this block as returned by the API.525526          - `BetaRedactedThinkingBlockParam object`527528            - `type: "redacted_thinking"`529530            - `data: string`531532              The `data` value of this redacted thinking block, exactly as returned by the API in a previous response. Opaque and encrypted; pass it back unchanged.533534          - `BetaToolUseBlockParam object`535536            - `type: "tool_use"`537538            - `id: string`539540              pattern: ^[a-zA-Z0-9_-]+$541542            - `input: map[unknown]`543544            - `name: string`545546              maxLength: 200, minLength: 1547548            - `cache_control: optional BetaCacheControlEphemeral or null`549550              Create a cache control breakpoint at this content block.551552            - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120`553554              - `BetaDirectCaller object`555556                Tool invocation directly from the model.557558                - `type: "direct"`559560              - `BetaServerToolCaller object`561562                Tool invocation generated by a server-side tool.563564                - `type: "code_execution_20250825"`565566                - `tool_id: string`567568                  pattern: ^srvtoolu_[a-zA-Z0-9_]+$569570              - `BetaServerToolCaller20260120 object`571572                - `type: "code_execution_20260120"`573574                - `tool_id: string`575576                  pattern: ^srvtoolu_[a-zA-Z0-9_]+$577578            - `toolset_name: optional string or null`579580              For a toolset member tool_use, the toolset family this member belongs to.581582              maxLength: 64, minLength: 1, pattern: ^[a-zA-Z0-9_-]+$583584          - `BetaToolResultBlockParam object`585586            - `type: "tool_result"`587588            - `tool_use_id: string`589590              pattern: ^[a-zA-Z0-9_-]+$591592            - `cache_control: optional BetaCacheControlEphemeral or null`593594              Create a cache control breakpoint at this content block.595596            - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more`597598              - `string`599600              - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more`601602                - `BetaTextBlockParam object`603604                - `BetaImageBlockParam object`605606                - `BetaSearchResultBlockParam object`607608                - `BetaRequestDocumentBlock object`609610                - `BetaToolReferenceBlockParam object`611612                  Tool reference block that can be included in tool_result content.613614                  - `type: "tool_reference"`615616                  - `tool_name: string`617618                    maxLength: 256, minLength: 1, pattern: ^[a-zA-Z0-9_-]{1,256}$619620                  - `cache_control: optional BetaCacheControlEphemeral or null`621622                    Create a cache control breakpoint at this content block.623624                - `BetaBrowserStateBlockParam object`625626                  The caller's browser state after a browser toolset member call —627                  the full inventory of open tabs, which tab is active, and any side628                  effects (tabs opened, download state changes) the call produced.629630                  At most one per `tool_result`, only on a non-error result answering a631                  browser toolset member `tool_use`. The server renders the632                  model-visible text from it; the model never sees the raw fields.633634                  - `type: "browser_state"`635636                  - `tabs: array of BetaBrowserStateTabEntry`637638                    All tabs open in the browser after this call — the full inventory, not a delta. May be empty. Whenever non-empty, exactly one entry carries `active: true`.639640                    maxItems: 100641642                    - `tab_id: string`643644                      The caller-assigned identifier for this tab, unique within the inventory.645646                      maxLength: 4096, minLength: 1, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$647648                    - `title: string`649650                      The title of the page the tab is showing. May be empty.651652                      maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$653654                    - `url: string`655656                      The URL of the page the tab is showing. May be empty.657658                      maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$659660                    - `active: optional boolean`661662                      Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`.663664                  - `cache_control: optional BetaCacheControlEphemeral or null`665666                    Create a cache control breakpoint at this content block.667668                  - `state_changes: optional array of BetaBrowserStateChange or null`669670                    Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list.671672                    maxItems: 200, minItems: 1673674                    - `BetaBrowserStateChangeTabOpened object`675676                      A tab this call's execution opened that remains open at its end —677                      the creation delta of the `tabs` inventory, not an event log.678679                      Carries only the `tab_id`; the tab's `title` and `url` live on its680                      `tabs` entry, which must include the same `tab_id`. A tab opened681                      during a failed call gets no deferred `tab_opened`; it simply appears682                      in the next result's `tabs` inventory.683684                      - `type: "tab_opened"`685686                      - `tab_id: string`687688                        The `tab_id` of the opened tab, present in `tabs`.689690                        maxLength: 4096, minLength: 1, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$691692                    - `BetaBrowserStateChangeDownloadStarted object`693694                      A file download that started during this call.695696                      - `type: "download_started"`697698                      - `download_id: string`699700                        The caller-assigned identifier for this download, stable across the state changes reporting it.701702                        maxLength: 4096, minLength: 1, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$703704                      - `url: string`705706                        The final post-redirect URL the download was served from.707708                        maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$709710                    - `BetaBrowserStateChangeDownloadCompleted object`711712                      A file download that finished during this call, reported with the713                      same `download_id` as its `download_started` — or without a prior714                      `download_started`, when the download finished during the call that715                      started it (at most one state change per `download_id` per result).716717                      - `type: "download_completed"`718719                      - `download_id: string`720721                        The caller-assigned identifier for this download, stable across the state changes reporting it.722723                        maxLength: 4096, minLength: 1, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$724725                      - `url: string`726727                        The final post-redirect URL the download was served from.728729                        maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$730731                      - `path: optional string or null`732733                        Where the executor saved the file, on the executor's filesystem. Only included when another tool in the same environment can read the file at that path.734735                        pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$, maxLength: 4096736737                      - `size_bytes: optional number or null`738739                        The completed download's size.740741                        minimum: 0742743                    - `BetaBrowserStateChangeDownloadFailed object`744745                      A file download that failed — or was cancelled — during this call.746747                      - `type: "download_failed"`748749                      - `download_id: string`750751                        The caller-assigned identifier for this download, stable across the state changes reporting it.752753                        maxLength: 4096, minLength: 1, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$754755                      - `url: string`756757                        The final post-redirect URL the download was served from.758759                        maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$760761                      - `error: optional string or null`762763                        The failure or cancellation detail, when known.764765                        pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$, maxLength: 4096766767            - `is_error: optional boolean`768769            - `toolset_name: optional string or null`770771              For a toolset member tool_result, the toolset family of the paired tool_use.772773              maxLength: 64, minLength: 1, pattern: ^[a-zA-Z0-9_-]+$774775          - `BetaServerToolUseBlockParam object`776777            - `type: "server_tool_use"`778779            - `id: string`780781              pattern: ^srvtoolu_[a-zA-Z0-9_]+$782783            - `input: map[unknown]`784785            - `name: "advisor" or "web_search" or "web_fetch" or 5 more`786787              - `"advisor"`788789              - `"web_search"`790791              - `"web_fetch"`792793              - `"code_execution"`794795              - `"bash_code_execution"`796797              - `"text_editor_code_execution"`798799              - `"tool_search_tool_regex"`800801              - `"tool_search_tool_bm25"`802803            - `cache_control: optional BetaCacheControlEphemeral or null`804805              Create a cache control breakpoint at this content block.806807            - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120`808809              - `BetaDirectCaller object`810811                Tool invocation directly from the model.812813              - `BetaServerToolCaller object`814815                Tool invocation generated by a server-side tool.816817              - `BetaServerToolCaller20260120 object`818819          - `BetaWebSearchToolResultBlockParam object`820821            - `type: "web_search_tool_result"`822823            - `content: BetaWebSearchToolResultBlockParamContent`824825              - `ResultBlock = array of BetaWebSearchResultBlockParam`826827                - `type: "web_search_result"`828829                - `encrypted_content: string`830831                - `title: string`832833                - `url: string`834835                - `page_age: optional string or null`836837              - `BetaWebSearchToolRequestError object`838839                - `type: "web_search_tool_result_error"`840841                - `error_code: BetaWebSearchToolResultErrorCode`842843                  - `"invalid_tool_input"`844845                  - `"unavailable"`846847                  - `"max_uses_exceeded"`848849                  - `"too_many_requests"`850851                  - `"query_too_long"`852853                  - `"request_too_large"`854855            - `tool_use_id: string`856857              pattern: ^srvtoolu_[a-zA-Z0-9_]+$858859            - `cache_control: optional BetaCacheControlEphemeral or null`860861              Create a cache control breakpoint at this content block.862863            - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120`864865              - `BetaDirectCaller object`866867                Tool invocation directly from the model.868869              - `BetaServerToolCaller object`870871                Tool invocation generated by a server-side tool.872873              - `BetaServerToolCaller20260120 object`874875          - `BetaWebFetchToolResultBlockParam object`876877            - `type: "web_fetch_tool_result"`878879            - `content: BetaWebFetchToolResultErrorBlockParam or BetaWebFetchBlockParam`880881              - `BetaWebFetchToolResultErrorBlockParam object`882883                - `type: "web_fetch_tool_result_error"`884885                - `error_code: BetaWebFetchToolResultErrorCode`886887                  - `"invalid_tool_input"`888889                  - `"url_too_long"`890891                  - `"url_not_allowed"`892893                  - `"url_not_in_prior_context"`894895                  - `"url_not_accessible"`896897                  - `"unsupported_content_type"`898899                  - `"too_many_requests"`900901                  - `"max_uses_exceeded"`902903                  - `"unavailable"`904905                  - `"content_too_large"`906907              - `BetaWebFetchBlockParam object`908909                - `type: "web_fetch_result"`910911                - `content: BetaRequestDocumentBlock`912913                - `url: string`914915                  Fetched content URL916917                - `retrieved_at: optional string or null`918919                  ISO 8601 timestamp when the content was retrieved920921            - `tool_use_id: string`922923              pattern: ^srvtoolu_[a-zA-Z0-9_]+$924925            - `cache_control: optional BetaCacheControlEphemeral or null`926927              Create a cache control breakpoint at this content block.928929            - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120`930931              - `BetaDirectCaller object`932933                Tool invocation directly from the model.934935              - `BetaServerToolCaller object`936937                Tool invocation generated by a server-side tool.938939              - `BetaServerToolCaller20260120 object`940941          - `BetaAdvisorToolResultBlockParam object`942943            - `type: "advisor_tool_result"`944945            - `content: BetaAdvisorToolResultErrorParam or BetaAdvisorResultBlockParam or BetaAdvisorRedactedResultBlockParam`946947              - `BetaAdvisorToolResultErrorParam object`948949                - `type: "advisor_tool_result_error"`950951                - `error_code: "max_uses_exceeded" or "prompt_too_long" or "too_many_requests" or 4 more`952953                  - `"max_uses_exceeded"`954955                  - `"prompt_too_long"`956957                  - `"too_many_requests"`958959                  - `"overloaded"`960961                  - `"unavailable"`962963                  - `"execution_time_exceeded"`964965                  - `"model_not_found"`966967              - `BetaAdvisorResultBlockParam object`968969                - `type: "advisor_result"`970971                - `text: string`972973                - `stop_reason: optional string or null`974975              - `BetaAdvisorRedactedResultBlockParam object`976977                - `type: "advisor_redacted_result"`978979                - `encrypted_content: string`980981                  Opaque blob produced by a prior response; must be round-tripped verbatim.982983                - `stop_reason: optional string or null`984985            - `tool_use_id: string`986987              pattern: ^srvtoolu_[a-zA-Z0-9_]+$988989            - `cache_control: optional BetaCacheControlEphemeral or null`990991              Create a cache control breakpoint at this content block.992993          - `BetaCodeExecutionToolResultBlockParam object`994995            - `type: "code_execution_tool_result"`996997            - `content: BetaCodeExecutionToolResultBlockParamContent`998999              - `BetaCodeExecutionToolResultErrorParam object`10001001                - `type: "code_execution_tool_result_error"`10021003                - `error_code: BetaCodeExecutionToolResultErrorCode`10041005                  - `"invalid_tool_input"`10061007                  - `"unavailable"`10081009                  - `"too_many_requests"`10101011                  - `"execution_time_exceeded"`10121013              - `BetaCodeExecutionResultBlockParam object`10141015                - `type: "code_execution_result"`10161017                - `content: array of BetaCodeExecutionOutputBlockParam`10181019                  - `type: "code_execution_output"`10201021                  - `file_id: string`10221023                - `return_code: number`10241025                - `stderr: string`10261027                - `stdout: string`10281029              - `BetaEncryptedCodeExecutionResultBlockParam object`10301031                Code execution result with encrypted stdout for PFC + web_search results.10321033                - `type: "encrypted_code_execution_result"`10341035                - `content: array of BetaCodeExecutionOutputBlockParam`10361037                  - `type: "code_execution_output"`10381039                  - `file_id: string`10401041                - `encrypted_stdout: string`10421043                - `return_code: number`10441045                - `stderr: string`10461047            - `tool_use_id: string`10481049              pattern: ^srvtoolu_[a-zA-Z0-9_]+$10501051            - `cache_control: optional BetaCacheControlEphemeral or null`10521053              Create a cache control breakpoint at this content block.10541055          - `BetaBashCodeExecutionToolResultBlockParam object`10561057            - `type: "bash_code_execution_tool_result"`10581059            - `content: BetaBashCodeExecutionToolResultErrorParam or BetaBashCodeExecutionResultBlockParam`10601061              - `BetaBashCodeExecutionToolResultErrorParam object`10621063                - `type: "bash_code_execution_tool_result_error"`10641065                - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more`10661067                  - `"invalid_tool_input"`10681069                  - `"unavailable"`10701071                  - `"too_many_requests"`10721073                  - `"execution_time_exceeded"`10741075                  - `"output_file_too_large"`10761077              - `BetaBashCodeExecutionResultBlockParam object`10781079                - `type: "bash_code_execution_result"`10801081                - `content: array of BetaBashCodeExecutionOutputBlockParam`10821083                  - `type: "bash_code_execution_output"`10841085                  - `file_id: string`10861087                - `return_code: number`10881089                - `stderr: string`10901091                - `stdout: string`10921093            - `tool_use_id: string`10941095              pattern: ^srvtoolu_[a-zA-Z0-9_]+$10961097            - `cache_control: optional BetaCacheControlEphemeral or null`10981099              Create a cache control breakpoint at this content block.11001101          - `BetaTextEditorCodeExecutionToolResultBlockParam object`11021103            - `type: "text_editor_code_execution_tool_result"`11041105            - `content: BetaTextEditorCodeExecutionToolResultErrorParam or BetaTextEditorCodeExecutionViewResultBlockParam or BetaTextEditorCodeExecutionCreateResultBlockParam or BetaTextEditorCodeExecutionStrReplaceResultBlockParam`11061107              - `BetaTextEditorCodeExecutionToolResultErrorParam object`11081109                - `type: "text_editor_code_execution_tool_result_error"`11101111                - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more`11121113                  - `"invalid_tool_input"`11141115                  - `"unavailable"`11161117                  - `"too_many_requests"`11181119                  - `"execution_time_exceeded"`11201121                  - `"file_not_found"`11221123                - `error_message: optional string or null`11241125              - `BetaTextEditorCodeExecutionViewResultBlockParam object`11261127                - `type: "text_editor_code_execution_view_result"`11281129                - `content: string`11301131                - `file_type: "text" or "image" or "pdf"`11321133                  - `"text"`11341135                  - `"image"`11361137                  - `"pdf"`11381139                - `num_lines: optional number or null`11401141                - `start_line: optional number or null`11421143                - `total_lines: optional number or null`11441145              - `BetaTextEditorCodeExecutionCreateResultBlockParam object`11461147                - `type: "text_editor_code_execution_create_result"`11481149                - `is_file_update: boolean`11501151              - `BetaTextEditorCodeExecutionStrReplaceResultBlockParam object`11521153                - `type: "text_editor_code_execution_str_replace_result"`11541155                - `lines: optional array of string or null`11561157                - `new_lines: optional number or null`11581159                - `new_start: optional number or null`11601161                - `old_lines: optional number or null`11621163                - `old_start: optional number or null`11641165            - `tool_use_id: string`11661167              pattern: ^srvtoolu_[a-zA-Z0-9_]+$11681169            - `cache_control: optional BetaCacheControlEphemeral or null`11701171              Create a cache control breakpoint at this content block.11721173          - `BetaToolSearchToolResultBlockParam object`11741175            - `type: "tool_search_tool_result"`11761177            - `content: BetaToolSearchToolResultErrorParam or BetaToolSearchToolSearchResultBlockParam`11781179              - `BetaToolSearchToolResultErrorParam object`11801181                - `type: "tool_search_tool_result_error"`11821183                - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"`11841185                  - `"invalid_tool_input"`11861187                  - `"unavailable"`11881189                  - `"too_many_requests"`11901191                  - `"execution_time_exceeded"`11921193                - `error_message: optional string or null`11941195              - `BetaToolSearchToolSearchResultBlockParam object`11961197                - `type: "tool_search_tool_search_result"`11981199                - `tool_references: array of BetaToolReferenceBlockParam`12001201                  - `type: "tool_reference"`12021203                  - `tool_name: string`12041205                    maxLength: 256, minLength: 1, pattern: ^[a-zA-Z0-9_-]{1,256}$12061207                  - `cache_control: optional BetaCacheControlEphemeral or null`12081209                    Create a cache control breakpoint at this content block.12101211            - `tool_use_id: string`12121213              pattern: ^srvtoolu_[a-zA-Z0-9_]+$12141215            - `cache_control: optional BetaCacheControlEphemeral or null`12161217              Create a cache control breakpoint at this content block.12181219          - `BetaMCPToolUseBlockParam object`12201221            - `type: "mcp_tool_use"`12221223            - `id: string`12241225              pattern: ^[a-zA-Z0-9_-]+$12261227            - `input: map[unknown]`12281229            - `name: string`12301231            - `server_name: string`12321233              The name of the MCP server12341235            - `cache_control: optional BetaCacheControlEphemeral or null`12361237              Create a cache control breakpoint at this content block.12381239          - `BetaRequestMCPToolResultBlockParam object`12401241            - `type: "mcp_tool_result"`12421243            - `tool_use_id: string`12441245              pattern: ^[a-zA-Z0-9_-]+$12461247            - `cache_control: optional BetaCacheControlEphemeral or null`12481249              Create a cache control breakpoint at this content block.12501251            - `content: optional string or array of BetaTextBlockParam`12521253              - `string`12541255              - `BetaMCPToolResultBlockParamContent = array of BetaTextBlockParam`12561257                - `type: "text"`12581259                - `text: string`12601261                  minLength: 112621263                - `cache_control: optional BetaCacheControlEphemeral or null`12641265                  Create a cache control breakpoint at this content block.12661267                - `citations: optional array of BetaTextCitationParam or null`12681269            - `is_error: optional boolean`12701271          - `BetaContainerUploadBlockParam object`12721273            A content block that represents a file to be uploaded to the container1274            Files uploaded via this block will be available in the container's input directory.12751276            - `type: "container_upload"`12771278            - `file_id: string`12791280            - `cache_control: optional BetaCacheControlEphemeral or null`12811282              Create a cache control breakpoint at this content block.12831284          - `BetaCompactionBlockParam object`12851286            A compaction block containing summary of previous context.12871288            Users should round-trip these blocks from responses to subsequent requests1289            to maintain context across compaction boundaries.12901291            When content is None, the block represents a failed compaction. The server1292            treats these as no-ops. Empty string content is not allowed.12931294            - `type: "compaction"`12951296            - `cache_control: optional BetaCacheControlEphemeral or null`12971298              Create a cache control breakpoint at this content block.12991300            - `content: optional string or null`13011302              Summary of previously compacted content, or null if compaction failed13031304            - `encrypted_content: optional string or null`13051306              Opaque metadata from prior compaction, to be round-tripped verbatim13071308            - `signature: optional string or null`13091310              The block's signature as returned, to be sent back verbatim13111312          - `BetaRequestToolAdditionBlock object`13131314            Mid-conversation directive to surface a declared tool.13151316            `tool` references a tool (or MCP toolset) by name from the request's1317            `tools`; it is offered to the model from this point in the1318            conversation onward.13191320            - `type: "tool_addition"`13211322            - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference`13231324              - `BetaToolChangeToolReference object`13251326                Reference to a single tool the caller declared directly in1327                `tools[]`. Does not accept the composed `{server}_{name}` form the1328                server assigns to MCP-resolved tools — use `mcp_tool_reference` or1329                `mcp_toolset_reference` for those.13301331                - `type: "tool_reference"`13321333                - `name: string`13341335                  pattern: ^[a-zA-Z0-9_-]{1,128}$13361337              - `BetaToolChangeMCPToolReference object`13381339                Reference to a single MCP tool by its server and remote name; the1340                same `server_name`/`name` pair `mcp_tool_use` carries.13411342                - `type: "mcp_tool_reference"`13431344                - `name: string`13451346                - `server_name: string`13471348              - `BetaToolChangeMCPToolsetReference object`13491350                Reference to every tool in the named MCP server's toolset.13511352                - `type: "mcp_toolset_reference"`13531354                - `server_name: string`13551356            - `cache_control: optional BetaCacheControlEphemeral or null`13571358              Create a cache control breakpoint at this content block.13591360          - `BetaRequestToolRemovalBlock object`13611362            Mid-conversation directive to withdraw a tool.13631364            `tool` references a tool (or MCP toolset) by name from the request's1365            `tools`; it is no longer offered to the model from this point in the1366            conversation onward.13671368            - `type: "tool_removal"`13691370            - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference`13711372              - `BetaToolChangeToolReference object`13731374                Reference to a single tool the caller declared directly in1375                `tools[]`. Does not accept the composed `{server}_{name}` form the1376                server assigns to MCP-resolved tools — use `mcp_tool_reference` or1377                `mcp_toolset_reference` for those.13781379              - `BetaToolChangeMCPToolReference object`13801381                Reference to a single MCP tool by its server and remote name; the1382                same `server_name`/`name` pair `mcp_tool_use` carries.13831384              - `BetaToolChangeMCPToolsetReference object`13851386                Reference to every tool in the named MCP server's toolset.13871388            - `cache_control: optional BetaCacheControlEphemeral or null`13891390              Create a cache control breakpoint at this content block.13911392          - `BetaFallbackBlockParam object`13931394            A `fallback` block echoed back from a prior response.13951396            Accepted in `messages[].content` and not rendered into the prompt; not1397            validated against the request's `fallbacks` chain or top-level `model`.13981399            Echo the assistant turn back verbatim, including this block in its1400            original position. The block marks the boundary between content produced1401            before and after a fallback hop, and the server relies on that boundary1402            to validate the turn: when thinking runs flank the boundary, omitting1403            the block merges them into one span the server cannot validate (the1404            request is rejected), and moving it into the middle of a single run is1405            likewise rejected; between non-thinking blocks the block's placement has1406            no validation effect.14071408            - `type: "fallback"`14091410            - `from: BetaFallbackInfoParam`14111412              Identifies one hop of a fallback transition.14131414              - `model: Model`14151416                The model that will complete your prompt.14171418                See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.14191420                - `"claude-fable-5-1" or "claude-mythos-5-1" or "claude-sonnet-5" or 14 more`14211422                  The model that will complete your prompt.14231424                  See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.14251426                  - `"claude-fable-5-1"`14271428                    Frontier intelligence for ambitious tasks across coding, scientific discovery, and enterprise workflows14291430                  - `"claude-mythos-5-1"`14311432                    Our most capable model for cybersecurity and biology research, available through trusted access programs14331434                  - `"claude-sonnet-5"`14351436                    High-performance model for coding and agents14371438                  - `"claude-fable-5"`14391440                    Next generation of intelligence for the hardest knowledge work and coding problems14411442                  - `"claude-mythos-5"`14431444                    Most capable model for cybersecurity and biology research14451446                  - `"claude-opus-5"`14471448                    Powerful intelligence for long-running agents and coding14491450                  - `"claude-opus-4-8"`14511452                    Powerful intelligence for long-running agents and coding14531454                  - `"claude-opus-4-7"`14551456                    Powerful intelligence for long-running agents and coding14571458                  - `"claude-mythos-preview"`14591460                    New class of intelligence, strongest in coding and cybersecurity14611462                  - `"claude-opus-4-6"`14631464                    Powerful intelligence for long-running agents and coding14651466                  - `"claude-sonnet-4-6"`14671468                    Best combination of speed and intelligence14691470                  - `"claude-haiku-4-5"`14711472                    Fastest model with near-frontier intelligence14731474                  - `"claude-haiku-4-5-20251001"`14751476                    Fastest model with near-frontier intelligence14771478                  - `"claude-opus-4-5"`14791480                    Powerful intelligence for long-running agents and coding14811482                  - `"claude-opus-4-5-20251101"`14831484                    Powerful intelligence for long-running agents and coding14851486                  - `"claude-sonnet-4-5"`14871488                    High-performance model for agents and coding14891490                  - `"claude-sonnet-4-5-20250929"`14911492                    High-performance model for agents and coding14931494                - `string`14951496            - `to: BetaFallbackInfoParam`14971498              Identifies one hop of a fallback transition.14991500            - `trigger: optional unknown`15011502              The response block's `trigger`, echoed verbatim. Accepted and ignored by the server; any object or `null` is allowed.15031504      - `role: "user" or "assistant" or "system"`15051506        - `"user"`15071508        - `"assistant"`15091510        - `"system"`15111512      - `clear_at: optional "next_user_message" or "never" or null`15131514        How long this system message's text stays in front of the model. `"never"` (the default) renders it on every request that includes it. `"next_user_message"` renders it only for the user turn it follows: once a later `role: "user"` message exists in `messages` the message stays in the array (send it unchanged) but is no longer shown to the model. Only permitted on `role: "system"` messages.15151516        - `"next_user_message"`15171518        - `"never"`15191520      - `output_config: optional BetaSystemMessageOutputConfig or null`15211522        Per-message output configuration on a role:"system" input message.15231524        Fields here apply per-turn; `format` remains top-level only. An1525        empty `{}` is accepted on a message that carries content; a message1526        with neither content nor output_config fields is rejected.15271528        - `effort: optional "low" or "medium" or "high" or 2 more or null`15291530          All possible effort levels.15311532          - `"low"`15331534          - `"medium"`15351536          - `"high"`15371538          - `"xhigh"`15391540          - `"max"`15411542    - `model: Model`15431544      The model that will complete your prompt.15451546      See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.15471548    - `cache_control: optional BetaCacheControlEphemeral or null`15491550      Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request.15511552    - `compaction: optional BetaCompactionConfig or null`15531554      Compact the whole conversation and return a signed `compaction` block,1555      alone, that a later request sends back first in `messages`, in place of1556      the messages it summarizes. There is no trigger and no pause flag: sending1557      the parameter compacts, and nothing is sampled after the block.15581559      The summarization prompt is the server's own unless `instructions` are1560      given, which then replace it for this request; a value that is empty or1561      only whitespace counts as absent.15621563      - `type: "summarize"`15641565      - `instructions: optional string or null`15661567        Replaces the server's default summarization prompt for this request. An empty or whitespace-only value counts as absent.15681569        maxLength: 1638415701571    - `container: optional BetaContainerParams or string or null`15721573      Container identifier for reuse across requests.15741575      - `BetaContainerParams object`15761577        Container parameters with skills to be loaded.15781579        - `id: optional string or null`15801581          Container id15821583        - `skills: optional array of BetaSkillParams or null`15841585          List of skills to load in the container15861587          maxItems: 2015881589          - `type: "anthropic" or "custom"`15901591            Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)15921593            - `"anthropic"`15941595            - `"custom"`15961597          - `skill_id: string`15981599            Skill ID16001601            maxLength: 64, minLength: 116021603          - `version: optional string`16041605            Skill version or 'latest' for most recent version16061607            maxLength: 64, minLength: 116081609      - `string`16101611    - `context_management: optional BetaContextManagementConfig or null`16121613      Context management configuration.16141615      This allows you to control how Claude manages context across multiple requests, such as whether to clear function results or not.16161617      - `edits: optional array of BetaClearToolUses20250919Edit or BetaClearThinking20251015Edit or BetaCompact20260112Edit`16181619        List of context management edits to apply16201621        minItems: 016221623        - `BetaClearToolUses20250919Edit object`16241625          - `type: "clear_tool_uses_20250919"`16261627          - `clear_at_least: optional BetaInputTokensClearAtLeast or null`16281629            Minimum number of tokens that must be cleared when triggered. Context will only be modified if at least this many tokens can be removed.16301631            - `type: "input_tokens"`16321633            - `value: number`16341635              minimum: 016361637          - `clear_tool_inputs: optional boolean or array of string or null`16381639            Whether to clear all tool inputs (bool) or specific tool inputs to clear (list)16401641            - `boolean`16421643            - `array of string`16441645          - `exclude_tools: optional array of string or null`16461647            Tool names whose uses are preserved from clearing16481649          - `keep: optional BetaToolUsesKeep`16501651            Number of tool uses to retain in the conversation16521653            - `type: "tool_uses"`16541655            - `value: number`16561657              minimum: 016581659          - `trigger: optional BetaInputTokensTrigger or BetaToolUsesTrigger`16601661            Condition that triggers the context management strategy16621663            - `BetaInputTokensTrigger object`16641665              - `type: "input_tokens"`16661667              - `value: number`16681669                minimum: 116701671            - `BetaToolUsesTrigger object`16721673              - `type: "tool_uses"`16741675              - `value: number`16761677                minimum: 116781679        - `BetaClearThinking20251015Edit object`16801681          - `type: "clear_thinking_20251015"`16821683          - `keep: optional BetaThinkingTurns or BetaAllThinkingTurns or "all"`16841685            Number of most recent assistant turns to keep thinking blocks for. Older turns will have their thinking blocks removed.16861687            - `BetaThinkingTurns object`16881689              - `type: "thinking_turns"`16901691              - `value: number`16921693                minimum: 116941695            - `BetaAllThinkingTurns object`16961697              - `type: "all"`16981699            - `"all"`17001701        - `BetaCompact20260112Edit object`17021703          Automatically compact older context when reaching the configured trigger threshold.17041705          - `type: "compact_20260112"`17061707          - `instructions: optional string or null`17081709            Additional instructions for summarization.17101711          - `pause_after_compaction: optional boolean`17121713            Whether to pause after compaction and return the compaction block to the user.17141715          - `trigger: optional BetaInputTokensTrigger or null`17161717            When to trigger compaction. Defaults to 150000 input tokens.17181719    - `diagnostics: optional BetaDiagnosticsParam or null`17201721      Request-level diagnostics. Currently carries the previous response1722      id for prompt-cache divergence reporting.17231724      - `previous_message_id: optional string or null`17251726        The `id` (`msg_...`) from this client's previous /v1/messages response. The server compares that request's prompt fingerprint against this one and returns `diagnostics.cache_miss_reason` when the prompt-cache prefix could not be reused. Pass `null` on the first turn to opt in without a prior message to compare.17271728        maxLength: 25617291730    - `fallback_credit_token: optional string or BetaFallbackCreditTokenParam or null`17311732      The `fallback_credit_token` from a prior refusal's `stop_details`.17331734      When a preceding request was refused and returned a `fallback_credit_token`,1735      pass that code here on the retry to have the retry's cache-creation tokens1736      for the prefix that was warm on the refused model billed at the cache-read1737      rate. Must be redeemed by the same organization and workspace, with the same1738      request body (optionally extended by one appended `assistant` message whose1739      content is the partial text — with any trailing whitespace stripped from1740      the final text block — and paired server-tool blocks streamed before the1741      refusal; the appended-assistant form is not available for requests with1742      `output_format` set or forced `tool_choice`), on an eligible fallback1743      model, on the same platform,1744      and within 5 minutes of the refusal; a mismatch is a 400. A token minted1745      mid-server-tool-loop whose partial content was continuable may only be1746      redeemed with the appended-assistant form — if an exact-body retry is1747      rejected with a 400 saying the token must be redeemed by continuing the1748      partial response, retry with the appended-assistant form instead.17491750      When the appended-assistant form is used on a model that otherwise disallows1751      assistant-turn prefill, this token also authorizes that one prefill.17521753      - `string`17541755      - `BetaFallbackCreditTokenParam object`17561757        Object form of `fallback_credit_token`: the token plus a redemption1758        mode.17591760        Requires `anthropic-beta: fallback-credit-2026-07-01`; without that1761        header the field accepts the bare string only. The bare string and the1762        mode-less object are equivalent (both select `strict`), so wrapping1763        an existing token changes nothing by itself.17641765        - `token: string`17661767          The opaque `fallback_credit_token` from a prior refusal's `stop_details` — the same string the bare-string form carries.17681769          maxLength: 2048, minLength: 117701771        - `mode: optional "strict" or "best_effort"`17721773          How a failing token affects the retry. `strict` (the default, and the bare-string behavior): a failing redemption is a 400 and the retry is not served. `best_effort`: the retry is served either way — a token-layer failure no longer rejects the request; the retry proceeds at normal price and the outcome is reported on the response's `usage.fallback_credit`. Two failures stay hard in both modes: a malformed token, and combining `fallback_credit_token` with `fallbacks`.17741775          - `"strict"`17761777          - `"best_effort"`17781779    - `fallbacks: optional BetaFallbacksParam or null`17801781      Opt-in server-side retry on one or more substitute models when the requested model declines for policy reasons. Tried in order: if the first entry also declines, the second is tried, and so on. The string "default" requests the requested model's server-defined default fallback configuration.17821783      - `array of BetaFallbackParam`17841785        - `model: Model`17861787          The model that will complete your prompt.17881789          See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.17901791        - `max_tokens: optional number or null`17921793        - `output_config: optional BetaOutputConfig or null`17941795          - `effort: optional "low" or "medium" or "high" or 2 more or null`17961797            All possible effort levels.17981799            - `"low"`18001801            - `"medium"`18021803            - `"high"`18041805            - `"xhigh"`18061807            - `"max"`18081809          - `format: optional BetaJSONOutputFormat or null`18101811            A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)18121813            - `type: "json_schema"`18141815            - `schema: map[unknown]`18161817              The JSON schema of the format18181819          - `task_budget: optional BetaTokenTaskBudget or null`18201821            User-configurable total token budget across contexts.18221823            - `type: "tokens"`18241825              The budget type. Currently only 'tokens' is supported.18261827            - `total: number`18281829              Total token budget across all contexts in the session.18301831              minimum: 102418321833            - `remaining: optional number or null`18341835              Remaining tokens in the budget. Use this to track usage across contexts when implementing compaction client-side. Defaults to total if not provided.18361837              minimum: 018381839        - `speed: optional "standard" or "fast" or null`18401841          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.18421843          - `"standard"`18441845          - `"fast"`18461847        - `thinking: optional BetaThinkingConfigEnabled or BetaThinkingConfigDisabled or BetaThinkingConfigAdaptive or null`18481849          - `BetaThinkingConfigEnabled object`18501851            - `type: "enabled"`18521853            - `budget_tokens: number`18541855              Determines how many tokens Claude can use for its internal reasoning process. Larger budgets can enable more thorough analysis for complex problems, improving response quality.18561857              Must be ≥1024 and less than `max_tokens`.18581859              See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details.18601861              minimum: 102418621863            - `block_binding: optional BetaThinkingBlockBinding or null`18641865              Controls for block binding: what happens when a thinking block this1866              request sends back fails the conversation check. Every field is optional;1867              an empty object means every default.18681869              - `prefix_mismatch_behavior: optional BetaThinkingPrefixMismatchBehavior or null`18701871                What happens when a thinking block in `messages` fails the conversation1872                check: it was created in a different conversation, or the messages before1873                it have changed since. `"error"` (the default) fails the request with a1874                400 error. `"drop_block"` removes the failing blocks and the request1875                proceeds; the model no longer sees the dropped reasoning.18761877                - `"error"`18781879                - `"drop_block"`18801881            - `display: optional "summarized" or "omitted" or "updates" or null`18821883              Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. Defaults to `summarized`.18841885              - `"summarized"`18861887              - `"omitted"`18881889              - `"updates"`18901891          - `BetaThinkingConfigDisabled object`18921893            - `type: "disabled"`18941895          - `BetaThinkingConfigAdaptive object`18961897            - `type: "adaptive"`18981899            - `block_binding: optional BetaThinkingBlockBinding or null`19001901              Controls for block binding: what happens when a thinking block this1902              request sends back fails the conversation check. Every field is optional;1903              an empty object means every default.19041905            - `display: optional "summarized" or "omitted" or "updates" or null`19061907              Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. Defaults to `summarized`.19081909              - `"summarized"`19101911              - `"omitted"`19121913              - `"updates"`19141915      - `Default = "default"`19161917    - `inference_geo: optional string or null`19181919      Specifies the geographic region for inference processing. If not specified, the workspace's `default_inference_geo` is used.19201921    - `mcp_servers: optional array of BetaRequestMCPServerURLDefinition`19221923      MCP servers to be utilized in this request19241925      maxItems: 2019261927      - `type: "url"`19281929      - `name: string`19301931      - `url: string`19321933      - `authorization_token: optional string or null`19341935      - `tool_configuration: optional BetaRequestMCPServerToolConfiguration or null`19361937        - `allowed_tools: optional array of string or null`19381939        - `enabled: optional boolean or null`19401941    - `metadata: optional BetaMetadata`19421943      An object describing metadata about the request.19441945      - `user_id: optional string or null`19461947        An external identifier for the user who is associated with the request.19481949        This should be a uuid, hash value, or other opaque identifier. Anthropic may use this id to help detect abuse. Do not include any identifying information such as name, email address, or phone number.19501951        maxLength: 51219521953    - `output_config: optional BetaOutputConfig`19541955      Configuration options for the model's output, such as the output format.19561957    - `service_tier: optional "auto" or "standard_only"`19581959      Determines whether to use priority capacity (if available) or standard capacity for this request.19601961      Anthropic offers different levels of service for your API requests. See [service-tiers](https://platform.claude.com/docs/en/api/service-tiers) for details.19621963      - `"auto"`19641965      - `"standard_only"`19661967    - `speed: optional "standard" or "fast" or null`19681969      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.19701971      - `"standard"`19721973      - `"fast"`19741975    - `stop_sequences: optional array of string`19761977      Custom text sequences that will cause the model to stop generating.19781979      Our models will normally stop when they have naturally completed their turn, which will result in a response `stop_reason` of `"end_turn"`.19801981      If you want the model to stop generating when it encounters custom strings of text, you can use the `stop_sequences` parameter. If the model encounters one of the custom sequences, the response `stop_reason` value will be `"stop_sequence"` and the response `stop_sequence` value will contain the matched stop sequence.19821983    - `stream: optional boolean`19841985      Whether to incrementally stream the response using server-sent events.19861987      See [streaming](https://platform.claude.com/docs/en/build-with-claude/streaming) for details.19881989    - `system: optional string or array of BetaTextBlockParam`19901991      System prompt.19921993      A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role).19941995      - `string`19961997      - `array of BetaTextBlockParam`19981999        - `type: "text"`20002001        - `text: string`20022003          minLength: 120042005        - `cache_control: optional BetaCacheControlEphemeral or null`20062007          Create a cache control breakpoint at this content block.20082009        - `citations: optional array of BetaTextCitationParam or null`20102011    - `thinking: optional BetaThinkingConfigParam`20122013      Configuration for enabling Claude's extended thinking.20142015      When enabled, responses include `thinking` content blocks showing Claude's thinking process before the final answer. Requires a minimum budget of 1,024 tokens and counts towards your `max_tokens` limit.20162017      See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details.20182019      - `BetaThinkingConfigEnabled object`20202021      - `BetaThinkingConfigDisabled object`20222023      - `BetaThinkingConfigAdaptive object`20242025    - `tool_choice: optional BetaToolChoice`20262027      How the model should use the provided tools. The model can use a specific tool, any available tool, decide by itself, or not use tools at all.20282029      - `BetaToolChoiceAuto object`20302031        The model will automatically decide whether to use tools.20322033        - `type: "auto"`20342035        - `disable_parallel_tool_use: optional boolean`20362037          Whether to disable parallel tool use.20382039          Defaults to `false`. If set to `true`, the model will output at most one tool use.20402041      - `BetaToolChoiceAny object`20422043        The model will use any available tools.20442045        - `type: "any"`20462047        - `disable_parallel_tool_use: optional boolean`20482049          Whether to disable parallel tool use.20502051          Defaults to `false`. If set to `true`, the model will output exactly one tool use.20522053      - `BetaToolChoiceTool object`20542055        The model will use the specified tool with `tool_choice.name`.20562057        - `type: "tool"`20582059        - `name: string`20602061          The name of the tool to use.20622063        - `disable_parallel_tool_use: optional boolean`20642065          Whether to disable parallel tool use.20662067          Defaults to `false`. If set to `true`, the model will output exactly one tool use.20682069      - `BetaToolChoiceNone object`20702071        The model will not be allowed to use tools.20722073        - `type: "none"`20742075    - `tools: optional array of BetaToolUnion`20762077      Definitions of tools that the model may use.20782079      If you include `tools` in your API request, the model may return `tool_use` content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using `tool_result` content blocks.20802081      There are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool)).20822083      Each tool definition includes:20842085      * `name`: Name of the tool.2086      * `description`: Optional, but strongly-recommended description of the tool.2087      * `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the tool `input` shape that the model will produce in `tool_use` output content blocks.20882089      For example, if you defined `tools` as:20902091      ```json2092      [2093        {2094          "name": "get_stock_price",2095          "description": "Get the current stock price for a given ticker symbol.",2096          "input_schema": {2097            "type": "object",2098            "properties": {2099              "ticker": {2100                "type": "string",2101                "description": "The stock ticker symbol, e.g. AAPL for Apple Inc."2102              }2103            },2104            "required": ["ticker"]2105          }2106        }2107      ]2108      ```21092110      And then asked the model "What's the S&P 500 at today?", the model might produce `tool_use` content blocks in the response like this:21112112      ```json2113      [2114        {2115          "type": "tool_use",2116          "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",2117          "name": "get_stock_price",2118          "input": { "ticker": "^GSPC" }2119        }2120      ]2121      ```21222123      You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an input, and return the following back to the model in a subsequent `user` message:21242125      ```json2126      [2127        {2128          "type": "tool_result",2129          "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",2130          "content": "259.75 USD"2131        }2132      ]2133      ```21342135      Tools can be used for workflows that include running client-side tools and functions, or more generally whenever you want the model to produce a particular JSON structure of output.21362137      See our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) for more details.21382139      - `BetaTool object`21402141        - `type: optional "custom" or null`21422143        - `input_schema: object`21442145          [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.21462147          This defines the shape of the `input` that your tool accepts and that the model will produce.21482149          - `type: "object"`21502151          - `properties: optional map[unknown] or null`21522153          - `required: optional array of string or null`21542155        - `name: string`21562157          Name of the tool.21582159          This is how the tool will be called by the model and in `tool_use` blocks.21602161          maxLength: 128, minLength: 1, pattern: ^[a-zA-Z0-9_-]{1,128}$21622163        - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`21642165          - `"direct"`21662167          - `"code_execution_20250825"`21682169          - `"code_execution_20260120"`21702171          - `"code_execution_20260521"`21722173        - `cache_control: optional BetaCacheControlEphemeral or null`21742175          Create a cache control breakpoint at this content block.21762177        - `defer_loading: optional boolean`21782179          If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.21802181        - `description: optional string`21822183          Description of what this tool does.21842185          Tool descriptions should be as detailed as possible. The more information that the model has about what the tool is and how to use it, the better it will perform. You can use natural language descriptions to reinforce important aspects of the tool input JSON schema.21862187        - `eager_input_streaming: optional boolean or null`21882189          Enable eager input streaming for this tool. When true, tool input parameters will be streamed incrementally as they are generated, and types will be inferred on-the-fly rather than buffering the full JSON output. When false, streaming is disabled for this tool even if the fine-grained-tool-streaming beta is active. When null (default), uses the default behavior based on beta headers.21902191        - `input_examples: optional array of map[unknown]`21922193        - `strict: optional boolean`21942195          When true, guarantees schema validation on tool names and inputs21962197      - `BetaToolBash20241022 object`21982199        - `type: "bash_20241022"`22002201        - `name: "bash"`22022203          Name of the tool.22042205          This is how the tool will be called by the model and in `tool_use` blocks.22062207        - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`22082209          - `"direct"`22102211          - `"code_execution_20250825"`22122213          - `"code_execution_20260120"`22142215          - `"code_execution_20260521"`22162217        - `cache_control: optional BetaCacheControlEphemeral or null`22182219          Create a cache control breakpoint at this content block.22202221        - `defer_loading: optional boolean`22222223          If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.22242225        - `input_examples: optional array of map[unknown]`22262227        - `strict: optional boolean`22282229          When true, guarantees schema validation on tool names and inputs22302231      - `BetaToolBash20250124 object`22322233        - `type: "bash_20250124"`22342235        - `name: "bash"`22362237          Name of the tool.22382239          This is how the tool will be called by the model and in `tool_use` blocks.22402241        - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`22422243          - `"direct"`22442245          - `"code_execution_20250825"`22462247          - `"code_execution_20260120"`22482249          - `"code_execution_20260521"`22502251        - `cache_control: optional BetaCacheControlEphemeral or null`22522253          Create a cache control breakpoint at this content block.22542255        - `defer_loading: optional boolean`22562257          If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.22582259        - `input_examples: optional array of map[unknown]`22602261        - `strict: optional boolean`22622263          When true, guarantees schema validation on tool names and inputs22642265      - `BetaCodeExecutionTool20250522 object`22662267        - `type: "code_execution_20250522"`22682269        - `name: "code_execution"`22702271          Name of the tool.22722273          This is how the tool will be called by the model and in `tool_use` blocks.22742275        - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`22762277          - `"direct"`22782279          - `"code_execution_20250825"`22802281          - `"code_execution_20260120"`22822283          - `"code_execution_20260521"`22842285        - `cache_control: optional BetaCacheControlEphemeral or null`22862287          Create a cache control breakpoint at this content block.22882289        - `defer_loading: optional boolean`22902291          If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.22922293        - `strict: optional boolean`22942295          When true, guarantees schema validation on tool names and inputs22962297      - `BetaCodeExecutionTool20250825 object`22982299        - `type: "code_execution_20250825"`23002301        - `name: "code_execution"`23022303          Name of the tool.23042305          This is how the tool will be called by the model and in `tool_use` blocks.23062307        - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`23082309          - `"direct"`23102311          - `"code_execution_20250825"`23122313          - `"code_execution_20260120"`23142315          - `"code_execution_20260521"`23162317        - `cache_control: optional BetaCacheControlEphemeral or null`23182319          Create a cache control breakpoint at this content block.23202321        - `defer_loading: optional boolean`23222323          If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.23242325        - `strict: optional boolean`23262327          When true, guarantees schema validation on tool names and inputs23282329      - `BetaCodeExecutionTool20260120 object`23302331        Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint).23322333        - `type: "code_execution_20260120"`23342335        - `name: "code_execution"`23362337          Name of the tool.23382339          This is how the tool will be called by the model and in `tool_use` blocks.23402341        - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`23422343          - `"direct"`23442345          - `"code_execution_20250825"`23462347          - `"code_execution_20260120"`23482349          - `"code_execution_20260521"`23502351        - `cache_control: optional BetaCacheControlEphemeral or null`23522353          Create a cache control breakpoint at this content block.23542355        - `defer_loading: optional boolean`23562357          If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.23582359        - `strict: optional boolean`23602361          When true, guarantees schema validation on tool names and inputs23622363      - `BetaCodeExecutionTool20260521 object`23642365        Code execution tool with REPL state persistence.23662367        - `type: "code_execution_20260521"`23682369        - `name: "code_execution"`23702371          Name of the tool.23722373          This is how the tool will be called by the model and in `tool_use` blocks.23742375        - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`23762377          - `"direct"`23782379          - `"code_execution_20250825"`23802381          - `"code_execution_20260120"`23822383          - `"code_execution_20260521"`23842385        - `cache_control: optional BetaCacheControlEphemeral or null`23862387          Create a cache control breakpoint at this content block.23882389        - `defer_loading: optional boolean`23902391          If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.23922393        - `strict: optional boolean`23942395          When true, guarantees schema validation on tool names and inputs23962397      - `BetaBrowserToolset20260801 object`23982399        The browser toolset: a single `tools[]` entry (carrying no2400        `name`) that declares the browser tool family. The model is served2401        the family's tool with any members disabled via `configs` removed2402        from its schema.24032404        - `type: "browser_toolset_20260801"`24052406        - `cache_control: optional BetaCacheControlEphemeral or null`24072408          Create a cache control breakpoint at this content block.24092410        - `configs: optional BetaBrowserToolsetConfigs or null`24112412          Per-member configuration for `browser_toolset_20260801`: one2413          optional field per member tool, keyed by the member name — the same2414          name the member's `tool_use` blocks carry. Every member is an2415          accepted key, and a member's defaults apply wherever its key is2416          absent. Unknown keys are rejected: the field set is this toolset2417          version's complete member set.24182419          - `type: optional BetaBrowserTypeConfig or null`24202421            `type`'s config overrides.24222423            - `defer_loading: optional boolean or null`24242425              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.24262427            - `enabled: optional boolean or null`24282429              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.24302431          - `close_tab: optional BetaBrowserCloseTabConfig or null`24322433            `close_tab`'s config overrides.24342435            - `defer_loading: optional boolean or null`24362437              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.24382439            - `enabled: optional boolean or null`24402441              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.24422443          - `double_click: optional BetaBrowserDoubleClickConfig or null`24442445            `double_click`'s config overrides.24462447            - `defer_loading: optional boolean or null`24482449              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.24502451            - `enabled: optional boolean or null`24522453              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.24542455          - `file_upload: optional BetaBrowserFileUploadConfig or null`24562457            `file_upload`'s config overrides.24582459            - `defer_loading: optional boolean or null`24602461              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.24622463            - `enabled: optional boolean or null`24642465              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.24662467          - `find: optional BetaBrowserFindConfig or null`24682469            `find`'s config overrides.24702471            - `defer_loading: optional boolean or null`24722473              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.24742475            - `enabled: optional boolean or null`24762477              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.24782479          - `form_input: optional BetaBrowserFormInputConfig or null`24802481            `form_input`'s config overrides.24822483            - `defer_loading: optional boolean or null`24842485              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.24862487            - `enabled: optional boolean or null`24882489              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.24902491          - `get_page_text: optional BetaBrowserGetPageTextConfig or null`24922493            `get_page_text`'s config overrides.24942495            - `defer_loading: optional boolean or null`24962497              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.24982499            - `enabled: optional boolean or null`25002501              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.25022503          - `hold_key: optional BetaBrowserHoldKeyConfig or null`25042505            `hold_key`'s config overrides.25062507            - `defer_loading: optional boolean or null`25082509              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.25102511            - `enabled: optional boolean or null`25122513              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.25142515          - `hover: optional BetaBrowserHoverConfig or null`25162517            `hover`'s config overrides.25182519            - `defer_loading: optional boolean or null`25202521              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.25222523            - `enabled: optional boolean or null`25242525              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.25262527          - `javascript_exec: optional BetaBrowserJavascriptExecConfig or null`25282529            `javascript_exec`'s config overrides.25302531            - `defer_loading: optional boolean or null`25322533              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.25342535            - `enabled: optional boolean or null`25362537              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.25382539          - `key: optional BetaBrowserKeyConfig or null`25402541            `key`'s config overrides.25422543            - `defer_loading: optional boolean or null`25442545              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.25462547            - `enabled: optional boolean or null`25482549              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.25502551          - `left_click: optional BetaBrowserLeftClickConfig or null`25522553            `left_click`'s config overrides.25542555            - `defer_loading: optional boolean or null`25562557              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.25582559            - `enabled: optional boolean or null`25602561              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.25622563          - `left_click_drag: optional BetaBrowserLeftClickDragConfig or null`25642565            `left_click_drag`'s config overrides.25662567            - `defer_loading: optional boolean or null`25682569              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.25702571            - `enabled: optional boolean or null`25722573              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.25742575          - `left_mouse_down: optional BetaBrowserLeftMouseDownConfig or null`25762577            `left_mouse_down`'s config overrides.25782579            - `defer_loading: optional boolean or null`25802581              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.25822583            - `enabled: optional boolean or null`25842585              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.25862587          - `left_mouse_up: optional BetaBrowserLeftMouseUpConfig or null`25882589            `left_mouse_up`'s config overrides.25902591            - `defer_loading: optional boolean or null`25922593              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.25942595            - `enabled: optional boolean or null`25962597              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.25982599          - `list_tabs: optional BetaBrowserListTabsConfig or null`26002601            `list_tabs`'s config overrides.26022603            - `defer_loading: optional boolean or null`26042605              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.26062607            - `enabled: optional boolean or null`26082609              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.26102611          - `middle_click: optional BetaBrowserMiddleClickConfig or null`26122613            `middle_click`'s config overrides.26142615            - `defer_loading: optional boolean or null`26162617              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.26182619            - `enabled: optional boolean or null`26202621              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.26222623          - `mouse_move: optional BetaBrowserMouseMoveConfig or null`26242625            `mouse_move`'s config overrides.26262627            - `defer_loading: optional boolean or null`26282629              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.26302631            - `enabled: optional boolean or null`26322633              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.26342635          - `navigate: optional BetaBrowserNavigateConfig or null`26362637            `navigate`'s config overrides.26382639            - `defer_loading: optional boolean or null`26402641              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.26422643            - `enabled: optional boolean or null`26442645              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.26462647          - `new_tab: optional BetaBrowserNewTabConfig or null`26482649            `new_tab`'s config overrides.26502651            - `defer_loading: optional boolean or null`26522653              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.26542655            - `enabled: optional boolean or null`26562657              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.26582659          - `read_console: optional BetaBrowserReadConsoleConfig or null`26602661            `read_console`'s config overrides.26622663            - `defer_loading: optional boolean or null`26642665              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.26662667            - `enabled: optional boolean or null`26682669              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.26702671          - `read_network: optional BetaBrowserReadNetworkConfig or null`26722673            `read_network`'s config overrides.26742675            - `defer_loading: optional boolean or null`26762677              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.26782679            - `enabled: optional boolean or null`26802681              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.26822683          - `read_page: optional BetaBrowserReadPageConfig or null`26842685            `read_page`'s config overrides.26862687            - `defer_loading: optional boolean or null`26882689              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.26902691            - `enabled: optional boolean or null`26922693              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.26942695          - `right_click: optional BetaBrowserRightClickConfig or null`26962697            `right_click`'s config overrides.26982699            - `defer_loading: optional boolean or null`27002701              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.27022703            - `enabled: optional boolean or null`27042705              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.27062707          - `screenshot: optional BetaBrowserScreenshotConfig or null`27082709            `screenshot`'s config overrides.27102711            - `defer_loading: optional boolean or null`27122713              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.27142715            - `enabled: optional boolean or null`27162717              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.27182719          - `scroll: optional BetaBrowserScrollConfig or null`27202721            `scroll`'s config overrides.27222723            - `defer_loading: optional boolean or null`27242725              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.27262727            - `enabled: optional boolean or null`27282729              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.27302731          - `scroll_to: optional BetaBrowserScrollToConfig or null`27322733            `scroll_to`'s config overrides.27342735            - `defer_loading: optional boolean or null`27362737              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.27382739            - `enabled: optional boolean or null`27402741              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.27422743          - `switch_tab: optional BetaBrowserSwitchTabConfig or null`27442745            `switch_tab`'s config overrides.27462747            - `defer_loading: optional boolean or null`27482749              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.27502751            - `enabled: optional boolean or null`27522753              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.27542755          - `triple_click: optional BetaBrowserTripleClickConfig or null`27562757            `triple_click`'s config overrides.27582759            - `defer_loading: optional boolean or null`27602761              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.27622763            - `enabled: optional boolean or null`27642765              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.27662767          - `wait: optional BetaBrowserWaitConfig or null`27682769            `wait`'s config overrides.27702771            - `defer_loading: optional boolean or null`27722773              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.27742775            - `enabled: optional boolean or null`27762777              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.27782779          - `zoom: optional BetaBrowserZoomConfig or null`27802781            `zoom`'s config overrides.27822783            - `defer_loading: optional boolean or null`27842785              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.27862787            - `enabled: optional boolean or null`27882789              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.27902791      - `BetaToolComputerUse20241022 object`27922793        - `type: "computer_20241022"`27942795        - `display_height_px: number`27962797          The height of the display in pixels.27982799          minimum: 128002801        - `display_width_px: number`28022803          The width of the display in pixels.28042805          minimum: 128062807        - `name: "computer"`28082809          Name of the tool.28102811          This is how the tool will be called by the model and in `tool_use` blocks.28122813        - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`28142815          - `"direct"`28162817          - `"code_execution_20250825"`28182819          - `"code_execution_20260120"`28202821          - `"code_execution_20260521"`28222823        - `cache_control: optional BetaCacheControlEphemeral or null`28242825          Create a cache control breakpoint at this content block.28262827        - `defer_loading: optional boolean`28282829          If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.28302831        - `display_number: optional number or null`28322833          The X11 display number (e.g. 0, 1) for the display.28342835          minimum: 028362837        - `input_examples: optional array of map[unknown]`28382839        - `strict: optional boolean`28402841          When true, guarantees schema validation on tool names and inputs28422843      - `BetaMemoryTool20250818 object`28442845        - `type: "memory_20250818"`28462847        - `name: "memory"`28482849          Name of the tool.28502851          This is how the tool will be called by the model and in `tool_use` blocks.28522853        - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`28542855          - `"direct"`28562857          - `"code_execution_20250825"`28582859          - `"code_execution_20260120"`28602861          - `"code_execution_20260521"`28622863        - `cache_control: optional BetaCacheControlEphemeral or null`28642865          Create a cache control breakpoint at this content block.28662867        - `defer_loading: optional boolean`28682869          If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.28702871        - `input_examples: optional array of map[unknown]`28722873        - `strict: optional boolean`28742875          When true, guarantees schema validation on tool names and inputs28762877      - `BetaToolComputerUse20250124 object`28782879        - `type: "computer_20250124"`28802881        - `display_height_px: number`28822883          The height of the display in pixels.28842885          minimum: 128862887        - `display_width_px: number`28882889          The width of the display in pixels.28902891          minimum: 128922893        - `name: "computer"`28942895          Name of the tool.28962897          This is how the tool will be called by the model and in `tool_use` blocks.28982899        - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`29002901          - `"direct"`29022903          - `"code_execution_20250825"`29042905          - `"code_execution_20260120"`29062907          - `"code_execution_20260521"`29082909        - `cache_control: optional BetaCacheControlEphemeral or null`29102911          Create a cache control breakpoint at this content block.29122913        - `defer_loading: optional boolean`29142915          If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.29162917        - `display_number: optional number or null`29182919          The X11 display number (e.g. 0, 1) for the display.29202921          minimum: 029222923        - `input_examples: optional array of map[unknown]`29242925        - `strict: optional boolean`29262927          When true, guarantees schema validation on tool names and inputs29282929      - `BetaToolTextEditor20241022 object`29302931        - `type: "text_editor_20241022"`29322933        - `name: "str_replace_editor"`29342935          Name of the tool.29362937          This is how the tool will be called by the model and in `tool_use` blocks.29382939        - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`29402941          - `"direct"`29422943          - `"code_execution_20250825"`29442945          - `"code_execution_20260120"`29462947          - `"code_execution_20260521"`29482949        - `cache_control: optional BetaCacheControlEphemeral or null`29502951          Create a cache control breakpoint at this content block.29522953        - `defer_loading: optional boolean`29542955          If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.29562957        - `input_examples: optional array of map[unknown]`29582959        - `strict: optional boolean`29602961          When true, guarantees schema validation on tool names and inputs29622963      - `BetaToolComputerUse20251124 object`29642965        - `type: "computer_20251124"`29662967        - `display_height_px: number`29682969          The height of the display in pixels.29702971          minimum: 129722973        - `display_width_px: number`29742975          The width of the display in pixels.29762977          minimum: 129782979        - `name: "computer"`29802981          Name of the tool.29822983          This is how the tool will be called by the model and in `tool_use` blocks.29842985        - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`29862987          - `"direct"`29882989          - `"code_execution_20250825"`29902991          - `"code_execution_20260120"`29922993          - `"code_execution_20260521"`29942995        - `cache_control: optional BetaCacheControlEphemeral or null`29962997          Create a cache control breakpoint at this content block.29982999        - `defer_loading: optional boolean`30003001          If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.30023003        - `display_number: optional number or null`30043005          The X11 display number (e.g. 0, 1) for the display.30063007          minimum: 030083009        - `enable_zoom: optional boolean`30103011          Whether to enable an action to take a zoomed-in screenshot of the screen.30123013        - `input_examples: optional array of map[unknown]`30143015        - `strict: optional boolean`30163017          When true, guarantees schema validation on tool names and inputs30183019      - `BetaComputerToolset20260801 object`30203021        The computer toolset: a single `tools[]` entry (carrying no3022        `name`) that declares the computer tool family. The model is3023        served the family's tool with any members disabled via `configs`3024        removed from its schema. Every member is enabled by default, zoom3025        included. The single-tool options `display_number` and3026        `enable_zoom` are not fields of a toolset entry — it carries only3027        `type`, `configs`, and `cache_control`; zoom is controlled3028        via `configs.zoom.enabled`.30293030        - `type: "computer_toolset_20260801"`30313032        - `cache_control: optional BetaCacheControlEphemeral or null`30333034          Create a cache control breakpoint at this content block.30353036        - `configs: optional BetaComputerToolsetConfigs or null`30373038          Per-member configuration for `computer_toolset_20260801`: one3039          optional field per member tool, keyed by the member name — the same3040          name the member's `tool_use` blocks carry. Every member is an3041          accepted key, and a member's defaults apply wherever its key is3042          absent. Unknown keys are rejected: the field set is this toolset3043          version's complete member set.30443045          - `type: optional BetaComputerTypeConfig or null`30463047            `type`'s config overrides.30483049            - `defer_loading: optional boolean or null`30503051              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.30523053            - `enabled: optional boolean or null`30543055              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.30563057          - `cursor_position: optional BetaComputerCursorPositionConfig or null`30583059            `cursor_position`'s config overrides.30603061            - `defer_loading: optional boolean or null`30623063              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.30643065            - `enabled: optional boolean or null`30663067              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.30683069          - `double_click: optional BetaComputerDoubleClickConfig or null`30703071            `double_click`'s config overrides.30723073            - `defer_loading: optional boolean or null`30743075              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.30763077            - `enabled: optional boolean or null`30783079              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.30803081          - `hold_key: optional BetaComputerHoldKeyConfig or null`30823083            `hold_key`'s config overrides.30843085            - `defer_loading: optional boolean or null`30863087              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.30883089            - `enabled: optional boolean or null`30903091              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.30923093          - `key: optional BetaComputerKeyConfig or null`30943095            `key`'s config overrides.30963097            - `defer_loading: optional boolean or null`30983099              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.31003101            - `enabled: optional boolean or null`31023103              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.31043105          - `left_click: optional BetaComputerLeftClickConfig or null`31063107            `left_click`'s config overrides.31083109            - `defer_loading: optional boolean or null`31103111              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.31123113            - `enabled: optional boolean or null`31143115              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.31163117          - `left_click_drag: optional BetaComputerLeftClickDragConfig or null`31183119            `left_click_drag`'s config overrides.31203121            - `defer_loading: optional boolean or null`31223123              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.31243125            - `enabled: optional boolean or null`31263127              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.31283129          - `left_mouse_down: optional BetaComputerLeftMouseDownConfig or null`31303131            `left_mouse_down`'s config overrides.31323133            - `defer_loading: optional boolean or null`31343135              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.31363137            - `enabled: optional boolean or null`31383139              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.31403141          - `left_mouse_up: optional BetaComputerLeftMouseUpConfig or null`31423143            `left_mouse_up`'s config overrides.31443145            - `defer_loading: optional boolean or null`31463147              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.31483149            - `enabled: optional boolean or null`31503151              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.31523153          - `middle_click: optional BetaComputerMiddleClickConfig or null`31543155            `middle_click`'s config overrides.31563157            - `defer_loading: optional boolean or null`31583159              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.31603161            - `enabled: optional boolean or null`31623163              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.31643165          - `mouse_move: optional BetaComputerMouseMoveConfig or null`31663167            `mouse_move`'s config overrides.31683169            - `defer_loading: optional boolean or null`31703171              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.31723173            - `enabled: optional boolean or null`31743175              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.31763177          - `right_click: optional BetaComputerRightClickConfig or null`31783179            `right_click`'s config overrides.31803181            - `defer_loading: optional boolean or null`31823183              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.31843185            - `enabled: optional boolean or null`31863187              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.31883189          - `screenshot: optional BetaComputerScreenshotConfig or null`31903191            `screenshot`'s config overrides.31923193            - `defer_loading: optional boolean or null`31943195              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.31963197            - `enabled: optional boolean or null`31983199              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.32003201          - `scroll: optional BetaComputerScrollConfig or null`32023203            `scroll`'s config overrides.32043205            - `defer_loading: optional boolean or null`32063207              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.32083209            - `enabled: optional boolean or null`32103211              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.32123213          - `triple_click: optional BetaComputerTripleClickConfig or null`32143215            `triple_click`'s config overrides.32163217            - `defer_loading: optional boolean or null`32183219              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.32203221            - `enabled: optional boolean or null`32223223              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.32243225          - `wait: optional BetaComputerWaitConfig or null`32263227            `wait`'s config overrides.32283229            - `defer_loading: optional boolean or null`32303231              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.32323233            - `enabled: optional boolean or null`32343235              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.32363237          - `zoom: optional BetaComputerZoomConfig or null`32383239            `zoom`'s config overrides.32403241            - `defer_loading: optional boolean or null`32423243              Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.32443245            - `enabled: optional boolean or null`32463247              Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.32483249      - `BetaToolTextEditor20250124 object`32503251        - `type: "text_editor_20250124"`32523253        - `name: "str_replace_editor"`32543255          Name of the tool.32563257          This is how the tool will be called by the model and in `tool_use` blocks.32583259        - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`32603261          - `"direct"`32623263          - `"code_execution_20250825"`32643265          - `"code_execution_20260120"`32663267          - `"code_execution_20260521"`32683269        - `cache_control: optional BetaCacheControlEphemeral or null`32703271          Create a cache control breakpoint at this content block.32723273        - `defer_loading: optional boolean`32743275          If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.32763277        - `input_examples: optional array of map[unknown]`32783279        - `strict: optional boolean`32803281          When true, guarantees schema validation on tool names and inputs32823283      - `BetaToolTextEditor20250429 object`32843285        - `type: "text_editor_20250429"`32863287        - `name: "str_replace_based_edit_tool"`32883289          Name of the tool.32903291          This is how the tool will be called by the model and in `tool_use` blocks.32923293        - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`32943295          - `"direct"`32963297          - `"code_execution_20250825"`32983299          - `"code_execution_20260120"`33003301          - `"code_execution_20260521"`33023303        - `cache_control: optional BetaCacheControlEphemeral or null`33043305          Create a cache control breakpoint at this content block.33063307        - `defer_loading: optional boolean`33083309          If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.33103311        - `input_examples: optional array of map[unknown]`33123313        - `strict: optional boolean`33143315          When true, guarantees schema validation on tool names and inputs33163317      - `BetaToolTextEditor20250728 object`33183319        - `type: "text_editor_20250728"`33203321        - `name: "str_replace_based_edit_tool"`33223323          Name of the tool.33243325          This is how the tool will be called by the model and in `tool_use` blocks.33263327        - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`33283329          - `"direct"`33303331          - `"code_execution_20250825"`33323333          - `"code_execution_20260120"`33343335          - `"code_execution_20260521"`33363337        - `cache_control: optional BetaCacheControlEphemeral or null`33383339          Create a cache control breakpoint at this content block.33403341        - `defer_loading: optional boolean`33423343          If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.33443345        - `input_examples: optional array of map[unknown]`33463347        - `max_characters: optional number or null`33483349          Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file.33503351          minimum: 133523353        - `strict: optional boolean`33543355          When true, guarantees schema validation on tool names and inputs33563357      - `BetaWebSearchTool20250305 object`33583359        - `type: "web_search_20250305"`33603361        - `name: "web_search"`33623363          Name of the tool.33643365          This is how the tool will be called by the model and in `tool_use` blocks.33663367        - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`33683369          - `"direct"`33703371          - `"code_execution_20250825"`33723373          - `"code_execution_20260120"`33743375          - `"code_execution_20260521"`33763377        - `allowed_domains: optional array of string or null`33783379          If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.33803381        - `blocked_domains: optional array of string or null`33823383          If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.33843385        - `cache_control: optional BetaCacheControlEphemeral or null`33863387          Create a cache control breakpoint at this content block.33883389        - `defer_loading: optional boolean`33903391          If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.33923393        - `max_uses: optional number or null`33943395          Maximum number of times the tool can be used in the API request.33963397          exclusiveMinimum: 033983399        - `strict: optional boolean`34003401          When true, guarantees schema validation on tool names and inputs34023403        - `user_location: optional BetaUserLocation or null`34043405          Parameters for the user's location. Used to provide more relevant search results.34063407          - `type: "approximate"`34083409          - `city: optional string or null`34103411            The city of the user.34123413            maxLength: 255, minLength: 134143415          - `country: optional string or null`34163417            The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user.34183419            maxLength: 2, minLength: 234203421          - `region: optional string or null`34223423            The region of the user.34243425            maxLength: 255, minLength: 134263427          - `timezone: optional string or null`34283429            The [IANA timezone](https://nodatime.org/TimeZones) of the user.34303431            maxLength: 255, minLength: 134323433      - `BetaWebFetchTool20250910 object`34343435        - `type: "web_fetch_20250910"`34363437        - `name: "web_fetch"`34383439          Name of the tool.34403441          This is how the tool will be called by the model and in `tool_use` blocks.34423443        - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`34443445          - `"direct"`34463447          - `"code_execution_20250825"`34483449          - `"code_execution_20260120"`34503451          - `"code_execution_20260521"`34523453        - `allowed_domains: optional array of string or null`34543455          List of domains to allow fetching from34563457        - `blocked_domains: optional array of string or null`34583459          List of domains to block fetching from34603461        - `cache_control: optional BetaCacheControlEphemeral or null`34623463          Create a cache control breakpoint at this content block.34643465        - `citations: optional BetaCitationsConfigParam or null`34663467          Citations configuration for fetched documents. Citations are disabled by default.34683469        - `defer_loading: optional boolean`34703471          If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.34723473        - `max_content_tokens: optional number or null`34743475          Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.34763477          exclusiveMinimum: 034783479        - `max_uses: optional number or null`34803481          Maximum number of times the tool can be used in the API request.34823483          exclusiveMinimum: 034843485        - `strict: optional boolean`34863487          When true, guarantees schema validation on tool names and inputs34883489        - `url_sources: optional BetaWebFetchURLSources or null`34903491          Which sources contribute to the set of URLs web fetch may fetch.34923493          Each key is a tagged variant: `user_input` is `all` or `none`; the3494          two tool filters are `all`, `none`, `only` (only the named tools'3495          results) or `except` (every result but the named tools'). A named tool3496          must be declared in this request's `tools[]`.34973498          - `client_tool_results: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone or BetaWebFetchURLSourceOnly or BetaWebFetchURLSourceExcept`34993500            Which client tools' results contribute fetchable URLs: "all", "none", or an only or except list of client tool names from tools[].35013502            - `BetaWebFetchURLSourceAll object`35033504              The `url_sources` variant under which a source contributes in3505              full: every result of the tool filter's source, or all user input.35063507              - `type: "all"`35083509            - `BetaWebFetchURLSourceNone object`35103511              The `url_sources` variant under which a source contributes nothing:3512              no result of the tool filter's source, or no user input.35133514              - `type: "none"`35153516            - `BetaWebFetchURLSourceOnly object`35173518              The tool filter variant under which only the named tools' results3519              contribute.35203521              - `type: "only"`35223523              - `tools: array of BetaWebFetchURLSourceToolReference`35243525                - `type: "tool_reference"`35263527                - `name: string`35283529            - `BetaWebFetchURLSourceExcept object`35303531              The tool filter variant under which every result but the named3532              tools' contributes.35333534              - `type: "except"`35353536              - `tools: array of BetaWebFetchURLSourceToolReference`35373538                - `type: "tool_reference"`35393540                - `name: string`35413542          - `server_tool_results: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone or BetaWebFetchURLSourceOnly or BetaWebFetchURLSourceExcept`35433544            Which server tools' results contribute fetchable URLs: "all", "none", or an only or except list of server tool names from tools[]; only web_search and web_fetch results ever contribute.35453546            - `BetaWebFetchURLSourceAll object`35473548              The `url_sources` variant under which a source contributes in3549              full: every result of the tool filter's source, or all user input.35503551            - `BetaWebFetchURLSourceNone object`35523553              The `url_sources` variant under which a source contributes nothing:3554              no result of the tool filter's source, or no user input.35553556            - `BetaWebFetchURLSourceOnly object`35573558              The tool filter variant under which only the named tools' results3559              contribute.35603561            - `BetaWebFetchURLSourceExcept object`35623563              The tool filter variant under which every result but the named3564              tools' contributes.35653566          - `user_input: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone`35673568            Whether URLs in user messages are fetchable: "all" or "none".35693570            - `BetaWebFetchURLSourceAll object`35713572              The `url_sources` variant under which a source contributes in3573              full: every result of the tool filter's source, or all user input.35743575            - `BetaWebFetchURLSourceNone object`35763577              The `url_sources` variant under which a source contributes nothing:3578              no result of the tool filter's source, or no user input.35793580      - `BetaWebSearchTool20260209 object`35813582        - `type: "web_search_20260209"`35833584        - `name: "web_search"`35853586          Name of the tool.35873588          This is how the tool will be called by the model and in `tool_use` blocks.35893590        - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`35913592          - `"direct"`35933594          - `"code_execution_20250825"`35953596          - `"code_execution_20260120"`35973598          - `"code_execution_20260521"`35993600        - `allowed_domains: optional array of string or null`36013602          If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.36033604        - `blocked_domains: optional array of string or null`36053606          If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.36073608        - `cache_control: optional BetaCacheControlEphemeral or null`36093610          Create a cache control breakpoint at this content block.36113612        - `defer_loading: optional boolean`36133614          If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.36153616        - `max_uses: optional number or null`36173618          Maximum number of times the tool can be used in the API request.36193620          exclusiveMinimum: 036213622        - `strict: optional boolean`36233624          When true, guarantees schema validation on tool names and inputs36253626        - `user_location: optional BetaUserLocation or null`36273628          Parameters for the user's location. Used to provide more relevant search results.36293630      - `BetaWebFetchTool20260209 object`36313632        - `type: "web_fetch_20260209"`36333634        - `name: "web_fetch"`36353636          Name of the tool.36373638          This is how the tool will be called by the model and in `tool_use` blocks.36393640        - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`36413642          - `"direct"`36433644          - `"code_execution_20250825"`36453646          - `"code_execution_20260120"`36473648          - `"code_execution_20260521"`36493650        - `allowed_domains: optional array of string or null`36513652          List of domains to allow fetching from36533654        - `blocked_domains: optional array of string or null`36553656          List of domains to block fetching from36573658        - `cache_control: optional BetaCacheControlEphemeral or null`36593660          Create a cache control breakpoint at this content block.36613662        - `citations: optional BetaCitationsConfigParam or null`36633664          Citations configuration for fetched documents. Citations are disabled by default.36653666        - `defer_loading: optional boolean`36673668          If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.36693670        - `max_content_tokens: optional number or null`36713672          Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.36733674          exclusiveMinimum: 036753676        - `max_uses: optional number or null`36773678          Maximum number of times the tool can be used in the API request.36793680          exclusiveMinimum: 036813682        - `strict: optional boolean`36833684          When true, guarantees schema validation on tool names and inputs36853686        - `url_sources: optional BetaWebFetchURLSources or null`36873688          Which sources contribute to the set of URLs web fetch may fetch.36893690          Each key is a tagged variant: `user_input` is `all` or `none`; the3691          two tool filters are `all`, `none`, `only` (only the named tools'3692          results) or `except` (every result but the named tools'). A named tool3693          must be declared in this request's `tools[]`.36943695      - `BetaWebFetchTool20260309 object`36963697        Web fetch tool with use_cache parameter for bypassing cached content.36983699        - `type: "web_fetch_20260309"`37003701        - `name: "web_fetch"`37023703          Name of the tool.37043705          This is how the tool will be called by the model and in `tool_use` blocks.37063707        - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`37083709          - `"direct"`37103711          - `"code_execution_20250825"`37123713          - `"code_execution_20260120"`37143715          - `"code_execution_20260521"`37163717        - `allowed_domains: optional array of string or null`37183719          List of domains to allow fetching from37203721        - `blocked_domains: optional array of string or null`37223723          List of domains to block fetching from37243725        - `cache_control: optional BetaCacheControlEphemeral or null`37263727          Create a cache control breakpoint at this content block.37283729        - `citations: optional BetaCitationsConfigParam or null`37303731          Citations configuration for fetched documents. Citations are disabled by default.37323733        - `defer_loading: optional boolean`37343735          If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.37363737        - `max_content_tokens: optional number or null`37383739          Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.37403741          exclusiveMinimum: 037423743        - `max_uses: optional number or null`37443745          Maximum number of times the tool can be used in the API request.37463747          exclusiveMinimum: 037483749        - `strict: optional boolean`37503751          When true, guarantees schema validation on tool names and inputs37523753        - `url_sources: optional BetaWebFetchURLSources or null`37543755          Which sources contribute to the set of URLs web fetch may fetch.37563757          Each key is a tagged variant: `user_input` is `all` or `none`; the3758          two tool filters are `all`, `none`, `only` (only the named tools'3759          results) or `except` (every result but the named tools'). A named tool3760          must be declared in this request's `tools[]`.37613762        - `use_cache: optional boolean`37633764          Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.37653766      - `BetaWebSearchTool20260318 object`37673768        - `type: "web_search_20260318"`37693770        - `name: "web_search"`37713772          Name of the tool.37733774          This is how the tool will be called by the model and in `tool_use` blocks.37753776        - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`37773778          - `"direct"`37793780          - `"code_execution_20250825"`37813782          - `"code_execution_20260120"`37833784          - `"code_execution_20260521"`37853786        - `allowed_domains: optional array of string or null`37873788          If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.37893790        - `blocked_domains: optional array of string or null`37913792          If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.37933794        - `cache_control: optional BetaCacheControlEphemeral or null`37953796          Create a cache control breakpoint at this content block.37973798        - `defer_loading: optional boolean`37993800          If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.38013802        - `max_uses: optional number or null`38033804          Maximum number of times the tool can be used in the API request.38053806          exclusiveMinimum: 038073808        - `response_inclusion: optional "full" or "excluded"`38093810          How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn.38113812          - `"full"`38133814          - `"excluded"`38153816        - `strict: optional boolean`38173818          When true, guarantees schema validation on tool names and inputs38193820        - `user_location: optional BetaUserLocation or null`38213822          Parameters for the user's location. Used to provide more relevant search results.38233824      - `BetaWebFetchTool20260318 object`38253826        - `type: "web_fetch_20260318"`38273828        - `name: "web_fetch"`38293830          Name of the tool.38313832          This is how the tool will be called by the model and in `tool_use` blocks.38333834        - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`38353836          - `"direct"`38373838          - `"code_execution_20250825"`38393840          - `"code_execution_20260120"`38413842          - `"code_execution_20260521"`38433844        - `allowed_domains: optional array of string or null`38453846          List of domains to allow fetching from38473848        - `blocked_domains: optional array of string or null`38493850          List of domains to block fetching from38513852        - `cache_control: optional BetaCacheControlEphemeral or null`38533854          Create a cache control breakpoint at this content block.38553856        - `citations: optional BetaCitationsConfigParam or null`38573858          Citations configuration for fetched documents. Citations are disabled by default.38593860        - `defer_loading: optional boolean`38613862          If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.38633864        - `max_content_tokens: optional number or null`38653866          Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.38673868          exclusiveMinimum: 038693870        - `max_uses: optional number or null`38713872          Maximum number of times the tool can be used in the API request.38733874          exclusiveMinimum: 038753876        - `response_inclusion: optional "full" or "excluded"`38773878          How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn.38793880          - `"full"`38813882          - `"excluded"`38833884        - `strict: optional boolean`38853886          When true, guarantees schema validation on tool names and inputs38873888        - `url_sources: optional BetaWebFetchURLSources or null`38893890          Which sources contribute to the set of URLs web fetch may fetch.38913892          Each key is a tagged variant: `user_input` is `all` or `none`; the3893          two tool filters are `all`, `none`, `only` (only the named tools'3894          results) or `except` (every result but the named tools'). A named tool3895          must be declared in this request's `tools[]`.38963897        - `use_cache: optional boolean`38983899          Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.39003901      - `BetaAdvisorTool20260301 object`39023903        - `type: "advisor_20260301"`39043905        - `model: Model`39063907          The model that will complete your prompt.39083909          See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.39103911        - `name: "advisor"`39123913          Name of the tool.39143915          This is how the tool will be called by the model and in `tool_use` blocks.39163917        - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`39183919          - `"direct"`39203921          - `"code_execution_20250825"`39223923          - `"code_execution_20260120"`39243925          - `"code_execution_20260521"`39263927        - `cache_control: optional BetaCacheControlEphemeral or null`39283929          Create a cache control breakpoint at this content block.39303931        - `caching: optional BetaCacheControlEphemeral or null`39323933          Caching for the advisor's own prompt. When set, each advisor call writes a cache entry at the given TTL so subsequent calls in the same conversation read the stable prefix. When omitted, the advisor prompt is not cached.39343935        - `defer_loading: optional boolean`39363937          If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.39383939        - `max_tokens: optional number or null`39403941          Bounds the advisor's total output (thinking + text) per call. When the advisor hits this cap, the returned advisor_result or advisor_redacted_result block carries stop_reason='max_tokens', and a truncation note is appended to the advice text the worker model sees (inside the encrypted blob in redacted mode). When set, the server also emits a remaining-tokens budget block in the advisor's prompt so the advisor self-shapes toward the cap. When omitted, the advisor model's default output cap applies and no budget block is emitted.39423943          minimum: 102439443945        - `max_uses: optional number or null`39463947          Maximum number of times the tool can be used in the API request.39483949          exclusiveMinimum: 039503951        - `strict: optional boolean`39523953          When true, guarantees schema validation on tool names and inputs39543955      - `BetaToolSearchToolBm25_20251119 object`39563957        - `type: "tool_search_tool_bm25_20251119" or "tool_search_tool_bm25"`39583959          - `"tool_search_tool_bm25_20251119"`39603961          - `"tool_search_tool_bm25"`39623963        - `name: "tool_search_tool_bm25"`39643965          Name of the tool.39663967          This is how the tool will be called by the model and in `tool_use` blocks.39683969        - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`39703971          - `"direct"`39723973          - `"code_execution_20250825"`39743975          - `"code_execution_20260120"`39763977          - `"code_execution_20260521"`39783979        - `cache_control: optional BetaCacheControlEphemeral or null`39803981          Create a cache control breakpoint at this content block.39823983        - `defer_loading: optional boolean`39843985          If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.39863987        - `strict: optional boolean`39883989          When true, guarantees schema validation on tool names and inputs39903991      - `BetaToolSearchToolRegex20251119 object`39923993        - `type: "tool_search_tool_regex_20251119" or "tool_search_tool_regex"`39943995          - `"tool_search_tool_regex_20251119"`39963997          - `"tool_search_tool_regex"`39983999        - `name: "tool_search_tool_regex"`40004001          Name of the tool.40024003          This is how the tool will be called by the model and in `tool_use` blocks.40044005        - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`40064007          - `"direct"`40084009          - `"code_execution_20250825"`40104011          - `"code_execution_20260120"`40124013          - `"code_execution_20260521"`40144015        - `cache_control: optional BetaCacheControlEphemeral or null`40164017          Create a cache control breakpoint at this content block.40184019        - `defer_loading: optional boolean`40204021          If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.40224023        - `strict: optional boolean`40244025          When true, guarantees schema validation on tool names and inputs40264027      - `BetaMCPToolset object`40284029        Configuration for a group of tools from an MCP server.40304031        Allows configuring enabled status and defer_loading for all tools4032        from an MCP server, with optional per-tool overrides.40334034        - `type: "mcp_toolset"`40354036        - `mcp_server_name: string`40374038          Name of the MCP server to configure tools for40394040          maxLength: 255, minLength: 140414042        - `cache_control: optional BetaCacheControlEphemeral or null`40434044          Create a cache control breakpoint at this content block.40454046        - `configs: optional map[BetaMCPToolConfig] or null`40474048          Configuration overrides for specific tools, keyed by tool name40494050          - `defer_loading: optional boolean`40514052          - `enabled: optional boolean`40534054        - `default_config: optional BetaMCPToolDefaultConfig`40554056          Default configuration applied to all tools from this server40574058          - `defer_loading: optional boolean`40594060          - `enabled: optional boolean`40614062    - `output_format: optional BetaJSONOutputFormat or null`40634064      **Deprecated**40654066      Deprecated: Use `output_config.format` instead. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)40674068      A schema to specify Claude's output format in responses. This parameter will be removed in a future release.40694070    - `temperature: optional number`40714072      **Deprecated**: Deprecated. Models released after Claude Opus 4.6 do not support setting temperature. A value of 1.0 will be accepted for backwards compatibility, all other values will be rejected with a 400 error.40734074      Amount of randomness injected into the response.40754076      Defaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0` for analytical / multiple choice, and closer to `1.0` for creative and generative tasks.40774078      Note that even with `temperature` of `0.0`, the results will not be fully deterministic.40794080      maximum: 1, minimum: 040814082    - `top_k: optional number`40834084      **Deprecated**: Deprecated. Models released after Claude Opus 4.6 do not accept top_k; any value will be rejected with a 400 error.40854086      Only sample from the top K options for each subsequent token.40874088      Used to remove "long tail" low probability responses. [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277).40894090      Recommended for advanced use cases only.40914092      minimum: 040934094    - `top_p: optional number`40954096      **Deprecated**: Deprecated. Models released after Claude Opus 4.6 do not support setting top_p. A value >= 0.99 will be accepted for backwards compatibility, all other values will be rejected with a 400 error.40974098      Use nucleus sampling.40994100      In nucleus sampling, we compute the cumulative distribution over all the options for each subsequent token in decreasing probability order and cut it off once it reaches a particular probability specified by `top_p`.41014102      Recommended for advanced use cases only.41034104      maximum: 1, minimum: 041054106## Returns41074108- `BetaMessageBatch object`41094110  - `type: "message_batch"`41114112    Object type.41134114    For Message Batches, this is always `"message_batch"`.41154116    default: message_batch41174118  - `id: string`41194120    Unique object identifier.41214122    The format and length of IDs may change over time.41234124  - `archived_at: string or null`41254126    RFC 3339 datetime string representing the time at which the Message Batch was archived and its results became unavailable.41274128    format: date-time41294130  - `cancel_initiated_at: string or null`41314132    RFC 3339 datetime string representing the time at which cancellation was initiated for the Message Batch. Specified only if cancellation was initiated.41334134    format: date-time41354136  - `created_at: string`41374138    RFC 3339 datetime string representing the time at which the Message Batch was created.41394140    format: date-time41414142  - `ended_at: string or null`41434144    RFC 3339 datetime string representing the time at which processing for the Message Batch ended. Specified only once processing ends.41454146    Processing ends when every request in a Message Batch has either succeeded, errored, canceled, or expired.41474148    format: date-time41494150  - `expires_at: string`41514152    RFC 3339 datetime string representing the time at which the Message Batch will expire and end processing, which is 24 hours after creation.41534154    format: date-time41554156  - `processing_status: "in_progress" or "canceling" or "ended"`41574158    Processing status of the Message Batch.41594160    - `"in_progress"`41614162    - `"canceling"`41634164    - `"ended"`41654166  - `request_counts: BetaMessageBatchRequestCounts`41674168    Tallies requests within the Message Batch, categorized by their status.41694170    Requests start as `processing` and move to one of the other statuses only once processing of the entire batch ends. The sum of all values always matches the total number of requests in the batch.41714172    - `canceled: number`41734174      Number of requests in the Message Batch that have been canceled.41754176      This is zero until processing of the entire Message Batch has ended.41774178      default: 041794180    - `errored: number`41814182      Number of requests in the Message Batch that encountered an error.41834184      This is zero until processing of the entire Message Batch has ended.41854186      default: 041874188    - `expired: number`41894190      Number of requests in the Message Batch that have expired.41914192      This is zero until processing of the entire Message Batch has ended.41934194      default: 041954196    - `processing: number`41974198      Number of requests in the Message Batch that are processing.41994200      default: 042014202    - `succeeded: number`42034204      Number of requests in the Message Batch that have completed successfully.42054206      This is zero until processing of the entire Message Batch has ended.42074208      default: 042094210  - `results_url: string or null`42114212    URL to a `.jsonl` file containing the results of the Message Batch requests. Specified only once processing ends.42134214    Results in the file are not guaranteed to be in the same order as requests. Use the `custom_id` field to match results to requests.42154216## Example42174218```bash4219curl https://api.anthropic.com/v1/messages/batches \4220    -H 'Content-Type: application/json' \4221    -H 'anthropic-version: 2023-06-01' \4222    -H 'anthropic-beta: message-batches-2024-09-24' \4223    -H "X-Api-Key: $ANTHROPIC_API_KEY" \4224    -d '{4225          "requests": [4226            {4227              "custom_id": "my-custom-id-1",4228              "params": {4229                "max_tokens": 1024,4230                "messages": [4231                  {4232                    "content": "Hello, world",4233                    "role": "user"4234                  }4235                ],4236                "model": "claude-opus-5"4237              }4238            }4239          ]4240        }'4241```42424243### Response (200)42444245```json4246{4247  "id": "msgbatch_013Zva2CMHLNnXjNJJKqJ2EF",4248  "archived_at": "2024-08-20T18:37:24.100435Z",4249  "cancel_initiated_at": "2024-08-20T18:37:24.100435Z",4250  "created_at": "2024-08-20T18:37:24.100435Z",4251  "ended_at": "2024-08-20T18:37:24.100435Z",4252  "expires_at": "2024-08-20T18:37:24.100435Z",4253  "processing_status": "in_progress",4254  "request_counts": {4255    "canceled": 10,4256    "errored": 30,4257    "expired": 10,4258    "processing": 100,4259    "succeeded": 504260  },4261  "results_url": "https://api.anthropic.com/v1/messages/batches/msgbatch_013Zva2CMHLNnXjNJJKqJ2EF/results",4262  "type": "message_batch"4263}4264```4265
Files main
Menu

Theme