Repository Public
1---2title: Create a Message3url: https://platform.claude.com/docs/en/api/beta/messages/create4---56# Create a Message78**POST** `/v1/messages`910Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation.1112The Messages API can be used for either single queries or stateless multi-turn conversations.1314Learn more about the Messages API in our [user guide](https://platform.claude.com/docs/en/get-started)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 this request to. Use when acting on behalf of a party other than your organization. Requires the `user-profiles` beta header.121122- `"anthropic-workspace-id": optional string`123124## Body parameters125126- `max_tokens: number`127128 The maximum number of tokens to generate before stopping.129130 Note that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate.131132 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.133134 Different models have different maximum values for this parameter. See [models](https://platform.claude.com/docs/en/about-claude/models/overview) for details.135136 minimum: 0137138- `messages: array of BetaMessageParam`139140 Input messages.141142 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.143144 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.145146 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.147148 Example with a single `user` message:149150 ```json151 [{"role": "user", "content": "Hello, Claude"}]152 ```153154 Example with multiple conversational turns:155156 ```json157 [158 {"role": "user", "content": "Hello there."},159 {"role": "assistant", "content": "Hi, I'm Claude. How can I help you?"},160 {"role": "user", "content": "Can you explain LLMs in plain English?"},161 ]162 ```163164 Example with a partially-filled response from Claude:165166 ```json167 [168 {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"},169 {"role": "assistant", "content": "The best answer is ("},170 ]171 ```172173 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:174175 ```json176 {"role": "user", "content": "Hello, Claude"}177 ```178179 ```json180 {"role": "user", "content": [{"type": "text", "text": "Hello, Claude"}]}181 ```182183 See [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages).184185 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.186187 There is a limit of 100,000 messages in a single request.188189 - `content: string or array of BetaContentBlockParam`190191 - `string`192193 - `array of BetaContentBlockParam`194195 - `BetaTextBlockParam object`196197 - `type: "text"`198199 - `text: string`200201 minLength: 1202203 - `cache_control: optional BetaCacheControlEphemeral or null`204205 Create a cache control breakpoint at this content block.206207 - `type: "ephemeral"`208209 - `ttl: optional "5m" or "1h"`210211 The time-to-live for the cache control breakpoint.212213 This may be one the following values:214215 - `5m`: 5 minutes216 - `1h`: 1 hour217218 Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details.219220 - `"5m"`221222 - `"1h"`223224 - `citations: optional array of BetaTextCitationParam or null`225226 - `BetaCitationCharLocationParam object`227228 - `type: "char_location"`229230 - `cited_text: string`231232 - `document_index: number`233234 minimum: 0235236 - `document_title: string or null`237238 maxLength: 500, minLength: 1239240 - `end_char_index: number`241242 - `start_char_index: number`243244 minimum: 0245246 - `BetaCitationPageLocationParam object`247248 - `type: "page_location"`249250 - `cited_text: string`251252 - `document_index: number`253254 minimum: 0255256 - `document_title: string or null`257258 maxLength: 500, minLength: 1259260 - `end_page_number: number`261262 - `start_page_number: number`263264 minimum: 1265266 - `BetaCitationContentBlockLocationParam object`267268 - `type: "content_block_location"`269270 - `cited_text: string`271272 The full text of the cited block range, concatenated.273274 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.275276 - `document_index: number`277278 minimum: 0279280 - `document_title: string or null`281282 maxLength: 500, minLength: 1283284 - `end_block_index: number`285286 Exclusive 0-based end index of the cited block range in the source's `content` array.287288 Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.289290 - `start_block_index: number`291292 0-based index of the first cited block in the source's `content` array.293294 minimum: 0295296 - `BetaCitationWebSearchResultLocationParam object`297298 - `type: "web_search_result_location"`299300 - `cited_text: string`301302 - `encrypted_index: string`303304 - `title: string or null`305306 maxLength: 512, minLength: 1307308 - `url: string`309310 minLength: 1311312 - `BetaCitationSearchResultLocationParam object`313314 - `type: "search_result_location"`315316 - `cited_text: string`317318 The full text of the cited block range, concatenated.319320 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.321322 - `end_block_index: number`323324 Exclusive 0-based end index of the cited block range in the source's `content` array.325326 Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.327328 - `search_result_index: number`329330 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.331332 Counted separately from `document_index`; server-side web search results are not included in this count.333334 minimum: 0335336 - `source: string`337338 - `start_block_index: number`339340 0-based index of the first cited block in the source's `content` array.341342 minimum: 0343344 - `title: string or null`345346 - `BetaImageBlockParam object`347348 - `type: "image"`349350 - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource`351352 - `BetaBase64ImageSource object`353354 - `type: "base64"`355356 - `data: string`357358 format: byte359360 - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"`361362 - `"image/jpeg"`363364 - `"image/png"`365366 - `"image/gif"`367368 - `"image/webp"`369370 - `BetaURLImageSource object`371372 - `type: "url"`373374 - `url: string`375376 - `BetaFileImageSource object`377378 - `type: "file"`379380 - `file_id: string`381382 - `cache_control: optional BetaCacheControlEphemeral or null`383384 Create a cache control breakpoint at this content block.385386 - `transformations: optional BetaImageTransformationsParam or null`387388 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.389390 - `oversized_image: optional "downsize" or "error"`391392 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.393394 - `"downsize"`395396 - `"error"`397398 - `BetaRequestDocumentBlock object`399400 - `type: "document"`401402 - `source: BetaBase64PDFSource or BetaPlainTextSource or BetaContentBlockSource or 2 more`403404 - `BetaBase64PDFSource object`405406 - `type: "base64"`407408 - `data: string`409410 format: byte411412 - `media_type: "application/pdf"`413414 - `BetaPlainTextSource object`415416 - `type: "text"`417418 - `data: string`419420 - `media_type: "text/plain"`421422 - `BetaContentBlockSource object`423424 - `type: "content"`425426 - `content: string or array of BetaContentBlockSourceContent`427428 - `string`429430 - `BetaContentBlockSourceContent = array of BetaContentBlockSourceContent`431432 - `BetaTextBlockParam object`433434 - `BetaImageBlockParam object`435436 - `BetaURLPDFSource object`437438 - `type: "url"`439440 - `url: string`441442 - `BetaFileDocumentSource object`443444 - `type: "file"`445446 - `file_id: string`447448 - `cache_control: optional BetaCacheControlEphemeral or null`449450 Create a cache control breakpoint at this content block.451452 - `citations: optional BetaCitationsConfigParam or null`453454 - `enabled: optional boolean`455456 - `context: optional string or null`457458 minLength: 1459460 - `title: optional string or null`461462 maxLength: 500, minLength: 1463464 - `BetaSearchResultBlockParam object`465466 - `type: "search_result"`467468 - `content: array of BetaTextBlockParam`469470 - `type: "text"`471472 - `text: string`473474 minLength: 1475476 - `cache_control: optional BetaCacheControlEphemeral or null`477478 Create a cache control breakpoint at this content block.479480 - `citations: optional array of BetaTextCitationParam or null`481482 - `source: string`483484 - `title: string`485486 - `cache_control: optional BetaCacheControlEphemeral or null`487488 Create a cache control breakpoint at this content block.489490 - `citations: optional BetaCitationsConfigParam`491492 - `BetaThinkingBlockParam object`493494 - `type: "thinking"`495496 - `signature: string`497498 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.499500 Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`.501502 - `thinking: string`503504 The `thinking` text of this block as returned by the API.505506 - `BetaRedactedThinkingBlockParam object`507508 - `type: "redacted_thinking"`509510 - `data: string`511512 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.513514 - `BetaToolUseBlockParam object`515516 - `type: "tool_use"`517518 - `id: string`519520 pattern: ^[a-zA-Z0-9_-]+$521522 - `input: map[unknown]`523524 - `name: string`525526 maxLength: 200, minLength: 1527528 - `cache_control: optional BetaCacheControlEphemeral or null`529530 Create a cache control breakpoint at this content block.531532 - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120`533534 - `BetaDirectCaller object`535536 Tool invocation directly from the model.537538 - `type: "direct"`539540 - `BetaServerToolCaller object`541542 Tool invocation generated by a server-side tool.543544 - `type: "code_execution_20250825"`545546 - `tool_id: string`547548 pattern: ^srvtoolu_[a-zA-Z0-9_]+$549550 - `BetaServerToolCaller20260120 object`551552 - `type: "code_execution_20260120"`553554 - `tool_id: string`555556 pattern: ^srvtoolu_[a-zA-Z0-9_]+$557558 - `toolset_name: optional string or null`559560 For a toolset member tool_use, the toolset family this member belongs to.561562 maxLength: 64, minLength: 1, pattern: ^[a-zA-Z0-9_-]+$563564 - `BetaToolResultBlockParam object`565566 - `type: "tool_result"`567568 - `tool_use_id: string`569570 pattern: ^[a-zA-Z0-9_-]+$571572 - `cache_control: optional BetaCacheControlEphemeral or null`573574 Create a cache control breakpoint at this content block.575576 - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more`577578 - `string`579580 - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more`581582 - `BetaTextBlockParam object`583584 - `BetaImageBlockParam object`585586 - `BetaSearchResultBlockParam object`587588 - `BetaRequestDocumentBlock object`589590 - `BetaToolReferenceBlockParam object`591592 Tool reference block that can be included in tool_result content.593594 - `type: "tool_reference"`595596 - `tool_name: string`597598 maxLength: 256, minLength: 1, pattern: ^[a-zA-Z0-9_-]{1,256}$599600 - `cache_control: optional BetaCacheControlEphemeral or null`601602 Create a cache control breakpoint at this content block.603604 - `BetaBrowserStateBlockParam object`605606 The caller's browser state after a browser toolset member call —607 the full inventory of open tabs, which tab is active, and any side608 effects (tabs opened, download state changes) the call produced.609610 At most one per `tool_result`, only on a non-error result answering a611 browser toolset member `tool_use`. The server renders the612 model-visible text from it; the model never sees the raw fields.613614 - `type: "browser_state"`615616 - `tabs: array of BetaBrowserStateTabEntry`617618 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`.619620 maxItems: 100621622 - `tab_id: string`623624 The caller-assigned identifier for this tab, unique within the inventory.625626 maxLength: 4096, minLength: 1, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$627628 - `title: string`629630 The title of the page the tab is showing. May be empty.631632 maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$633634 - `url: string`635636 The URL of the page the tab is showing. May be empty.637638 maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$639640 - `active: optional boolean`641642 Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`.643644 - `cache_control: optional BetaCacheControlEphemeral or null`645646 Create a cache control breakpoint at this content block.647648 - `state_changes: optional array of BetaBrowserStateChange or null`649650 Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list.651652 maxItems: 200, minItems: 1653654 - `BetaBrowserStateChangeTabOpened object`655656 A tab this call's execution opened that remains open at its end —657 the creation delta of the `tabs` inventory, not an event log.658659 Carries only the `tab_id`; the tab's `title` and `url` live on its660 `tabs` entry, which must include the same `tab_id`. A tab opened661 during a failed call gets no deferred `tab_opened`; it simply appears662 in the next result's `tabs` inventory.663664 - `type: "tab_opened"`665666 - `tab_id: string`667668 The `tab_id` of the opened tab, present in `tabs`.669670 maxLength: 4096, minLength: 1, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$671672 - `BetaBrowserStateChangeDownloadStarted object`673674 A file download that started during this call.675676 - `type: "download_started"`677678 - `download_id: string`679680 The caller-assigned identifier for this download, stable across the state changes reporting it.681682 maxLength: 4096, minLength: 1, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$683684 - `url: string`685686 The final post-redirect URL the download was served from.687688 maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$689690 - `BetaBrowserStateChangeDownloadCompleted object`691692 A file download that finished during this call, reported with the693 same `download_id` as its `download_started` — or without a prior694 `download_started`, when the download finished during the call that695 started it (at most one state change per `download_id` per result).696697 - `type: "download_completed"`698699 - `download_id: string`700701 The caller-assigned identifier for this download, stable across the state changes reporting it.702703 maxLength: 4096, minLength: 1, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$704705 - `url: string`706707 The final post-redirect URL the download was served from.708709 maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$710711 - `path: optional string or null`712713 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.714715 pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$, maxLength: 4096716717 - `size_bytes: optional number or null`718719 The completed download's size.720721 minimum: 0722723 - `BetaBrowserStateChangeDownloadFailed object`724725 A file download that failed — or was cancelled — during this call.726727 - `type: "download_failed"`728729 - `download_id: string`730731 The caller-assigned identifier for this download, stable across the state changes reporting it.732733 maxLength: 4096, minLength: 1, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$734735 - `url: string`736737 The final post-redirect URL the download was served from.738739 maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$740741 - `error: optional string or null`742743 The failure or cancellation detail, when known.744745 pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$, maxLength: 4096746747 - `is_error: optional boolean`748749 - `toolset_name: optional string or null`750751 For a toolset member tool_result, the toolset family of the paired tool_use.752753 maxLength: 64, minLength: 1, pattern: ^[a-zA-Z0-9_-]+$754755 - `BetaServerToolUseBlockParam object`756757 - `type: "server_tool_use"`758759 - `id: string`760761 pattern: ^srvtoolu_[a-zA-Z0-9_]+$762763 - `input: map[unknown]`764765 - `name: "advisor" or "web_search" or "web_fetch" or 5 more`766767 - `"advisor"`768769 - `"web_search"`770771 - `"web_fetch"`772773 - `"code_execution"`774775 - `"bash_code_execution"`776777 - `"text_editor_code_execution"`778779 - `"tool_search_tool_regex"`780781 - `"tool_search_tool_bm25"`782783 - `cache_control: optional BetaCacheControlEphemeral or null`784785 Create a cache control breakpoint at this content block.786787 - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120`788789 - `BetaDirectCaller object`790791 Tool invocation directly from the model.792793 - `BetaServerToolCaller object`794795 Tool invocation generated by a server-side tool.796797 - `BetaServerToolCaller20260120 object`798799 - `BetaWebSearchToolResultBlockParam object`800801 - `type: "web_search_tool_result"`802803 - `content: BetaWebSearchToolResultBlockParamContent`804805 - `ResultBlock = array of BetaWebSearchResultBlockParam`806807 - `type: "web_search_result"`808809 - `encrypted_content: string`810811 - `title: string`812813 - `url: string`814815 - `page_age: optional string or null`816817 - `BetaWebSearchToolRequestError object`818819 - `type: "web_search_tool_result_error"`820821 - `error_code: BetaWebSearchToolResultErrorCode`822823 - `"invalid_tool_input"`824825 - `"unavailable"`826827 - `"max_uses_exceeded"`828829 - `"too_many_requests"`830831 - `"query_too_long"`832833 - `"request_too_large"`834835 - `tool_use_id: string`836837 pattern: ^srvtoolu_[a-zA-Z0-9_]+$838839 - `cache_control: optional BetaCacheControlEphemeral or null`840841 Create a cache control breakpoint at this content block.842843 - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120`844845 - `BetaDirectCaller object`846847 Tool invocation directly from the model.848849 - `BetaServerToolCaller object`850851 Tool invocation generated by a server-side tool.852853 - `BetaServerToolCaller20260120 object`854855 - `BetaWebFetchToolResultBlockParam object`856857 - `type: "web_fetch_tool_result"`858859 - `content: BetaWebFetchToolResultErrorBlockParam or BetaWebFetchBlockParam`860861 - `BetaWebFetchToolResultErrorBlockParam object`862863 - `type: "web_fetch_tool_result_error"`864865 - `error_code: BetaWebFetchToolResultErrorCode`866867 - `"invalid_tool_input"`868869 - `"url_too_long"`870871 - `"url_not_allowed"`872873 - `"url_not_in_prior_context"`874875 - `"url_not_accessible"`876877 - `"unsupported_content_type"`878879 - `"too_many_requests"`880881 - `"max_uses_exceeded"`882883 - `"unavailable"`884885 - `"content_too_large"`886887 - `BetaWebFetchBlockParam object`888889 - `type: "web_fetch_result"`890891 - `content: BetaRequestDocumentBlock`892893 - `url: string`894895 Fetched content URL896897 - `retrieved_at: optional string or null`898899 ISO 8601 timestamp when the content was retrieved900901 - `tool_use_id: string`902903 pattern: ^srvtoolu_[a-zA-Z0-9_]+$904905 - `cache_control: optional BetaCacheControlEphemeral or null`906907 Create a cache control breakpoint at this content block.908909 - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120`910911 - `BetaDirectCaller object`912913 Tool invocation directly from the model.914915 - `BetaServerToolCaller object`916917 Tool invocation generated by a server-side tool.918919 - `BetaServerToolCaller20260120 object`920921 - `BetaAdvisorToolResultBlockParam object`922923 - `type: "advisor_tool_result"`924925 - `content: BetaAdvisorToolResultErrorParam or BetaAdvisorResultBlockParam or BetaAdvisorRedactedResultBlockParam`926927 - `BetaAdvisorToolResultErrorParam object`928929 - `type: "advisor_tool_result_error"`930931 - `error_code: "max_uses_exceeded" or "prompt_too_long" or "too_many_requests" or 4 more`932933 - `"max_uses_exceeded"`934935 - `"prompt_too_long"`936937 - `"too_many_requests"`938939 - `"overloaded"`940941 - `"unavailable"`942943 - `"execution_time_exceeded"`944945 - `"model_not_found"`946947 - `BetaAdvisorResultBlockParam object`948949 - `type: "advisor_result"`950951 - `text: string`952953 - `stop_reason: optional string or null`954955 - `BetaAdvisorRedactedResultBlockParam object`956957 - `type: "advisor_redacted_result"`958959 - `encrypted_content: string`960961 Opaque blob produced by a prior response; must be round-tripped verbatim.962963 - `stop_reason: optional string or null`964965 - `tool_use_id: string`966967 pattern: ^srvtoolu_[a-zA-Z0-9_]+$968969 - `cache_control: optional BetaCacheControlEphemeral or null`970971 Create a cache control breakpoint at this content block.972973 - `BetaCodeExecutionToolResultBlockParam object`974975 - `type: "code_execution_tool_result"`976977 - `content: BetaCodeExecutionToolResultBlockParamContent`978979 - `BetaCodeExecutionToolResultErrorParam object`980981 - `type: "code_execution_tool_result_error"`982983 - `error_code: BetaCodeExecutionToolResultErrorCode`984985 - `"invalid_tool_input"`986987 - `"unavailable"`988989 - `"too_many_requests"`990991 - `"execution_time_exceeded"`992993 - `BetaCodeExecutionResultBlockParam object`994995 - `type: "code_execution_result"`996997 - `content: array of BetaCodeExecutionOutputBlockParam`998999 - `type: "code_execution_output"`10001001 - `file_id: string`10021003 - `return_code: number`10041005 - `stderr: string`10061007 - `stdout: string`10081009 - `BetaEncryptedCodeExecutionResultBlockParam object`10101011 Code execution result with encrypted stdout for PFC + web_search results.10121013 - `type: "encrypted_code_execution_result"`10141015 - `content: array of BetaCodeExecutionOutputBlockParam`10161017 - `type: "code_execution_output"`10181019 - `file_id: string`10201021 - `encrypted_stdout: string`10221023 - `return_code: number`10241025 - `stderr: string`10261027 - `tool_use_id: string`10281029 pattern: ^srvtoolu_[a-zA-Z0-9_]+$10301031 - `cache_control: optional BetaCacheControlEphemeral or null`10321033 Create a cache control breakpoint at this content block.10341035 - `BetaBashCodeExecutionToolResultBlockParam object`10361037 - `type: "bash_code_execution_tool_result"`10381039 - `content: BetaBashCodeExecutionToolResultErrorParam or BetaBashCodeExecutionResultBlockParam`10401041 - `BetaBashCodeExecutionToolResultErrorParam object`10421043 - `type: "bash_code_execution_tool_result_error"`10441045 - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more`10461047 - `"invalid_tool_input"`10481049 - `"unavailable"`10501051 - `"too_many_requests"`10521053 - `"execution_time_exceeded"`10541055 - `"output_file_too_large"`10561057 - `BetaBashCodeExecutionResultBlockParam object`10581059 - `type: "bash_code_execution_result"`10601061 - `content: array of BetaBashCodeExecutionOutputBlockParam`10621063 - `type: "bash_code_execution_output"`10641065 - `file_id: string`10661067 - `return_code: number`10681069 - `stderr: string`10701071 - `stdout: string`10721073 - `tool_use_id: string`10741075 pattern: ^srvtoolu_[a-zA-Z0-9_]+$10761077 - `cache_control: optional BetaCacheControlEphemeral or null`10781079 Create a cache control breakpoint at this content block.10801081 - `BetaTextEditorCodeExecutionToolResultBlockParam object`10821083 - `type: "text_editor_code_execution_tool_result"`10841085 - `content: BetaTextEditorCodeExecutionToolResultErrorParam or BetaTextEditorCodeExecutionViewResultBlockParam or BetaTextEditorCodeExecutionCreateResultBlockParam or BetaTextEditorCodeExecutionStrReplaceResultBlockParam`10861087 - `BetaTextEditorCodeExecutionToolResultErrorParam object`10881089 - `type: "text_editor_code_execution_tool_result_error"`10901091 - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more`10921093 - `"invalid_tool_input"`10941095 - `"unavailable"`10961097 - `"too_many_requests"`10981099 - `"execution_time_exceeded"`11001101 - `"file_not_found"`11021103 - `error_message: optional string or null`11041105 - `BetaTextEditorCodeExecutionViewResultBlockParam object`11061107 - `type: "text_editor_code_execution_view_result"`11081109 - `content: string`11101111 - `file_type: "text" or "image" or "pdf"`11121113 - `"text"`11141115 - `"image"`11161117 - `"pdf"`11181119 - `num_lines: optional number or null`11201121 - `start_line: optional number or null`11221123 - `total_lines: optional number or null`11241125 - `BetaTextEditorCodeExecutionCreateResultBlockParam object`11261127 - `type: "text_editor_code_execution_create_result"`11281129 - `is_file_update: boolean`11301131 - `BetaTextEditorCodeExecutionStrReplaceResultBlockParam object`11321133 - `type: "text_editor_code_execution_str_replace_result"`11341135 - `lines: optional array of string or null`11361137 - `new_lines: optional number or null`11381139 - `new_start: optional number or null`11401141 - `old_lines: optional number or null`11421143 - `old_start: optional number or null`11441145 - `tool_use_id: string`11461147 pattern: ^srvtoolu_[a-zA-Z0-9_]+$11481149 - `cache_control: optional BetaCacheControlEphemeral or null`11501151 Create a cache control breakpoint at this content block.11521153 - `BetaToolSearchToolResultBlockParam object`11541155 - `type: "tool_search_tool_result"`11561157 - `content: BetaToolSearchToolResultErrorParam or BetaToolSearchToolSearchResultBlockParam`11581159 - `BetaToolSearchToolResultErrorParam object`11601161 - `type: "tool_search_tool_result_error"`11621163 - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"`11641165 - `"invalid_tool_input"`11661167 - `"unavailable"`11681169 - `"too_many_requests"`11701171 - `"execution_time_exceeded"`11721173 - `error_message: optional string or null`11741175 - `BetaToolSearchToolSearchResultBlockParam object`11761177 - `type: "tool_search_tool_search_result"`11781179 - `tool_references: array of BetaToolReferenceBlockParam`11801181 - `type: "tool_reference"`11821183 - `tool_name: string`11841185 maxLength: 256, minLength: 1, pattern: ^[a-zA-Z0-9_-]{1,256}$11861187 - `cache_control: optional BetaCacheControlEphemeral or null`11881189 Create a cache control breakpoint at this content block.11901191 - `tool_use_id: string`11921193 pattern: ^srvtoolu_[a-zA-Z0-9_]+$11941195 - `cache_control: optional BetaCacheControlEphemeral or null`11961197 Create a cache control breakpoint at this content block.11981199 - `BetaMCPToolUseBlockParam object`12001201 - `type: "mcp_tool_use"`12021203 - `id: string`12041205 pattern: ^[a-zA-Z0-9_-]+$12061207 - `input: map[unknown]`12081209 - `name: string`12101211 - `server_name: string`12121213 The name of the MCP server12141215 - `cache_control: optional BetaCacheControlEphemeral or null`12161217 Create a cache control breakpoint at this content block.12181219 - `BetaRequestMCPToolResultBlockParam object`12201221 - `type: "mcp_tool_result"`12221223 - `tool_use_id: string`12241225 pattern: ^[a-zA-Z0-9_-]+$12261227 - `cache_control: optional BetaCacheControlEphemeral or null`12281229 Create a cache control breakpoint at this content block.12301231 - `content: optional string or array of BetaTextBlockParam`12321233 - `string`12341235 - `BetaMCPToolResultBlockParamContent = array of BetaTextBlockParam`12361237 - `type: "text"`12381239 - `text: string`12401241 minLength: 112421243 - `cache_control: optional BetaCacheControlEphemeral or null`12441245 Create a cache control breakpoint at this content block.12461247 - `citations: optional array of BetaTextCitationParam or null`12481249 - `is_error: optional boolean`12501251 - `BetaContainerUploadBlockParam object`12521253 A content block that represents a file to be uploaded to the container1254 Files uploaded via this block will be available in the container's input directory.12551256 - `type: "container_upload"`12571258 - `file_id: string`12591260 - `cache_control: optional BetaCacheControlEphemeral or null`12611262 Create a cache control breakpoint at this content block.12631264 - `BetaCompactionBlockParam object`12651266 A compaction block containing summary of previous context.12671268 Users should round-trip these blocks from responses to subsequent requests1269 to maintain context across compaction boundaries.12701271 When content is None, the block represents a failed compaction. The server1272 treats these as no-ops. Empty string content is not allowed.12731274 - `type: "compaction"`12751276 - `cache_control: optional BetaCacheControlEphemeral or null`12771278 Create a cache control breakpoint at this content block.12791280 - `content: optional string or null`12811282 Summary of previously compacted content, or null if compaction failed12831284 - `encrypted_content: optional string or null`12851286 Opaque metadata from prior compaction, to be round-tripped verbatim12871288 - `signature: optional string or null`12891290 The block's signature as returned, to be sent back verbatim12911292 - `BetaRequestToolAdditionBlock object`12931294 Mid-conversation directive to surface a declared tool.12951296 `tool` references a tool (or MCP toolset) by name from the request's1297 `tools`; it is offered to the model from this point in the1298 conversation onward.12991300 - `type: "tool_addition"`13011302 - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference`13031304 - `BetaToolChangeToolReference object`13051306 Reference to a single tool the caller declared directly in1307 `tools[]`. Does not accept the composed `{server}_{name}` form the1308 server assigns to MCP-resolved tools — use `mcp_tool_reference` or1309 `mcp_toolset_reference` for those.13101311 - `type: "tool_reference"`13121313 - `name: string`13141315 pattern: ^[a-zA-Z0-9_-]{1,128}$13161317 - `BetaToolChangeMCPToolReference object`13181319 Reference to a single MCP tool by its server and remote name; the1320 same `server_name`/`name` pair `mcp_tool_use` carries.13211322 - `type: "mcp_tool_reference"`13231324 - `name: string`13251326 - `server_name: string`13271328 - `BetaToolChangeMCPToolsetReference object`13291330 Reference to every tool in the named MCP server's toolset.13311332 - `type: "mcp_toolset_reference"`13331334 - `server_name: string`13351336 - `cache_control: optional BetaCacheControlEphemeral or null`13371338 Create a cache control breakpoint at this content block.13391340 - `BetaRequestToolRemovalBlock object`13411342 Mid-conversation directive to withdraw a tool.13431344 `tool` references a tool (or MCP toolset) by name from the request's1345 `tools`; it is no longer offered to the model from this point in the1346 conversation onward.13471348 - `type: "tool_removal"`13491350 - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference`13511352 - `BetaToolChangeToolReference object`13531354 Reference to a single tool the caller declared directly in1355 `tools[]`. Does not accept the composed `{server}_{name}` form the1356 server assigns to MCP-resolved tools — use `mcp_tool_reference` or1357 `mcp_toolset_reference` for those.13581359 - `BetaToolChangeMCPToolReference object`13601361 Reference to a single MCP tool by its server and remote name; the1362 same `server_name`/`name` pair `mcp_tool_use` carries.13631364 - `BetaToolChangeMCPToolsetReference object`13651366 Reference to every tool in the named MCP server's toolset.13671368 - `cache_control: optional BetaCacheControlEphemeral or null`13691370 Create a cache control breakpoint at this content block.13711372 - `BetaFallbackBlockParam object`13731374 A `fallback` block echoed back from a prior response.13751376 Accepted in `messages[].content` and not rendered into the prompt; not1377 validated against the request's `fallbacks` chain or top-level `model`.13781379 Echo the assistant turn back verbatim, including this block in its1380 original position. The block marks the boundary between content produced1381 before and after a fallback hop, and the server relies on that boundary1382 to validate the turn: when thinking runs flank the boundary, omitting1383 the block merges them into one span the server cannot validate (the1384 request is rejected), and moving it into the middle of a single run is1385 likewise rejected; between non-thinking blocks the block's placement has1386 no validation effect.13871388 - `type: "fallback"`13891390 - `from: BetaFallbackInfoParam`13911392 Identifies one hop of a fallback transition.13931394 - `model: Model`13951396 The model that will complete your prompt.13971398 See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.13991400 - `"claude-fable-5-1" or "claude-mythos-5-1" or "claude-sonnet-5" or 14 more`14011402 The model that will complete your prompt.14031404 See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.14051406 - `"claude-fable-5-1"`14071408 Frontier intelligence for ambitious tasks across coding, scientific discovery, and enterprise workflows14091410 - `"claude-mythos-5-1"`14111412 Our most capable model for cybersecurity and biology research, available through trusted access programs14131414 - `"claude-sonnet-5"`14151416 High-performance model for coding and agents14171418 - `"claude-fable-5"`14191420 Next generation of intelligence for the hardest knowledge work and coding problems14211422 - `"claude-mythos-5"`14231424 Most capable model for cybersecurity and biology research14251426 - `"claude-opus-5"`14271428 Powerful intelligence for long-running agents and coding14291430 - `"claude-opus-4-8"`14311432 Powerful intelligence for long-running agents and coding14331434 - `"claude-opus-4-7"`14351436 Powerful intelligence for long-running agents and coding14371438 - `"claude-mythos-preview"`14391440 New class of intelligence, strongest in coding and cybersecurity14411442 - `"claude-opus-4-6"`14431444 Powerful intelligence for long-running agents and coding14451446 - `"claude-sonnet-4-6"`14471448 Best combination of speed and intelligence14491450 - `"claude-haiku-4-5"`14511452 Fastest model with near-frontier intelligence14531454 - `"claude-haiku-4-5-20251001"`14551456 Fastest model with near-frontier intelligence14571458 - `"claude-opus-4-5"`14591460 Powerful intelligence for long-running agents and coding14611462 - `"claude-opus-4-5-20251101"`14631464 Powerful intelligence for long-running agents and coding14651466 - `"claude-sonnet-4-5"`14671468 High-performance model for agents and coding14691470 - `"claude-sonnet-4-5-20250929"`14711472 High-performance model for agents and coding14731474 - `string`14751476 - `to: BetaFallbackInfoParam`14771478 Identifies one hop of a fallback transition.14791480 - `trigger: optional unknown`14811482 The response block's `trigger`, echoed verbatim. Accepted and ignored by the server; any object or `null` is allowed.14831484 - `role: "user" or "assistant" or "system"`14851486 - `"user"`14871488 - `"assistant"`14891490 - `"system"`14911492 - `clear_at: optional "next_user_message" or "never" or null`14931494 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.14951496 - `"next_user_message"`14971498 - `"never"`14991500 - `output_config: optional BetaSystemMessageOutputConfig or null`15011502 Per-message output configuration on a role:"system" input message.15031504 Fields here apply per-turn; `format` remains top-level only. An1505 empty `{}` is accepted on a message that carries content; a message1506 with neither content nor output_config fields is rejected.15071508 - `effort: optional "low" or "medium" or "high" or 2 more or null`15091510 All possible effort levels.15111512 - `"low"`15131514 - `"medium"`15151516 - `"high"`15171518 - `"xhigh"`15191520 - `"max"`15211522- `model: Model`15231524 The model that will complete your prompt.15251526 See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.15271528- `cache_control: optional BetaCacheControlEphemeral or null`15291530 Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request.15311532- `compaction: optional BetaCompactionConfig or null`15331534 Compact the whole conversation and return a signed `compaction` block,1535 alone, that a later request sends back first in `messages`, in place of1536 the messages it summarizes. There is no trigger and no pause flag: sending1537 the parameter compacts, and nothing is sampled after the block.15381539 The summarization prompt is the server's own unless `instructions` are1540 given, which then replace it for this request; a value that is empty or1541 only whitespace counts as absent.15421543 - `type: "summarize"`15441545 - `instructions: optional string or null`15461547 Replaces the server's default summarization prompt for this request. An empty or whitespace-only value counts as absent.15481549 maxLength: 1638415501551- `container: optional BetaContainerParams or string or null`15521553 Container identifier for reuse across requests.15541555 - `BetaContainerParams object`15561557 Container parameters with skills to be loaded.15581559 - `id: optional string or null`15601561 Container id15621563 - `skills: optional array of BetaSkillParams or null`15641565 List of skills to load in the container15661567 maxItems: 2015681569 - `type: "anthropic" or "custom"`15701571 Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)15721573 - `"anthropic"`15741575 - `"custom"`15761577 - `skill_id: string`15781579 Skill ID15801581 maxLength: 64, minLength: 115821583 - `version: optional string`15841585 Skill version or 'latest' for most recent version15861587 maxLength: 64, minLength: 115881589 - `string`15901591- `context_management: optional BetaContextManagementConfig or null`15921593 Context management configuration.15941595 This allows you to control how Claude manages context across multiple requests, such as whether to clear function results or not.15961597 - `edits: optional array of BetaClearToolUses20250919Edit or BetaClearThinking20251015Edit or BetaCompact20260112Edit`15981599 List of context management edits to apply16001601 minItems: 016021603 - `BetaClearToolUses20250919Edit object`16041605 - `type: "clear_tool_uses_20250919"`16061607 - `clear_at_least: optional BetaInputTokensClearAtLeast or null`16081609 Minimum number of tokens that must be cleared when triggered. Context will only be modified if at least this many tokens can be removed.16101611 - `type: "input_tokens"`16121613 - `value: number`16141615 minimum: 016161617 - `clear_tool_inputs: optional boolean or array of string or null`16181619 Whether to clear all tool inputs (bool) or specific tool inputs to clear (list)16201621 - `boolean`16221623 - `array of string`16241625 - `exclude_tools: optional array of string or null`16261627 Tool names whose uses are preserved from clearing16281629 - `keep: optional BetaToolUsesKeep`16301631 Number of tool uses to retain in the conversation16321633 - `type: "tool_uses"`16341635 - `value: number`16361637 minimum: 016381639 - `trigger: optional BetaInputTokensTrigger or BetaToolUsesTrigger`16401641 Condition that triggers the context management strategy16421643 - `BetaInputTokensTrigger object`16441645 - `type: "input_tokens"`16461647 - `value: number`16481649 minimum: 116501651 - `BetaToolUsesTrigger object`16521653 - `type: "tool_uses"`16541655 - `value: number`16561657 minimum: 116581659 - `BetaClearThinking20251015Edit object`16601661 - `type: "clear_thinking_20251015"`16621663 - `keep: optional BetaThinkingTurns or BetaAllThinkingTurns or "all"`16641665 Number of most recent assistant turns to keep thinking blocks for. Older turns will have their thinking blocks removed.16661667 - `BetaThinkingTurns object`16681669 - `type: "thinking_turns"`16701671 - `value: number`16721673 minimum: 116741675 - `BetaAllThinkingTurns object`16761677 - `type: "all"`16781679 - `"all"`16801681 - `BetaCompact20260112Edit object`16821683 Automatically compact older context when reaching the configured trigger threshold.16841685 - `type: "compact_20260112"`16861687 - `instructions: optional string or null`16881689 Additional instructions for summarization.16901691 - `pause_after_compaction: optional boolean`16921693 Whether to pause after compaction and return the compaction block to the user.16941695 - `trigger: optional BetaInputTokensTrigger or null`16961697 When to trigger compaction. Defaults to 150000 input tokens.16981699- `diagnostics: optional BetaDiagnosticsParam or null`17001701 Request-level diagnostics. Currently carries the previous response1702 id for prompt-cache divergence reporting.17031704 - `previous_message_id: optional string or null`17051706 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.17071708 maxLength: 25617091710- `fallback_credit_token: optional string or BetaFallbackCreditTokenParam or null`17111712 The `fallback_credit_token` from a prior refusal's `stop_details`.17131714 When a preceding request was refused and returned a `fallback_credit_token`,1715 pass that code here on the retry to have the retry's cache-creation tokens1716 for the prefix that was warm on the refused model billed at the cache-read1717 rate. Must be redeemed by the same organization and workspace, with the same1718 request body (optionally extended by one appended `assistant` message whose1719 content is the partial text — with any trailing whitespace stripped from1720 the final text block — and paired server-tool blocks streamed before the1721 refusal; the appended-assistant form is not available for requests with1722 `output_format` set or forced `tool_choice`), on an eligible fallback1723 model, on the same platform,1724 and within 5 minutes of the refusal; a mismatch is a 400. A token minted1725 mid-server-tool-loop whose partial content was continuable may only be1726 redeemed with the appended-assistant form — if an exact-body retry is1727 rejected with a 400 saying the token must be redeemed by continuing the1728 partial response, retry with the appended-assistant form instead.17291730 When the appended-assistant form is used on a model that otherwise disallows1731 assistant-turn prefill, this token also authorizes that one prefill.17321733 - `string`17341735 - `BetaFallbackCreditTokenParam object`17361737 Object form of `fallback_credit_token`: the token plus a redemption1738 mode.17391740 Requires `anthropic-beta: fallback-credit-2026-07-01`; without that1741 header the field accepts the bare string only. The bare string and the1742 mode-less object are equivalent (both select `strict`), so wrapping1743 an existing token changes nothing by itself.17441745 - `token: string`17461747 The opaque `fallback_credit_token` from a prior refusal's `stop_details` — the same string the bare-string form carries.17481749 maxLength: 2048, minLength: 117501751 - `mode: optional "strict" or "best_effort"`17521753 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`.17541755 - `"strict"`17561757 - `"best_effort"`17581759- `fallbacks: optional BetaFallbacksParam or null`17601761 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.17621763 - `array of BetaFallbackParam`17641765 - `model: Model`17661767 The model that will complete your prompt.17681769 See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.17701771 - `max_tokens: optional number or null`17721773 - `output_config: optional BetaOutputConfig or null`17741775 - `effort: optional "low" or "medium" or "high" or 2 more or null`17761777 All possible effort levels.17781779 - `"low"`17801781 - `"medium"`17821783 - `"high"`17841785 - `"xhigh"`17861787 - `"max"`17881789 - `format: optional BetaJSONOutputFormat or null`17901791 A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)17921793 - `type: "json_schema"`17941795 - `schema: map[unknown]`17961797 The JSON schema of the format17981799 - `task_budget: optional BetaTokenTaskBudget or null`18001801 User-configurable total token budget across contexts.18021803 - `type: "tokens"`18041805 The budget type. Currently only 'tokens' is supported.18061807 - `total: number`18081809 Total token budget across all contexts in the session.18101811 minimum: 102418121813 - `remaining: optional number or null`18141815 Remaining tokens in the budget. Use this to track usage across contexts when implementing compaction client-side. Defaults to total if not provided.18161817 minimum: 018181819 - `speed: optional "standard" or "fast" or null`18201821 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.18221823 - `"standard"`18241825 - `"fast"`18261827 - `thinking: optional BetaThinkingConfigEnabled or BetaThinkingConfigDisabled or BetaThinkingConfigAdaptive or null`18281829 - `BetaThinkingConfigEnabled object`18301831 - `type: "enabled"`18321833 - `budget_tokens: number`18341835 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.18361837 Must be ≥1024 and less than `max_tokens`.18381839 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details.18401841 minimum: 102418421843 - `block_binding: optional BetaThinkingBlockBinding or null`18441845 Controls for block binding: what happens when a thinking block this1846 request sends back fails the conversation check. Every field is optional;1847 an empty object means every default.18481849 - `prefix_mismatch_behavior: optional BetaThinkingPrefixMismatchBehavior or null`18501851 What happens when a thinking block in `messages` fails the conversation1852 check: it was created in a different conversation, or the messages before1853 it have changed since. `"error"` (the default) fails the request with a1854 400 error. `"drop_block"` removes the failing blocks and the request1855 proceeds; the model no longer sees the dropped reasoning.18561857 - `"error"`18581859 - `"drop_block"`18601861 - `display: optional "summarized" or "omitted" or "updates" or null`18621863 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`.18641865 - `"summarized"`18661867 - `"omitted"`18681869 - `"updates"`18701871 - `BetaThinkingConfigDisabled object`18721873 - `type: "disabled"`18741875 - `BetaThinkingConfigAdaptive object`18761877 - `type: "adaptive"`18781879 - `block_binding: optional BetaThinkingBlockBinding or null`18801881 Controls for block binding: what happens when a thinking block this1882 request sends back fails the conversation check. Every field is optional;1883 an empty object means every default.18841885 - `display: optional "summarized" or "omitted" or "updates" or null`18861887 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`.18881889 - `"summarized"`18901891 - `"omitted"`18921893 - `"updates"`18941895 - `Default = "default"`18961897- `inference_geo: optional string or null`18981899 Specifies the geographic region for inference processing. If not specified, the workspace's `default_inference_geo` is used.19001901- `mcp_servers: optional array of BetaRequestMCPServerURLDefinition`19021903 MCP servers to be utilized in this request19041905 maxItems: 2019061907 - `type: "url"`19081909 - `name: string`19101911 - `url: string`19121913 - `authorization_token: optional string or null`19141915 - `tool_configuration: optional BetaRequestMCPServerToolConfiguration or null`19161917 - `allowed_tools: optional array of string or null`19181919 - `enabled: optional boolean or null`19201921- `metadata: optional BetaMetadata`19221923 An object describing metadata about the request.19241925 - `user_id: optional string or null`19261927 An external identifier for the user who is associated with the request.19281929 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.19301931 maxLength: 51219321933- `output_config: optional BetaOutputConfig`19341935 Configuration options for the model's output, such as the output format.19361937- `service_tier: optional "auto" or "standard_only"`19381939 Determines whether to use priority capacity (if available) or standard capacity for this request.19401941 Anthropic offers different levels of service for your API requests. See [service-tiers](https://platform.claude.com/docs/en/api/service-tiers) for details.19421943 - `"auto"`19441945 - `"standard_only"`19461947- `speed: optional "standard" or "fast" or null`19481949 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.19501951 - `"standard"`19521953 - `"fast"`19541955- `stop_sequences: optional array of string`19561957 Custom text sequences that will cause the model to stop generating.19581959 Our models will normally stop when they have naturally completed their turn, which will result in a response `stop_reason` of `"end_turn"`.19601961 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.19621963- `stream: optional boolean`19641965 Whether to incrementally stream the response using server-sent events.19661967 See [streaming](https://platform.claude.com/docs/en/build-with-claude/streaming) for details.19681969- `system: optional string or array of BetaTextBlockParam`19701971 System prompt.19721973 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).19741975 - `string`19761977 - `array of BetaTextBlockParam`19781979 - `type: "text"`19801981 - `text: string`19821983 minLength: 119841985 - `cache_control: optional BetaCacheControlEphemeral or null`19861987 Create a cache control breakpoint at this content block.19881989 - `citations: optional array of BetaTextCitationParam or null`19901991- `thinking: optional BetaThinkingConfigParam`19921993 Configuration for enabling Claude's extended thinking.19941995 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.19961997 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details.19981999 - `BetaThinkingConfigEnabled object`20002001 - `BetaThinkingConfigDisabled object`20022003 - `BetaThinkingConfigAdaptive object`20042005- `tool_choice: optional BetaToolChoice`20062007 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.20082009 - `BetaToolChoiceAuto object`20102011 The model will automatically decide whether to use tools.20122013 - `type: "auto"`20142015 - `disable_parallel_tool_use: optional boolean`20162017 Whether to disable parallel tool use.20182019 Defaults to `false`. If set to `true`, the model will output at most one tool use.20202021 - `BetaToolChoiceAny object`20222023 The model will use any available tools.20242025 - `type: "any"`20262027 - `disable_parallel_tool_use: optional boolean`20282029 Whether to disable parallel tool use.20302031 Defaults to `false`. If set to `true`, the model will output exactly one tool use.20322033 - `BetaToolChoiceTool object`20342035 The model will use the specified tool with `tool_choice.name`.20362037 - `type: "tool"`20382039 - `name: string`20402041 The name of the tool to use.20422043 - `disable_parallel_tool_use: optional boolean`20442045 Whether to disable parallel tool use.20462047 Defaults to `false`. If set to `true`, the model will output exactly one tool use.20482049 - `BetaToolChoiceNone object`20502051 The model will not be allowed to use tools.20522053 - `type: "none"`20542055- `tools: optional array of BetaToolUnion`20562057 Definitions of tools that the model may use.20582059 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.20602061 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)).20622063 Each tool definition includes:20642065 * `name`: Name of the tool.2066 * `description`: Optional, but strongly-recommended description of the tool.2067 * `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.20682069 For example, if you defined `tools` as:20702071 ```json2072 [2073 {2074 "name": "get_stock_price",2075 "description": "Get the current stock price for a given ticker symbol.",2076 "input_schema": {2077 "type": "object",2078 "properties": {2079 "ticker": {2080 "type": "string",2081 "description": "The stock ticker symbol, e.g. AAPL for Apple Inc."2082 }2083 },2084 "required": ["ticker"]2085 }2086 }2087 ]2088 ```20892090 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:20912092 ```json2093 [2094 {2095 "type": "tool_use",2096 "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",2097 "name": "get_stock_price",2098 "input": { "ticker": "^GSPC" }2099 }2100 ]2101 ```21022103 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:21042105 ```json2106 [2107 {2108 "type": "tool_result",2109 "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",2110 "content": "259.75 USD"2111 }2112 ]2113 ```21142115 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.21162117 See our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) for more details.21182119 - `BetaTool object`21202121 - `type: optional "custom" or null`21222123 - `input_schema: object`21242125 [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.21262127 This defines the shape of the `input` that your tool accepts and that the model will produce.21282129 - `type: "object"`21302131 - `properties: optional map[unknown] or null`21322133 - `required: optional array of string or null`21342135 - `name: string`21362137 Name of the tool.21382139 This is how the tool will be called by the model and in `tool_use` blocks.21402141 maxLength: 128, minLength: 1, pattern: ^[a-zA-Z0-9_-]{1,128}$21422143 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`21442145 - `"direct"`21462147 - `"code_execution_20250825"`21482149 - `"code_execution_20260120"`21502151 - `"code_execution_20260521"`21522153 - `cache_control: optional BetaCacheControlEphemeral or null`21542155 Create a cache control breakpoint at this content block.21562157 - `defer_loading: optional boolean`21582159 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.21602161 - `description: optional string`21622163 Description of what this tool does.21642165 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.21662167 - `eager_input_streaming: optional boolean or null`21682169 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.21702171 - `input_examples: optional array of map[unknown]`21722173 - `strict: optional boolean`21742175 When true, guarantees schema validation on tool names and inputs21762177 - `BetaToolBash20241022 object`21782179 - `type: "bash_20241022"`21802181 - `name: "bash"`21822183 Name of the tool.21842185 This is how the tool will be called by the model and in `tool_use` blocks.21862187 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`21882189 - `"direct"`21902191 - `"code_execution_20250825"`21922193 - `"code_execution_20260120"`21942195 - `"code_execution_20260521"`21962197 - `cache_control: optional BetaCacheControlEphemeral or null`21982199 Create a cache control breakpoint at this content block.22002201 - `defer_loading: optional boolean`22022203 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.22042205 - `input_examples: optional array of map[unknown]`22062207 - `strict: optional boolean`22082209 When true, guarantees schema validation on tool names and inputs22102211 - `BetaToolBash20250124 object`22122213 - `type: "bash_20250124"`22142215 - `name: "bash"`22162217 Name of the tool.22182219 This is how the tool will be called by the model and in `tool_use` blocks.22202221 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`22222223 - `"direct"`22242225 - `"code_execution_20250825"`22262227 - `"code_execution_20260120"`22282229 - `"code_execution_20260521"`22302231 - `cache_control: optional BetaCacheControlEphemeral or null`22322233 Create a cache control breakpoint at this content block.22342235 - `defer_loading: optional boolean`22362237 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.22382239 - `input_examples: optional array of map[unknown]`22402241 - `strict: optional boolean`22422243 When true, guarantees schema validation on tool names and inputs22442245 - `BetaCodeExecutionTool20250522 object`22462247 - `type: "code_execution_20250522"`22482249 - `name: "code_execution"`22502251 Name of the tool.22522253 This is how the tool will be called by the model and in `tool_use` blocks.22542255 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`22562257 - `"direct"`22582259 - `"code_execution_20250825"`22602261 - `"code_execution_20260120"`22622263 - `"code_execution_20260521"`22642265 - `cache_control: optional BetaCacheControlEphemeral or null`22662267 Create a cache control breakpoint at this content block.22682269 - `defer_loading: optional boolean`22702271 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.22722273 - `strict: optional boolean`22742275 When true, guarantees schema validation on tool names and inputs22762277 - `BetaCodeExecutionTool20250825 object`22782279 - `type: "code_execution_20250825"`22802281 - `name: "code_execution"`22822283 Name of the tool.22842285 This is how the tool will be called by the model and in `tool_use` blocks.22862287 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`22882289 - `"direct"`22902291 - `"code_execution_20250825"`22922293 - `"code_execution_20260120"`22942295 - `"code_execution_20260521"`22962297 - `cache_control: optional BetaCacheControlEphemeral or null`22982299 Create a cache control breakpoint at this content block.23002301 - `defer_loading: optional boolean`23022303 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.23042305 - `strict: optional boolean`23062307 When true, guarantees schema validation on tool names and inputs23082309 - `BetaCodeExecutionTool20260120 object`23102311 Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint).23122313 - `type: "code_execution_20260120"`23142315 - `name: "code_execution"`23162317 Name of the tool.23182319 This is how the tool will be called by the model and in `tool_use` blocks.23202321 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`23222323 - `"direct"`23242325 - `"code_execution_20250825"`23262327 - `"code_execution_20260120"`23282329 - `"code_execution_20260521"`23302331 - `cache_control: optional BetaCacheControlEphemeral or null`23322333 Create a cache control breakpoint at this content block.23342335 - `defer_loading: optional boolean`23362337 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.23382339 - `strict: optional boolean`23402341 When true, guarantees schema validation on tool names and inputs23422343 - `BetaCodeExecutionTool20260521 object`23442345 Code execution tool with REPL state persistence.23462347 - `type: "code_execution_20260521"`23482349 - `name: "code_execution"`23502351 Name of the tool.23522353 This is how the tool will be called by the model and in `tool_use` blocks.23542355 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`23562357 - `"direct"`23582359 - `"code_execution_20250825"`23602361 - `"code_execution_20260120"`23622363 - `"code_execution_20260521"`23642365 - `cache_control: optional BetaCacheControlEphemeral or null`23662367 Create a cache control breakpoint at this content block.23682369 - `defer_loading: optional boolean`23702371 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.23722373 - `strict: optional boolean`23742375 When true, guarantees schema validation on tool names and inputs23762377 - `BetaBrowserToolset20260801 object`23782379 The browser toolset: a single `tools[]` entry (carrying no2380 `name`) that declares the browser tool family. The model is served2381 the family's tool with any members disabled via `configs` removed2382 from its schema.23832384 - `type: "browser_toolset_20260801"`23852386 - `cache_control: optional BetaCacheControlEphemeral or null`23872388 Create a cache control breakpoint at this content block.23892390 - `configs: optional BetaBrowserToolsetConfigs or null`23912392 Per-member configuration for `browser_toolset_20260801`: one2393 optional field per member tool, keyed by the member name — the same2394 name the member's `tool_use` blocks carry. Every member is an2395 accepted key, and a member's defaults apply wherever its key is2396 absent. Unknown keys are rejected: the field set is this toolset2397 version's complete member set.23982399 - `type: optional BetaBrowserTypeConfig or null`24002401 `type`'s config overrides.24022403 - `defer_loading: optional boolean or null`24042405 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.24062407 - `enabled: optional boolean or null`24082409 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.24102411 - `close_tab: optional BetaBrowserCloseTabConfig or null`24122413 `close_tab`'s config overrides.24142415 - `defer_loading: optional boolean or null`24162417 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.24182419 - `enabled: optional boolean or null`24202421 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.24222423 - `double_click: optional BetaBrowserDoubleClickConfig or null`24242425 `double_click`'s config overrides.24262427 - `defer_loading: optional boolean or null`24282429 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.24302431 - `enabled: optional boolean or null`24322433 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.24342435 - `file_upload: optional BetaBrowserFileUploadConfig or null`24362437 `file_upload`'s config overrides.24382439 - `defer_loading: optional boolean or null`24402441 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.24422443 - `enabled: optional boolean or null`24442445 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.24462447 - `find: optional BetaBrowserFindConfig or null`24482449 `find`'s config overrides.24502451 - `defer_loading: optional boolean or null`24522453 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.24542455 - `enabled: optional boolean or null`24562457 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.24582459 - `form_input: optional BetaBrowserFormInputConfig or null`24602461 `form_input`'s config overrides.24622463 - `defer_loading: optional boolean or null`24642465 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.24662467 - `enabled: optional boolean or null`24682469 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.24702471 - `get_page_text: optional BetaBrowserGetPageTextConfig or null`24722473 `get_page_text`'s config overrides.24742475 - `defer_loading: optional boolean or null`24762477 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.24782479 - `enabled: optional boolean or null`24802481 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.24822483 - `hold_key: optional BetaBrowserHoldKeyConfig or null`24842485 `hold_key`'s config overrides.24862487 - `defer_loading: optional boolean or null`24882489 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.24902491 - `enabled: optional boolean or null`24922493 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.24942495 - `hover: optional BetaBrowserHoverConfig or null`24962497 `hover`'s config overrides.24982499 - `defer_loading: optional boolean or null`25002501 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.25022503 - `enabled: optional boolean or null`25042505 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.25062507 - `javascript_exec: optional BetaBrowserJavascriptExecConfig or null`25082509 `javascript_exec`'s config overrides.25102511 - `defer_loading: optional boolean or null`25122513 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.25142515 - `enabled: optional boolean or null`25162517 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.25182519 - `key: optional BetaBrowserKeyConfig or null`25202521 `key`'s config overrides.25222523 - `defer_loading: optional boolean or null`25242525 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.25262527 - `enabled: optional boolean or null`25282529 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.25302531 - `left_click: optional BetaBrowserLeftClickConfig or null`25322533 `left_click`'s config overrides.25342535 - `defer_loading: optional boolean or null`25362537 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.25382539 - `enabled: optional boolean or null`25402541 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.25422543 - `left_click_drag: optional BetaBrowserLeftClickDragConfig or null`25442545 `left_click_drag`'s config overrides.25462547 - `defer_loading: optional boolean or null`25482549 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.25502551 - `enabled: optional boolean or null`25522553 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.25542555 - `left_mouse_down: optional BetaBrowserLeftMouseDownConfig or null`25562557 `left_mouse_down`'s config overrides.25582559 - `defer_loading: optional boolean or null`25602561 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.25622563 - `enabled: optional boolean or null`25642565 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.25662567 - `left_mouse_up: optional BetaBrowserLeftMouseUpConfig or null`25682569 `left_mouse_up`'s config overrides.25702571 - `defer_loading: optional boolean or null`25722573 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.25742575 - `enabled: optional boolean or null`25762577 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.25782579 - `list_tabs: optional BetaBrowserListTabsConfig or null`25802581 `list_tabs`'s config overrides.25822583 - `defer_loading: optional boolean or null`25842585 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.25862587 - `enabled: optional boolean or null`25882589 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.25902591 - `middle_click: optional BetaBrowserMiddleClickConfig or null`25922593 `middle_click`'s config overrides.25942595 - `defer_loading: optional boolean or null`25962597 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.25982599 - `enabled: optional boolean or null`26002601 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.26022603 - `mouse_move: optional BetaBrowserMouseMoveConfig or null`26042605 `mouse_move`'s config overrides.26062607 - `defer_loading: optional boolean or null`26082609 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.26102611 - `enabled: optional boolean or null`26122613 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.26142615 - `navigate: optional BetaBrowserNavigateConfig or null`26162617 `navigate`'s config overrides.26182619 - `defer_loading: optional boolean or null`26202621 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.26222623 - `enabled: optional boolean or null`26242625 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.26262627 - `new_tab: optional BetaBrowserNewTabConfig or null`26282629 `new_tab`'s config overrides.26302631 - `defer_loading: optional boolean or null`26322633 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.26342635 - `enabled: optional boolean or null`26362637 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.26382639 - `read_console: optional BetaBrowserReadConsoleConfig or null`26402641 `read_console`'s config overrides.26422643 - `defer_loading: optional boolean or null`26442645 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.26462647 - `enabled: optional boolean or null`26482649 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.26502651 - `read_network: optional BetaBrowserReadNetworkConfig or null`26522653 `read_network`'s config overrides.26542655 - `defer_loading: optional boolean or null`26562657 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.26582659 - `enabled: optional boolean or null`26602661 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.26622663 - `read_page: optional BetaBrowserReadPageConfig or null`26642665 `read_page`'s config overrides.26662667 - `defer_loading: optional boolean or null`26682669 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.26702671 - `enabled: optional boolean or null`26722673 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.26742675 - `right_click: optional BetaBrowserRightClickConfig or null`26762677 `right_click`'s config overrides.26782679 - `defer_loading: optional boolean or null`26802681 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.26822683 - `enabled: optional boolean or null`26842685 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.26862687 - `screenshot: optional BetaBrowserScreenshotConfig or null`26882689 `screenshot`'s config overrides.26902691 - `defer_loading: optional boolean or null`26922693 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.26942695 - `enabled: optional boolean or null`26962697 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.26982699 - `scroll: optional BetaBrowserScrollConfig or null`27002701 `scroll`'s config overrides.27022703 - `defer_loading: optional boolean or null`27042705 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.27062707 - `enabled: optional boolean or null`27082709 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.27102711 - `scroll_to: optional BetaBrowserScrollToConfig or null`27122713 `scroll_to`'s config overrides.27142715 - `defer_loading: optional boolean or null`27162717 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.27182719 - `enabled: optional boolean or null`27202721 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.27222723 - `switch_tab: optional BetaBrowserSwitchTabConfig or null`27242725 `switch_tab`'s config overrides.27262727 - `defer_loading: optional boolean or null`27282729 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.27302731 - `enabled: optional boolean or null`27322733 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.27342735 - `triple_click: optional BetaBrowserTripleClickConfig or null`27362737 `triple_click`'s config overrides.27382739 - `defer_loading: optional boolean or null`27402741 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.27422743 - `enabled: optional boolean or null`27442745 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.27462747 - `wait: optional BetaBrowserWaitConfig or null`27482749 `wait`'s config overrides.27502751 - `defer_loading: optional boolean or null`27522753 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.27542755 - `enabled: optional boolean or null`27562757 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.27582759 - `zoom: optional BetaBrowserZoomConfig or null`27602761 `zoom`'s config overrides.27622763 - `defer_loading: optional boolean or null`27642765 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.27662767 - `enabled: optional boolean or null`27682769 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.27702771 - `BetaToolComputerUse20241022 object`27722773 - `type: "computer_20241022"`27742775 - `display_height_px: number`27762777 The height of the display in pixels.27782779 minimum: 127802781 - `display_width_px: number`27822783 The width of the display in pixels.27842785 minimum: 127862787 - `name: "computer"`27882789 Name of the tool.27902791 This is how the tool will be called by the model and in `tool_use` blocks.27922793 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`27942795 - `"direct"`27962797 - `"code_execution_20250825"`27982799 - `"code_execution_20260120"`28002801 - `"code_execution_20260521"`28022803 - `cache_control: optional BetaCacheControlEphemeral or null`28042805 Create a cache control breakpoint at this content block.28062807 - `defer_loading: optional boolean`28082809 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.28102811 - `display_number: optional number or null`28122813 The X11 display number (e.g. 0, 1) for the display.28142815 minimum: 028162817 - `input_examples: optional array of map[unknown]`28182819 - `strict: optional boolean`28202821 When true, guarantees schema validation on tool names and inputs28222823 - `BetaMemoryTool20250818 object`28242825 - `type: "memory_20250818"`28262827 - `name: "memory"`28282829 Name of the tool.28302831 This is how the tool will be called by the model and in `tool_use` blocks.28322833 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`28342835 - `"direct"`28362837 - `"code_execution_20250825"`28382839 - `"code_execution_20260120"`28402841 - `"code_execution_20260521"`28422843 - `cache_control: optional BetaCacheControlEphemeral or null`28442845 Create a cache control breakpoint at this content block.28462847 - `defer_loading: optional boolean`28482849 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.28502851 - `input_examples: optional array of map[unknown]`28522853 - `strict: optional boolean`28542855 When true, guarantees schema validation on tool names and inputs28562857 - `BetaToolComputerUse20250124 object`28582859 - `type: "computer_20250124"`28602861 - `display_height_px: number`28622863 The height of the display in pixels.28642865 minimum: 128662867 - `display_width_px: number`28682869 The width of the display in pixels.28702871 minimum: 128722873 - `name: "computer"`28742875 Name of the tool.28762877 This is how the tool will be called by the model and in `tool_use` blocks.28782879 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`28802881 - `"direct"`28822883 - `"code_execution_20250825"`28842885 - `"code_execution_20260120"`28862887 - `"code_execution_20260521"`28882889 - `cache_control: optional BetaCacheControlEphemeral or null`28902891 Create a cache control breakpoint at this content block.28922893 - `defer_loading: optional boolean`28942895 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.28962897 - `display_number: optional number or null`28982899 The X11 display number (e.g. 0, 1) for the display.29002901 minimum: 029022903 - `input_examples: optional array of map[unknown]`29042905 - `strict: optional boolean`29062907 When true, guarantees schema validation on tool names and inputs29082909 - `BetaToolTextEditor20241022 object`29102911 - `type: "text_editor_20241022"`29122913 - `name: "str_replace_editor"`29142915 Name of the tool.29162917 This is how the tool will be called by the model and in `tool_use` blocks.29182919 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`29202921 - `"direct"`29222923 - `"code_execution_20250825"`29242925 - `"code_execution_20260120"`29262927 - `"code_execution_20260521"`29282929 - `cache_control: optional BetaCacheControlEphemeral or null`29302931 Create a cache control breakpoint at this content block.29322933 - `defer_loading: optional boolean`29342935 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.29362937 - `input_examples: optional array of map[unknown]`29382939 - `strict: optional boolean`29402941 When true, guarantees schema validation on tool names and inputs29422943 - `BetaToolComputerUse20251124 object`29442945 - `type: "computer_20251124"`29462947 - `display_height_px: number`29482949 The height of the display in pixels.29502951 minimum: 129522953 - `display_width_px: number`29542955 The width of the display in pixels.29562957 minimum: 129582959 - `name: "computer"`29602961 Name of the tool.29622963 This is how the tool will be called by the model and in `tool_use` blocks.29642965 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`29662967 - `"direct"`29682969 - `"code_execution_20250825"`29702971 - `"code_execution_20260120"`29722973 - `"code_execution_20260521"`29742975 - `cache_control: optional BetaCacheControlEphemeral or null`29762977 Create a cache control breakpoint at this content block.29782979 - `defer_loading: optional boolean`29802981 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.29822983 - `display_number: optional number or null`29842985 The X11 display number (e.g. 0, 1) for the display.29862987 minimum: 029882989 - `enable_zoom: optional boolean`29902991 Whether to enable an action to take a zoomed-in screenshot of the screen.29922993 - `input_examples: optional array of map[unknown]`29942995 - `strict: optional boolean`29962997 When true, guarantees schema validation on tool names and inputs29982999 - `BetaComputerToolset20260801 object`30003001 The computer toolset: a single `tools[]` entry (carrying no3002 `name`) that declares the computer tool family. The model is3003 served the family's tool with any members disabled via `configs`3004 removed from its schema. Every member is enabled by default, zoom3005 included. The single-tool options `display_number` and3006 `enable_zoom` are not fields of a toolset entry — it carries only3007 `type`, `configs`, and `cache_control`; zoom is controlled3008 via `configs.zoom.enabled`.30093010 - `type: "computer_toolset_20260801"`30113012 - `cache_control: optional BetaCacheControlEphemeral or null`30133014 Create a cache control breakpoint at this content block.30153016 - `configs: optional BetaComputerToolsetConfigs or null`30173018 Per-member configuration for `computer_toolset_20260801`: one3019 optional field per member tool, keyed by the member name — the same3020 name the member's `tool_use` blocks carry. Every member is an3021 accepted key, and a member's defaults apply wherever its key is3022 absent. Unknown keys are rejected: the field set is this toolset3023 version's complete member set.30243025 - `type: optional BetaComputerTypeConfig or null`30263027 `type`'s config overrides.30283029 - `defer_loading: optional boolean or null`30303031 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.30323033 - `enabled: optional boolean or null`30343035 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.30363037 - `cursor_position: optional BetaComputerCursorPositionConfig or null`30383039 `cursor_position`'s config overrides.30403041 - `defer_loading: optional boolean or null`30423043 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.30443045 - `enabled: optional boolean or null`30463047 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.30483049 - `double_click: optional BetaComputerDoubleClickConfig or null`30503051 `double_click`'s config overrides.30523053 - `defer_loading: optional boolean or null`30543055 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.30563057 - `enabled: optional boolean or null`30583059 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.30603061 - `hold_key: optional BetaComputerHoldKeyConfig or null`30623063 `hold_key`'s config overrides.30643065 - `defer_loading: optional boolean or null`30663067 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.30683069 - `enabled: optional boolean or null`30703071 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.30723073 - `key: optional BetaComputerKeyConfig or null`30743075 `key`'s config overrides.30763077 - `defer_loading: optional boolean or null`30783079 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.30803081 - `enabled: optional boolean or null`30823083 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.30843085 - `left_click: optional BetaComputerLeftClickConfig or null`30863087 `left_click`'s config overrides.30883089 - `defer_loading: optional boolean or null`30903091 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.30923093 - `enabled: optional boolean or null`30943095 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.30963097 - `left_click_drag: optional BetaComputerLeftClickDragConfig or null`30983099 `left_click_drag`'s config overrides.31003101 - `defer_loading: optional boolean or null`31023103 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.31043105 - `enabled: optional boolean or null`31063107 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.31083109 - `left_mouse_down: optional BetaComputerLeftMouseDownConfig or null`31103111 `left_mouse_down`'s config overrides.31123113 - `defer_loading: optional boolean or null`31143115 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.31163117 - `enabled: optional boolean or null`31183119 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.31203121 - `left_mouse_up: optional BetaComputerLeftMouseUpConfig or null`31223123 `left_mouse_up`'s config overrides.31243125 - `defer_loading: optional boolean or null`31263127 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.31283129 - `enabled: optional boolean or null`31303131 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.31323133 - `middle_click: optional BetaComputerMiddleClickConfig or null`31343135 `middle_click`'s config overrides.31363137 - `defer_loading: optional boolean or null`31383139 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.31403141 - `enabled: optional boolean or null`31423143 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.31443145 - `mouse_move: optional BetaComputerMouseMoveConfig or null`31463147 `mouse_move`'s config overrides.31483149 - `defer_loading: optional boolean or null`31503151 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.31523153 - `enabled: optional boolean or null`31543155 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.31563157 - `right_click: optional BetaComputerRightClickConfig or null`31583159 `right_click`'s config overrides.31603161 - `defer_loading: optional boolean or null`31623163 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.31643165 - `enabled: optional boolean or null`31663167 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.31683169 - `screenshot: optional BetaComputerScreenshotConfig or null`31703171 `screenshot`'s config overrides.31723173 - `defer_loading: optional boolean or null`31743175 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.31763177 - `enabled: optional boolean or null`31783179 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.31803181 - `scroll: optional BetaComputerScrollConfig or null`31823183 `scroll`'s config overrides.31843185 - `defer_loading: optional boolean or null`31863187 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.31883189 - `enabled: optional boolean or null`31903191 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.31923193 - `triple_click: optional BetaComputerTripleClickConfig or null`31943195 `triple_click`'s config overrides.31963197 - `defer_loading: optional boolean or null`31983199 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.32003201 - `enabled: optional boolean or null`32023203 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.32043205 - `wait: optional BetaComputerWaitConfig or null`32063207 `wait`'s config overrides.32083209 - `defer_loading: optional boolean or null`32103211 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.32123213 - `enabled: optional boolean or null`32143215 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.32163217 - `zoom: optional BetaComputerZoomConfig or null`32183219 `zoom`'s config overrides.32203221 - `defer_loading: optional boolean or null`32223223 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.32243225 - `enabled: optional boolean or null`32263227 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.32283229 - `BetaToolTextEditor20250124 object`32303231 - `type: "text_editor_20250124"`32323233 - `name: "str_replace_editor"`32343235 Name of the tool.32363237 This is how the tool will be called by the model and in `tool_use` blocks.32383239 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`32403241 - `"direct"`32423243 - `"code_execution_20250825"`32443245 - `"code_execution_20260120"`32463247 - `"code_execution_20260521"`32483249 - `cache_control: optional BetaCacheControlEphemeral or null`32503251 Create a cache control breakpoint at this content block.32523253 - `defer_loading: optional boolean`32543255 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.32563257 - `input_examples: optional array of map[unknown]`32583259 - `strict: optional boolean`32603261 When true, guarantees schema validation on tool names and inputs32623263 - `BetaToolTextEditor20250429 object`32643265 - `type: "text_editor_20250429"`32663267 - `name: "str_replace_based_edit_tool"`32683269 Name of the tool.32703271 This is how the tool will be called by the model and in `tool_use` blocks.32723273 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`32743275 - `"direct"`32763277 - `"code_execution_20250825"`32783279 - `"code_execution_20260120"`32803281 - `"code_execution_20260521"`32823283 - `cache_control: optional BetaCacheControlEphemeral or null`32843285 Create a cache control breakpoint at this content block.32863287 - `defer_loading: optional boolean`32883289 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.32903291 - `input_examples: optional array of map[unknown]`32923293 - `strict: optional boolean`32943295 When true, guarantees schema validation on tool names and inputs32963297 - `BetaToolTextEditor20250728 object`32983299 - `type: "text_editor_20250728"`33003301 - `name: "str_replace_based_edit_tool"`33023303 Name of the tool.33043305 This is how the tool will be called by the model and in `tool_use` blocks.33063307 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`33083309 - `"direct"`33103311 - `"code_execution_20250825"`33123313 - `"code_execution_20260120"`33143315 - `"code_execution_20260521"`33163317 - `cache_control: optional BetaCacheControlEphemeral or null`33183319 Create a cache control breakpoint at this content block.33203321 - `defer_loading: optional boolean`33223323 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.33243325 - `input_examples: optional array of map[unknown]`33263327 - `max_characters: optional number or null`33283329 Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file.33303331 minimum: 133323333 - `strict: optional boolean`33343335 When true, guarantees schema validation on tool names and inputs33363337 - `BetaWebSearchTool20250305 object`33383339 - `type: "web_search_20250305"`33403341 - `name: "web_search"`33423343 Name of the tool.33443345 This is how the tool will be called by the model and in `tool_use` blocks.33463347 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`33483349 - `"direct"`33503351 - `"code_execution_20250825"`33523353 - `"code_execution_20260120"`33543355 - `"code_execution_20260521"`33563357 - `allowed_domains: optional array of string or null`33583359 If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.33603361 - `blocked_domains: optional array of string or null`33623363 If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.33643365 - `cache_control: optional BetaCacheControlEphemeral or null`33663367 Create a cache control breakpoint at this content block.33683369 - `defer_loading: optional boolean`33703371 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.33723373 - `max_uses: optional number or null`33743375 Maximum number of times the tool can be used in the API request.33763377 exclusiveMinimum: 033783379 - `strict: optional boolean`33803381 When true, guarantees schema validation on tool names and inputs33823383 - `user_location: optional BetaUserLocation or null`33843385 Parameters for the user's location. Used to provide more relevant search results.33863387 - `type: "approximate"`33883389 - `city: optional string or null`33903391 The city of the user.33923393 maxLength: 255, minLength: 133943395 - `country: optional string or null`33963397 The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user.33983399 maxLength: 2, minLength: 234003401 - `region: optional string or null`34023403 The region of the user.34043405 maxLength: 255, minLength: 134063407 - `timezone: optional string or null`34083409 The [IANA timezone](https://nodatime.org/TimeZones) of the user.34103411 maxLength: 255, minLength: 134123413 - `BetaWebFetchTool20250910 object`34143415 - `type: "web_fetch_20250910"`34163417 - `name: "web_fetch"`34183419 Name of the tool.34203421 This is how the tool will be called by the model and in `tool_use` blocks.34223423 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`34243425 - `"direct"`34263427 - `"code_execution_20250825"`34283429 - `"code_execution_20260120"`34303431 - `"code_execution_20260521"`34323433 - `allowed_domains: optional array of string or null`34343435 List of domains to allow fetching from34363437 - `blocked_domains: optional array of string or null`34383439 List of domains to block fetching from34403441 - `cache_control: optional BetaCacheControlEphemeral or null`34423443 Create a cache control breakpoint at this content block.34443445 - `citations: optional BetaCitationsConfigParam or null`34463447 Citations configuration for fetched documents. Citations are disabled by default.34483449 - `defer_loading: optional boolean`34503451 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.34523453 - `max_content_tokens: optional number or null`34543455 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.34563457 exclusiveMinimum: 034583459 - `max_uses: optional number or null`34603461 Maximum number of times the tool can be used in the API request.34623463 exclusiveMinimum: 034643465 - `strict: optional boolean`34663467 When true, guarantees schema validation on tool names and inputs34683469 - `url_sources: optional BetaWebFetchURLSources or null`34703471 Which sources contribute to the set of URLs web fetch may fetch.34723473 Each key is a tagged variant: `user_input` is `all` or `none`; the3474 two tool filters are `all`, `none`, `only` (only the named tools'3475 results) or `except` (every result but the named tools'). A named tool3476 must be declared in this request's `tools[]`.34773478 - `client_tool_results: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone or BetaWebFetchURLSourceOnly or BetaWebFetchURLSourceExcept`34793480 Which client tools' results contribute fetchable URLs: "all", "none", or an only or except list of client tool names from tools[].34813482 - `BetaWebFetchURLSourceAll object`34833484 The `url_sources` variant under which a source contributes in3485 full: every result of the tool filter's source, or all user input.34863487 - `type: "all"`34883489 - `BetaWebFetchURLSourceNone object`34903491 The `url_sources` variant under which a source contributes nothing:3492 no result of the tool filter's source, or no user input.34933494 - `type: "none"`34953496 - `BetaWebFetchURLSourceOnly object`34973498 The tool filter variant under which only the named tools' results3499 contribute.35003501 - `type: "only"`35023503 - `tools: array of BetaWebFetchURLSourceToolReference`35043505 - `type: "tool_reference"`35063507 - `name: string`35083509 - `BetaWebFetchURLSourceExcept object`35103511 The tool filter variant under which every result but the named3512 tools' contributes.35133514 - `type: "except"`35153516 - `tools: array of BetaWebFetchURLSourceToolReference`35173518 - `type: "tool_reference"`35193520 - `name: string`35213522 - `server_tool_results: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone or BetaWebFetchURLSourceOnly or BetaWebFetchURLSourceExcept`35233524 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.35253526 - `BetaWebFetchURLSourceAll object`35273528 The `url_sources` variant under which a source contributes in3529 full: every result of the tool filter's source, or all user input.35303531 - `BetaWebFetchURLSourceNone object`35323533 The `url_sources` variant under which a source contributes nothing:3534 no result of the tool filter's source, or no user input.35353536 - `BetaWebFetchURLSourceOnly object`35373538 The tool filter variant under which only the named tools' results3539 contribute.35403541 - `BetaWebFetchURLSourceExcept object`35423543 The tool filter variant under which every result but the named3544 tools' contributes.35453546 - `user_input: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone`35473548 Whether URLs in user messages are fetchable: "all" or "none".35493550 - `BetaWebFetchURLSourceAll object`35513552 The `url_sources` variant under which a source contributes in3553 full: every result of the tool filter's source, or all user input.35543555 - `BetaWebFetchURLSourceNone object`35563557 The `url_sources` variant under which a source contributes nothing:3558 no result of the tool filter's source, or no user input.35593560 - `BetaWebSearchTool20260209 object`35613562 - `type: "web_search_20260209"`35633564 - `name: "web_search"`35653566 Name of the tool.35673568 This is how the tool will be called by the model and in `tool_use` blocks.35693570 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`35713572 - `"direct"`35733574 - `"code_execution_20250825"`35753576 - `"code_execution_20260120"`35773578 - `"code_execution_20260521"`35793580 - `allowed_domains: optional array of string or null`35813582 If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.35833584 - `blocked_domains: optional array of string or null`35853586 If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.35873588 - `cache_control: optional BetaCacheControlEphemeral or null`35893590 Create a cache control breakpoint at this content block.35913592 - `defer_loading: optional boolean`35933594 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.35953596 - `max_uses: optional number or null`35973598 Maximum number of times the tool can be used in the API request.35993600 exclusiveMinimum: 036013602 - `strict: optional boolean`36033604 When true, guarantees schema validation on tool names and inputs36053606 - `user_location: optional BetaUserLocation or null`36073608 Parameters for the user's location. Used to provide more relevant search results.36093610 - `BetaWebFetchTool20260209 object`36113612 - `type: "web_fetch_20260209"`36133614 - `name: "web_fetch"`36153616 Name of the tool.36173618 This is how the tool will be called by the model and in `tool_use` blocks.36193620 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`36213622 - `"direct"`36233624 - `"code_execution_20250825"`36253626 - `"code_execution_20260120"`36273628 - `"code_execution_20260521"`36293630 - `allowed_domains: optional array of string or null`36313632 List of domains to allow fetching from36333634 - `blocked_domains: optional array of string or null`36353636 List of domains to block fetching from36373638 - `cache_control: optional BetaCacheControlEphemeral or null`36393640 Create a cache control breakpoint at this content block.36413642 - `citations: optional BetaCitationsConfigParam or null`36433644 Citations configuration for fetched documents. Citations are disabled by default.36453646 - `defer_loading: optional boolean`36473648 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.36493650 - `max_content_tokens: optional number or null`36513652 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.36533654 exclusiveMinimum: 036553656 - `max_uses: optional number or null`36573658 Maximum number of times the tool can be used in the API request.36593660 exclusiveMinimum: 036613662 - `strict: optional boolean`36633664 When true, guarantees schema validation on tool names and inputs36653666 - `url_sources: optional BetaWebFetchURLSources or null`36673668 Which sources contribute to the set of URLs web fetch may fetch.36693670 Each key is a tagged variant: `user_input` is `all` or `none`; the3671 two tool filters are `all`, `none`, `only` (only the named tools'3672 results) or `except` (every result but the named tools'). A named tool3673 must be declared in this request's `tools[]`.36743675 - `BetaWebFetchTool20260309 object`36763677 Web fetch tool with use_cache parameter for bypassing cached content.36783679 - `type: "web_fetch_20260309"`36803681 - `name: "web_fetch"`36823683 Name of the tool.36843685 This is how the tool will be called by the model and in `tool_use` blocks.36863687 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`36883689 - `"direct"`36903691 - `"code_execution_20250825"`36923693 - `"code_execution_20260120"`36943695 - `"code_execution_20260521"`36963697 - `allowed_domains: optional array of string or null`36983699 List of domains to allow fetching from37003701 - `blocked_domains: optional array of string or null`37023703 List of domains to block fetching from37043705 - `cache_control: optional BetaCacheControlEphemeral or null`37063707 Create a cache control breakpoint at this content block.37083709 - `citations: optional BetaCitationsConfigParam or null`37103711 Citations configuration for fetched documents. Citations are disabled by default.37123713 - `defer_loading: optional boolean`37143715 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.37163717 - `max_content_tokens: optional number or null`37183719 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.37203721 exclusiveMinimum: 037223723 - `max_uses: optional number or null`37243725 Maximum number of times the tool can be used in the API request.37263727 exclusiveMinimum: 037283729 - `strict: optional boolean`37303731 When true, guarantees schema validation on tool names and inputs37323733 - `url_sources: optional BetaWebFetchURLSources or null`37343735 Which sources contribute to the set of URLs web fetch may fetch.37363737 Each key is a tagged variant: `user_input` is `all` or `none`; the3738 two tool filters are `all`, `none`, `only` (only the named tools'3739 results) or `except` (every result but the named tools'). A named tool3740 must be declared in this request's `tools[]`.37413742 - `use_cache: optional boolean`37433744 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.37453746 - `BetaWebSearchTool20260318 object`37473748 - `type: "web_search_20260318"`37493750 - `name: "web_search"`37513752 Name of the tool.37533754 This is how the tool will be called by the model and in `tool_use` blocks.37553756 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`37573758 - `"direct"`37593760 - `"code_execution_20250825"`37613762 - `"code_execution_20260120"`37633764 - `"code_execution_20260521"`37653766 - `allowed_domains: optional array of string or null`37673768 If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.37693770 - `blocked_domains: optional array of string or null`37713772 If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.37733774 - `cache_control: optional BetaCacheControlEphemeral or null`37753776 Create a cache control breakpoint at this content block.37773778 - `defer_loading: optional boolean`37793780 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.37813782 - `max_uses: optional number or null`37833784 Maximum number of times the tool can be used in the API request.37853786 exclusiveMinimum: 037873788 - `response_inclusion: optional "full" or "excluded"`37893790 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.37913792 - `"full"`37933794 - `"excluded"`37953796 - `strict: optional boolean`37973798 When true, guarantees schema validation on tool names and inputs37993800 - `user_location: optional BetaUserLocation or null`38013802 Parameters for the user's location. Used to provide more relevant search results.38033804 - `BetaWebFetchTool20260318 object`38053806 - `type: "web_fetch_20260318"`38073808 - `name: "web_fetch"`38093810 Name of the tool.38113812 This is how the tool will be called by the model and in `tool_use` blocks.38133814 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`38153816 - `"direct"`38173818 - `"code_execution_20250825"`38193820 - `"code_execution_20260120"`38213822 - `"code_execution_20260521"`38233824 - `allowed_domains: optional array of string or null`38253826 List of domains to allow fetching from38273828 - `blocked_domains: optional array of string or null`38293830 List of domains to block fetching from38313832 - `cache_control: optional BetaCacheControlEphemeral or null`38333834 Create a cache control breakpoint at this content block.38353836 - `citations: optional BetaCitationsConfigParam or null`38373838 Citations configuration for fetched documents. Citations are disabled by default.38393840 - `defer_loading: optional boolean`38413842 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.38433844 - `max_content_tokens: optional number or null`38453846 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.38473848 exclusiveMinimum: 038493850 - `max_uses: optional number or null`38513852 Maximum number of times the tool can be used in the API request.38533854 exclusiveMinimum: 038553856 - `response_inclusion: optional "full" or "excluded"`38573858 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.38593860 - `"full"`38613862 - `"excluded"`38633864 - `strict: optional boolean`38653866 When true, guarantees schema validation on tool names and inputs38673868 - `url_sources: optional BetaWebFetchURLSources or null`38693870 Which sources contribute to the set of URLs web fetch may fetch.38713872 Each key is a tagged variant: `user_input` is `all` or `none`; the3873 two tool filters are `all`, `none`, `only` (only the named tools'3874 results) or `except` (every result but the named tools'). A named tool3875 must be declared in this request's `tools[]`.38763877 - `use_cache: optional boolean`38783879 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.38803881 - `BetaAdvisorTool20260301 object`38823883 - `type: "advisor_20260301"`38843885 - `model: Model`38863887 The model that will complete your prompt.38883889 See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.38903891 - `name: "advisor"`38923893 Name of the tool.38943895 This is how the tool will be called by the model and in `tool_use` blocks.38963897 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`38983899 - `"direct"`39003901 - `"code_execution_20250825"`39023903 - `"code_execution_20260120"`39043905 - `"code_execution_20260521"`39063907 - `cache_control: optional BetaCacheControlEphemeral or null`39083909 Create a cache control breakpoint at this content block.39103911 - `caching: optional BetaCacheControlEphemeral or null`39123913 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.39143915 - `defer_loading: optional boolean`39163917 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.39183919 - `max_tokens: optional number or null`39203921 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.39223923 minimum: 102439243925 - `max_uses: optional number or null`39263927 Maximum number of times the tool can be used in the API request.39283929 exclusiveMinimum: 039303931 - `strict: optional boolean`39323933 When true, guarantees schema validation on tool names and inputs39343935 - `BetaToolSearchToolBm25_20251119 object`39363937 - `type: "tool_search_tool_bm25_20251119" or "tool_search_tool_bm25"`39383939 - `"tool_search_tool_bm25_20251119"`39403941 - `"tool_search_tool_bm25"`39423943 - `name: "tool_search_tool_bm25"`39443945 Name of the tool.39463947 This is how the tool will be called by the model and in `tool_use` blocks.39483949 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`39503951 - `"direct"`39523953 - `"code_execution_20250825"`39543955 - `"code_execution_20260120"`39563957 - `"code_execution_20260521"`39583959 - `cache_control: optional BetaCacheControlEphemeral or null`39603961 Create a cache control breakpoint at this content block.39623963 - `defer_loading: optional boolean`39643965 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.39663967 - `strict: optional boolean`39683969 When true, guarantees schema validation on tool names and inputs39703971 - `BetaToolSearchToolRegex20251119 object`39723973 - `type: "tool_search_tool_regex_20251119" or "tool_search_tool_regex"`39743975 - `"tool_search_tool_regex_20251119"`39763977 - `"tool_search_tool_regex"`39783979 - `name: "tool_search_tool_regex"`39803981 Name of the tool.39823983 This is how the tool will be called by the model and in `tool_use` blocks.39843985 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`39863987 - `"direct"`39883989 - `"code_execution_20250825"`39903991 - `"code_execution_20260120"`39923993 - `"code_execution_20260521"`39943995 - `cache_control: optional BetaCacheControlEphemeral or null`39963997 Create a cache control breakpoint at this content block.39983999 - `defer_loading: optional boolean`40004001 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.40024003 - `strict: optional boolean`40044005 When true, guarantees schema validation on tool names and inputs40064007 - `BetaMCPToolset object`40084009 Configuration for a group of tools from an MCP server.40104011 Allows configuring enabled status and defer_loading for all tools4012 from an MCP server, with optional per-tool overrides.40134014 - `type: "mcp_toolset"`40154016 - `mcp_server_name: string`40174018 Name of the MCP server to configure tools for40194020 maxLength: 255, minLength: 140214022 - `cache_control: optional BetaCacheControlEphemeral or null`40234024 Create a cache control breakpoint at this content block.40254026 - `configs: optional map[BetaMCPToolConfig] or null`40274028 Configuration overrides for specific tools, keyed by tool name40294030 - `defer_loading: optional boolean`40314032 - `enabled: optional boolean`40334034 - `default_config: optional BetaMCPToolDefaultConfig`40354036 Default configuration applied to all tools from this server40374038 - `defer_loading: optional boolean`40394040 - `enabled: optional boolean`40414042- `output_format: optional BetaJSONOutputFormat or null`40434044 **Deprecated**40454046 Deprecated: Use `output_config.format` instead. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)40474048 A schema to specify Claude's output format in responses. This parameter will be removed in a future release.40494050- `temperature: optional number`40514052 **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.40534054 Amount of randomness injected into the response.40554056 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.40574058 Note that even with `temperature` of `0.0`, the results will not be fully deterministic.40594060 maximum: 1, minimum: 040614062- `top_k: optional number`40634064 **Deprecated**: Deprecated. Models released after Claude Opus 4.6 do not accept top_k; any value will be rejected with a 400 error.40654066 Only sample from the top K options for each subsequent token.40674068 Used to remove "long tail" low probability responses. [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277).40694070 Recommended for advanced use cases only.40714072 minimum: 040734074- `top_p: optional number`40754076 **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.40774078 Use nucleus sampling.40794080 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`.40814082 Recommended for advanced use cases only.40834084 maximum: 1, minimum: 040854086## Returns40874088- `BetaMessage object`40894090 - `type: "message"`40914092 Object type.40934094 For Messages, this is always `"message"`.40954096 default: message40974098 - `id: string`40994100 Unique object identifier.41014102 The format and length of IDs may change over time.41034104 - `container: BetaContainer or null`41054106 Information about the container used in the request (for the code execution tool)41074108 - `id: string`41094110 Identifier for the container used in this request41114112 - `expires_at: string`41134114 The time at which the container will expire.41154116 format: date-time41174118 - `skills: array of BetaContainerSkill or null`41194120 Skills loaded in the container41214122 - `type: "anthropic" or "custom"`41234124 Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)41254126 - `"anthropic"`41274128 - `"custom"`41294130 - `skill_id: string`41314132 Skill ID41334134 maxLength: 64, minLength: 141354136 - `version: string`41374138 The resolved version: a skill version ID for custom skills.41394140 maxLength: 64, minLength: 141414142 - `content: array of BetaContentBlock`41434144 Content generated by the model.41454146 This is an array of content blocks, each of which has a `type` that determines its shape.41474148 Example:41494150 ```json4151 [{"type": "text", "text": "Hi, I'm Claude."}]4152 ```41534154 If the request input `messages` ended with an `assistant` turn, then the response `content` will continue directly from that last turn. You can use this to constrain the model's output.41554156 For example, if the input `messages` were:41574158 ```json4159 [4160 {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"},4161 {"role": "assistant", "content": "The best answer is ("}4162 ]4163 ```41644165 Then the response `content` might be:41664167 ```json4168 [{"type": "text", "text": "B)"}]4169 ```41704171 - `BetaTextBlock object`41724173 - `type: "text"`41744175 default: text41764177 - `citations: array of BetaTextCitation or null`41784179 Citations supporting the text block.41804181 The type of citation returned will depend on the type of document being cited. Citing a PDF results in `page_location`, plain text results in `char_location`, and content document results in `content_block_location`.41824183 - `BetaCitationCharLocation object`41844185 - `type: "char_location"`41864187 default: char_location41884189 - `cited_text: string`41904191 - `document_index: number`41924193 minimum: 041944195 - `document_title: string or null`41964197 - `end_char_index: number`41984199 - `file_id: string or null`42004201 - `start_char_index: number`42024203 minimum: 042044205 - `BetaCitationPageLocation object`42064207 - `type: "page_location"`42084209 default: page_location42104211 - `cited_text: string`42124213 - `document_index: number`42144215 minimum: 042164217 - `document_title: string or null`42184219 - `end_page_number: number`42204221 - `file_id: string or null`42224223 - `start_page_number: number`42244225 minimum: 142264227 - `BetaCitationContentBlockLocation object`42284229 - `type: "content_block_location"`42304231 default: content_block_location42324233 - `cited_text: string`42344235 The full text of the cited block range, concatenated.42364237 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.42384239 - `document_index: number`42404241 minimum: 042424243 - `document_title: string or null`42444245 - `end_block_index: number`42464247 Exclusive 0-based end index of the cited block range in the source's `content` array.42484249 Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.42504251 - `file_id: string or null`42524253 - `start_block_index: number`42544255 0-based index of the first cited block in the source's `content` array.42564257 minimum: 042584259 - `BetaCitationsWebSearchResultLocation object`42604261 - `type: "web_search_result_location"`42624263 default: web_search_result_location42644265 - `cited_text: string`42664267 - `encrypted_index: string`42684269 - `title: string or null`42704271 maxLength: 51242724273 - `url: string`42744275 - `BetaCitationSearchResultLocation object`42764277 - `type: "search_result_location"`42784279 default: search_result_location42804281 - `cited_text: string`42824283 The full text of the cited block range, concatenated.42844285 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.42864287 - `end_block_index: number`42884289 Exclusive 0-based end index of the cited block range in the source's `content` array.42904291 Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.42924293 - `search_result_index: number`42944295 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.42964297 Counted separately from `document_index`; server-side web search results are not included in this count.42984299 minimum: 043004301 - `source: string`43024303 - `start_block_index: number`43044305 0-based index of the first cited block in the source's `content` array.43064307 minimum: 043084309 - `title: string or null`43104311 - `text: string`43124313 minLength: 043144315 - `BetaThinkingBlock object`43164317 - `type: "thinking"`43184319 default: thinking43204321 - `signature: string`43224323 A value used to verify that this thinking block was generated by Claude when it is passed back to the API.43244325 This is an opaque field and should not be interpreted or parsed. When passing thinking blocks back to the API (required when using tools with extended thinking), pass them back exactly as received, with this field intact.43264327 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details.43284329 - `thinking: string`43304331 The text of Claude's thinking process for this block.43324333 - `BetaRedactedThinkingBlock object`43344335 - `type: "redacted_thinking"`43364337 default: redacted_thinking43384339 - `data: string`43404341 The contents of this redacted thinking block, returned when portions of the model's thinking were safety-redacted. This field is opaque and encrypted, with no readable content.43424343 Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation.43444345 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details.43464347 - `BetaToolUseBlock object`43484349 - `type: "tool_use"`43504351 default: tool_use43524353 - `id: string`43544355 pattern: ^[a-zA-Z0-9_-]+$43564357 - `input: map[unknown]`43584359 - `name: string`43604361 minLength: 143624363 - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120`43644365 - `BetaDirectCaller object`43664367 Tool invocation directly from the model.43684369 - `type: "direct"`43704371 - `BetaServerToolCaller object`43724373 Tool invocation generated by a server-side tool.43744375 - `type: "code_execution_20250825"`43764377 - `tool_id: string`43784379 pattern: ^srvtoolu_[a-zA-Z0-9_]+$43804381 - `BetaServerToolCaller20260120 object`43824383 - `type: "code_execution_20260120"`43844385 - `tool_id: string`43864387 pattern: ^srvtoolu_[a-zA-Z0-9_]+$43884389 - `toolset_name: optional string or null`43904391 For a toolset member tool_use, the toolset family.43924393 maxLength: 64, minLength: 1, pattern: ^[a-zA-Z0-9_-]+$43944395 - `BetaServerToolUseBlock object`43964397 - `type: "server_tool_use"`43984399 default: server_tool_use44004401 - `id: string`44024403 pattern: ^srvtoolu_[a-zA-Z0-9_]+$44044405 - `input: map[unknown]`44064407 - `name: "advisor" or "web_search" or "web_fetch" or 5 more`44084409 - `"advisor"`44104411 - `"web_search"`44124413 - `"web_fetch"`44144415 - `"code_execution"`44164417 - `"bash_code_execution"`44184419 - `"text_editor_code_execution"`44204421 - `"tool_search_tool_regex"`44224423 - `"tool_search_tool_bm25"`44244425 - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120`44264427 - `BetaDirectCaller object`44284429 Tool invocation directly from the model.44304431 - `BetaServerToolCaller object`44324433 Tool invocation generated by a server-side tool.44344435 - `BetaServerToolCaller20260120 object`44364437 - `BetaWebSearchToolResultBlock object`44384439 - `type: "web_search_tool_result"`44404441 default: web_search_tool_result44424443 - `content: BetaWebSearchToolResultBlockContent`44444445 - `BetaWebSearchToolResultError object`44464447 - `type: "web_search_tool_result_error"`44484449 default: web_search_tool_result_error44504451 - `error_code: BetaWebSearchToolResultErrorCode`44524453 - `"invalid_tool_input"`44544455 - `"unavailable"`44564457 - `"max_uses_exceeded"`44584459 - `"too_many_requests"`44604461 - `"query_too_long"`44624463 - `"request_too_large"`44644465 - `array of BetaWebSearchResultBlock`44664467 - `type: "web_search_result"`44684469 default: web_search_result44704471 - `encrypted_content: string`44724473 - `page_age: string or null`44744475 - `title: string`44764477 - `url: string`44784479 - `tool_use_id: string`44804481 pattern: ^srvtoolu_[a-zA-Z0-9_]+$44824483 - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120`44844485 - `BetaDirectCaller object`44864487 Tool invocation directly from the model.44884489 - `BetaServerToolCaller object`44904491 Tool invocation generated by a server-side tool.44924493 - `BetaServerToolCaller20260120 object`44944495 - `BetaWebFetchToolResultBlock object`44964497 - `type: "web_fetch_tool_result"`44984499 default: web_fetch_tool_result45004501 - `content: BetaWebFetchToolResultErrorBlock or BetaWebFetchBlock`45024503 - `BetaWebFetchToolResultErrorBlock object`45044505 - `type: "web_fetch_tool_result_error"`45064507 default: web_fetch_tool_result_error45084509 - `error_code: BetaWebFetchToolResultErrorCode`45104511 - `"invalid_tool_input"`45124513 - `"url_too_long"`45144515 - `"url_not_allowed"`45164517 - `"url_not_in_prior_context"`45184519 - `"url_not_accessible"`45204521 - `"unsupported_content_type"`45224523 - `"too_many_requests"`45244525 - `"max_uses_exceeded"`45264527 - `"unavailable"`45284529 - `"content_too_large"`45304531 - `BetaWebFetchBlock object`45324533 - `type: "web_fetch_result"`45344535 default: web_fetch_result45364537 - `content: BetaDocumentBlock`45384539 - `type: "document"`45404541 default: document45424543 - `citations: BetaCitationConfig or null`45444545 Citation configuration for the document45464547 - `enabled: boolean`45484549 default: false45504551 - `source: BetaBase64PDFSource or BetaPlainTextSource`45524553 - `BetaBase64PDFSource object`45544555 - `type: "base64"`45564557 - `data: string`45584559 format: byte45604561 - `media_type: "application/pdf"`45624563 - `BetaPlainTextSource object`45644565 - `type: "text"`45664567 - `data: string`45684569 - `media_type: "text/plain"`45704571 - `title: string or null`45724573 The title of the document45744575 - `retrieved_at: string or null`45764577 ISO 8601 timestamp when the content was retrieved45784579 - `url: string`45804581 Fetched content URL45824583 - `tool_use_id: string`45844585 pattern: ^srvtoolu_[a-zA-Z0-9_]+$45864587 - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120`45884589 - `BetaDirectCaller object`45904591 Tool invocation directly from the model.45924593 - `BetaServerToolCaller object`45944595 Tool invocation generated by a server-side tool.45964597 - `BetaServerToolCaller20260120 object`45984599 - `BetaAdvisorToolResultBlock object`46004601 - `type: "advisor_tool_result"`46024603 default: advisor_tool_result46044605 - `content: BetaAdvisorToolResultError or BetaAdvisorResultBlock or BetaAdvisorRedactedResultBlock`46064607 - `BetaAdvisorToolResultError object`46084609 - `type: "advisor_tool_result_error"`46104611 default: advisor_tool_result_error46124613 - `error_code: "max_uses_exceeded" or "prompt_too_long" or "too_many_requests" or 4 more`46144615 - `"max_uses_exceeded"`46164617 - `"prompt_too_long"`46184619 - `"too_many_requests"`46204621 - `"overloaded"`46224623 - `"unavailable"`46244625 - `"execution_time_exceeded"`46264627 - `"model_not_found"`46284629 - `BetaAdvisorResultBlock object`46304631 - `type: "advisor_result"`46324633 default: advisor_result46344635 - `stop_reason: string or null`46364637 The advisor sub-inference's stop reason (same values as the top-level message `stop_reason`). `max_tokens` indicates the advisor's output was truncated at the tool's `max_tokens` value or the advisor model's policy cap.46384639 - `text: string`46404641 - `BetaAdvisorRedactedResultBlock object`46424643 - `type: "advisor_redacted_result"`46444645 default: advisor_redacted_result46464647 - `encrypted_content: string`46484649 Opaque blob containing the advisor's output. Round-trip verbatim; do not inspect or modify.46504651 - `stop_reason: string or null`46524653 The advisor sub-inference's stop reason (same values as the top-level message `stop_reason`).46544655 - `tool_use_id: string`46564657 pattern: ^srvtoolu_[a-zA-Z0-9_]+$46584659 - `BetaCodeExecutionToolResultBlock object`46604661 - `type: "code_execution_tool_result"`46624663 default: code_execution_tool_result46644665 - `content: BetaCodeExecutionToolResultBlockContent`46664667 - `BetaCodeExecutionToolResultError object`46684669 - `type: "code_execution_tool_result_error"`46704671 default: code_execution_tool_result_error46724673 - `error_code: BetaCodeExecutionToolResultErrorCode`46744675 - `"invalid_tool_input"`46764677 - `"unavailable"`46784679 - `"too_many_requests"`46804681 - `"execution_time_exceeded"`46824683 - `BetaCodeExecutionResultBlock object`46844685 - `type: "code_execution_result"`46864687 default: code_execution_result46884689 - `content: array of BetaCodeExecutionOutputBlock`46904691 - `type: "code_execution_output"`46924693 default: code_execution_output46944695 - `file_id: string`46964697 - `return_code: number`46984699 - `stderr: string`47004701 - `stdout: string`47024703 - `BetaEncryptedCodeExecutionResultBlock object`47044705 Code execution result with encrypted stdout for PFC + web_search results.47064707 - `type: "encrypted_code_execution_result"`47084709 default: encrypted_code_execution_result47104711 - `content: array of BetaCodeExecutionOutputBlock`47124713 - `type: "code_execution_output"`47144715 default: code_execution_output47164717 - `file_id: string`47184719 - `encrypted_stdout: string`47204721 - `return_code: number`47224723 - `stderr: string`47244725 - `tool_use_id: string`47264727 pattern: ^srvtoolu_[a-zA-Z0-9_]+$47284729 - `BetaBashCodeExecutionToolResultBlock object`47304731 - `type: "bash_code_execution_tool_result"`47324733 default: bash_code_execution_tool_result47344735 - `content: BetaBashCodeExecutionToolResultError or BetaBashCodeExecutionResultBlock`47364737 - `BetaBashCodeExecutionToolResultError object`47384739 - `type: "bash_code_execution_tool_result_error"`47404741 default: bash_code_execution_tool_result_error47424743 - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more`47444745 - `"invalid_tool_input"`47464747 - `"unavailable"`47484749 - `"too_many_requests"`47504751 - `"execution_time_exceeded"`47524753 - `"output_file_too_large"`47544755 - `BetaBashCodeExecutionResultBlock object`47564757 - `type: "bash_code_execution_result"`47584759 default: bash_code_execution_result47604761 - `content: array of BetaBashCodeExecutionOutputBlock`47624763 - `type: "bash_code_execution_output"`47644765 default: bash_code_execution_output47664767 - `file_id: string`47684769 - `return_code: number`47704771 - `stderr: string`47724773 - `stdout: string`47744775 - `tool_use_id: string`47764777 pattern: ^srvtoolu_[a-zA-Z0-9_]+$47784779 - `BetaTextEditorCodeExecutionToolResultBlock object`47804781 - `type: "text_editor_code_execution_tool_result"`47824783 default: text_editor_code_execution_tool_result47844785 - `content: BetaTextEditorCodeExecutionToolResultError or BetaTextEditorCodeExecutionViewResultBlock or BetaTextEditorCodeExecutionCreateResultBlock or BetaTextEditorCodeExecutionStrReplaceResultBlock`47864787 - `BetaTextEditorCodeExecutionToolResultError object`47884789 - `type: "text_editor_code_execution_tool_result_error"`47904791 default: text_editor_code_execution_tool_result_error47924793 - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more`47944795 - `"invalid_tool_input"`47964797 - `"unavailable"`47984799 - `"too_many_requests"`48004801 - `"execution_time_exceeded"`48024803 - `"file_not_found"`48044805 - `error_message: string or null`48064807 - `BetaTextEditorCodeExecutionViewResultBlock object`48084809 - `type: "text_editor_code_execution_view_result"`48104811 default: text_editor_code_execution_view_result48124813 - `content: string`48144815 - `file_type: "text" or "image" or "pdf"`48164817 - `"text"`48184819 - `"image"`48204821 - `"pdf"`48224823 - `num_lines: number or null`48244825 - `start_line: number or null`48264827 - `total_lines: number or null`48284829 - `BetaTextEditorCodeExecutionCreateResultBlock object`48304831 - `type: "text_editor_code_execution_create_result"`48324833 default: text_editor_code_execution_create_result48344835 - `is_file_update: boolean`48364837 - `BetaTextEditorCodeExecutionStrReplaceResultBlock object`48384839 - `type: "text_editor_code_execution_str_replace_result"`48404841 default: text_editor_code_execution_str_replace_result48424843 - `lines: array of string or null`48444845 - `new_lines: number or null`48464847 - `new_start: number or null`48484849 - `old_lines: number or null`48504851 - `old_start: number or null`48524853 - `tool_use_id: string`48544855 pattern: ^srvtoolu_[a-zA-Z0-9_]+$48564857 - `BetaToolSearchToolResultBlock object`48584859 - `type: "tool_search_tool_result"`48604861 default: tool_search_tool_result48624863 - `content: BetaToolSearchToolResultError or BetaToolSearchToolSearchResultBlock`48644865 - `BetaToolSearchToolResultError object`48664867 - `type: "tool_search_tool_result_error"`48684869 default: tool_search_tool_result_error48704871 - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"`48724873 - `"invalid_tool_input"`48744875 - `"unavailable"`48764877 - `"too_many_requests"`48784879 - `"execution_time_exceeded"`48804881 - `error_message: string or null`48824883 - `BetaToolSearchToolSearchResultBlock object`48844885 - `type: "tool_search_tool_search_result"`48864887 default: tool_search_tool_search_result48884889 - `tool_references: array of BetaToolReferenceBlock`48904891 - `type: "tool_reference"`48924893 default: tool_reference48944895 - `tool_name: string`48964897 maxLength: 256, minLength: 1, pattern: ^[a-zA-Z0-9_-]{1,256}$48984899 - `tool_use_id: string`49004901 pattern: ^srvtoolu_[a-zA-Z0-9_]+$49024903 - `BetaMCPToolUseBlock object`49044905 - `type: "mcp_tool_use"`49064907 default: mcp_tool_use49084909 - `id: string`49104911 pattern: ^[a-zA-Z0-9_-]+$49124913 - `input: map[unknown]`49144915 - `name: string`49164917 The name of the MCP tool49184919 - `server_name: string`49204921 The name of the MCP server49224923 - `BetaMCPToolResultBlock object`49244925 - `type: "mcp_tool_result"`49264927 default: mcp_tool_result49284929 - `content: string or array of BetaTextBlock`49304931 - `string`49324933 - `BetaMCPToolResultBlockContent = array of BetaTextBlock`49344935 - `type: "text"`49364937 default: text49384939 - `citations: array of BetaTextCitation or null`49404941 Citations supporting the text block.49424943 The type of citation returned will depend on the type of document being cited. Citing a PDF results in `page_location`, plain text results in `char_location`, and content document results in `content_block_location`.49444945 - `text: string`49464947 minLength: 049484949 - `is_error: boolean`49504951 default: false49524953 - `tool_use_id: string`49544955 pattern: ^[a-zA-Z0-9_-]+$49564957 - `BetaContainerUploadBlock object`49584959 Response model for a file uploaded to the container.49604961 - `type: "container_upload"`49624963 default: container_upload49644965 - `file_id: string`49664967 - `BetaCompactionBlock object`49684969 A compaction block returned when autocompact is triggered.49704971 When content is None, it indicates the compaction failed to produce a valid4972 summary (e.g., malformed output from the model). Clients may round-trip4973 compaction blocks with null content; the server treats them as no-ops.49744975 - `type: "compaction"`49764977 default: compaction49784979 - `content: string or null`49804981 Summary of compacted content, or null if compaction failed49824983 - `encrypted_content: string or null`49844985 Opaque metadata from prior compaction, to be round-tripped verbatim49864987 - `signature: optional string or null`49884989 Signature over the summary, to be sent back with the block verbatim49904991 - `BetaFallbackBlock object`49924993 Marks the point in `content` where one model's output gives way to the next.49944995 One block appears per hop where a preceding model actually ran this turn and4996 declined. A turn where no preceding model ran and declined has no such4997 boundary and carries no block — the signal for whether a fallback model4998 served the response is the presence of a `fallback_message` entry in4999 `usage.iterations`, not this block.50005001 The block is treated like a server-tool content block for streaming: it5002 arrives via the standard `content_block_start` / `content_block_stop`5003 pair and carries no deltas.50045005 - `type: "fallback"`50065007 default: fallback50085009 - `from: BetaFallbackInfo`50105011 The model whose output ends at this point — the model that declined at this hop. When the declining hop is the requested model, its `model` echoes the top-level `model` string the caller sent (alias or canonical); when the declining hop is a fallback model, its `model` is that model's canonical id.50125013 - `model: Model`50145015 The model that will complete your prompt.50165017 See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.50185019 - `"claude-fable-5-1" or "claude-mythos-5-1" or "claude-sonnet-5" or 14 more`50205021 The model that will complete your prompt.50225023 See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.50245025 - `"claude-fable-5-1"`50265027 Frontier intelligence for ambitious tasks across coding, scientific discovery, and enterprise workflows50285029 - `"claude-mythos-5-1"`50305031 Our most capable model for cybersecurity and biology research, available through trusted access programs50325033 - `"claude-sonnet-5"`50345035 High-performance model for coding and agents50365037 - `"claude-fable-5"`50385039 Next generation of intelligence for the hardest knowledge work and coding problems50405041 - `"claude-mythos-5"`50425043 Most capable model for cybersecurity and biology research50445045 - `"claude-opus-5"`50465047 Powerful intelligence for long-running agents and coding50485049 - `"claude-opus-4-8"`50505051 Powerful intelligence for long-running agents and coding50525053 - `"claude-opus-4-7"`50545055 Powerful intelligence for long-running agents and coding50565057 - `"claude-mythos-preview"`50585059 New class of intelligence, strongest in coding and cybersecurity50605061 - `"claude-opus-4-6"`50625063 Powerful intelligence for long-running agents and coding50645065 - `"claude-sonnet-4-6"`50665067 Best combination of speed and intelligence50685069 - `"claude-haiku-4-5"`50705071 Fastest model with near-frontier intelligence50725073 - `"claude-haiku-4-5-20251001"`50745075 Fastest model with near-frontier intelligence50765077 - `"claude-opus-4-5"`50785079 Powerful intelligence for long-running agents and coding50805081 - `"claude-opus-4-5-20251101"`50825083 Powerful intelligence for long-running agents and coding50845085 - `"claude-sonnet-4-5"`50865087 High-performance model for agents and coding50885089 - `"claude-sonnet-4-5-20250929"`50905091 High-performance model for agents and coding50925093 - `string`50945095 - `to: BetaFallbackInfo`50965097 The fallback model producing the content that follows this block. Its `model` is always the canonical id.50985099 - `trigger: BetaFallbackRefusalTrigger`51005101 What caused the `from` model to hand over at this hop.51025103 - `type: "refusal"`51045105 default: refusal51065107 - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null`51085109 The policy category that triggered a refusal.51105111 - `"cyber"`51125113 The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category.51145115 - `"bio"`51165117 The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category.51185119 - `"frontier_llm"`51205121 The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category.51225123 - `"reasoning_extraction"`51245125 The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking).51265127 - `"general_harms"`51285129 The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category.51305131 - `context_management: BetaContextManagementResponse or null`51325133 Context management response.51345135 Information about context management strategies applied during the request.51365137 - `applied_edits: array of BetaClearToolUses20250919EditResponse or BetaClearThinking20251015EditResponse`51385139 List of context management edits that were applied.51405141 - `BetaClearToolUses20250919EditResponse object`51425143 - `type: "clear_tool_uses_20250919"`51445145 The type of context management edit applied.51465147 default: clear_tool_uses_2025091951485149 - `cleared_input_tokens: number`51505151 Number of input tokens cleared by this edit.51525153 minimum: 051545155 - `cleared_tool_uses: number`51565157 Number of tool uses that were cleared.51585159 minimum: 051605161 - `BetaClearThinking20251015EditResponse object`51625163 - `type: "clear_thinking_20251015"`51645165 The type of context management edit applied.51665167 default: clear_thinking_2025101551685169 - `cleared_input_tokens: number`51705171 Number of input tokens cleared by this edit.51725173 minimum: 051745175 - `cleared_thinking_turns: number`51765177 Number of thinking turns that were cleared.51785179 minimum: 051805181 - `diagnostics: BetaDiagnostics or null`51825183 Response envelope for request-level diagnostics. Present (possibly5184 null) whenever the caller supplied `diagnostics` on the request.51855186 - `cache_miss_reason: BetaCacheMissModelChanged or BetaCacheMissSystemChanged or BetaCacheMissToolsChanged or 3 more or null`51875188 Explains why the prompt cache could not fully reuse the prefix from the request identified by `diagnostics.previous_message_id`. `null` means diagnosis is still pending — the response was serialized before the background comparison completed.51895190 - `BetaCacheMissModelChanged object`51915192 - `type: "model_changed"`51935194 default: model_changed51955196 - `cache_missed_input_tokens: number`51975198 Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.51995200 - `BetaCacheMissSystemChanged object`52015202 - `type: "system_changed"`52035204 default: system_changed52055206 - `cache_missed_input_tokens: number`52075208 Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.52095210 - `BetaCacheMissToolsChanged object`52115212 - `type: "tools_changed"`52135214 default: tools_changed52155216 - `cache_missed_input_tokens: number`52175218 Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.52195220 - `BetaCacheMissMessagesChanged object`52215222 - `type: "messages_changed"`52235224 default: messages_changed52255226 - `cache_missed_input_tokens: number`52275228 Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.52295230 - `BetaCacheMissPreviousMessageNotFound object`52315232 - `type: "previous_message_not_found"`52335234 default: previous_message_not_found52355236 - `BetaCacheMissUnavailable object`52375238 - `type: "unavailable"`52395240 default: unavailable52415242 - `model: Model`52435244 The model that will complete your prompt.52455246 See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.52475248 - `role: "assistant"`52495250 Conversational role of the generated message.52515252 This will always be `"assistant"`.52535254 default: assistant52555256 - `stop_details: BetaRefusalStopDetails or null`52575258 Structured information about a refusal.52595260 - `type: "refusal"`52615262 default: refusal52635264 - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null`52655266 The policy category that triggered a refusal.52675268 - `"cyber"`52695270 The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category.52715272 - `"bio"`52735274 The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category.52755276 - `"frontier_llm"`52775278 The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category.52795280 - `"reasoning_extraction"`52815282 The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking).52835284 - `"general_harms"`52855286 The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category.52875288 - `explanation: string or null`52895290 Human-readable explanation of the refusal.52915292 This text is not guaranteed to be stable. `null` when no explanation is available for the category.52935294 - `fallback_credit_token: string or null`52955296 Opaque code that refunds the cache-miss cost when retrying this refused5297 request on the fallback model. Pass it as `fallback_credit_token` on the5298 retry request. Expires 5 minutes after the refusal.52995300 The retry is sent either with the same request body (`system`, `messages`,5301 `tools`, and other render-shaping fields), or with the same body plus one5302 appended `assistant` message whose content is the partial text (with any5303 trailing whitespace stripped from the final text block) and paired5304 server-tool blocks from this refusal — which also authorizes that5305 appended turn as an assistant-prefill continuation on models that otherwise5306 disallow prefill. A token minted mid-server-tool-loop whose partial content5307 was continuable may only be redeemed the second way — if a same-body retry5308 is rejected with a 400 saying the token must be redeemed by continuing the5309 partial response, retry the second way instead. Either way: same workspace,5310 same platform; a mismatch is a 400. Resending a token for an already-warm5311 prefix is permitted but yields no additional credit.53125313 `null` when the refused model isn't eligible for a fallback credit.53145315 - `fallback_has_prefill_claim: boolean or null`53165317 Whether the accompanying `fallback_credit_token` may be redeemed with the5318 appended-assistant retry form. Only set when `fallback_credit_token` is5319 present.53205321 `true`: retry by resending the same request body plus one appended5322 `assistant` message whose content is this response's `content` with any5323 trailing whitespace stripped from the final text block and unpaired5324 `tool_use` blocks omitted (the same appended-turn shape described on5325 `fallback_credit_token`), with the token attached. `false`: retry by5326 resending the original request body unchanged, with the token attached —5327 the appended-assistant form is not available for this refusal (no5328 continuable partial content, or the request uses `output_format` or a5329 `tool_choice` that forces tool use). One exception: when the request used5330 `output_format` or a forced `tool_choice` and the refusal arrived after5331 server tools (including MCP connector tools) had already executed, the5332 token may not be redeemable by either retry form; if the exact-body retry5333 is then rejected with a 400 saying the token must be redeemed by5334 continuing the partial response, discard the token and retry without it.53355336 Advisory: if an appended-assistant retry is rejected with a 400 despite5337 `true`, fall back to resending the original request body with the token.53385339 - `recommended_model: string or null`53405341 The server's suggested retry target for this refusal. Populated when a fallback attempt could not be made (the fallback model's rate limit was exhausted, or it was overloaded); names the fallback model the caller can retry directly. Null otherwise.53425343 - `stop_reason: BetaStopReason or null`53445345 The reason that we stopped.53465347 This may be one the following values:53485349 * `"end_turn"`: the model reached a natural stopping point5350 * `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum5351 * `"stop_sequence"`: one of your provided custom `stop_sequences` was generated5352 * `"tool_use"`: the model invoked one or more tools5353 * `"pause_turn"`: we paused a long-running turn. You may provide the response back as-is in a subsequent request to let the model continue.5354 * `"refusal"`: when streaming classifiers intervene to handle potential policy violations5355 * `"model_context_window_exceeded"`: we exceeded the model's context window53565357 In non-streaming mode this value is always non-null. In streaming mode, it is null in the `message_start` event and non-null otherwise.53585359 - `"end_turn"`53605361 - `"max_tokens"`53625363 - `"stop_sequence"`53645365 - `"tool_use"`53665367 - `"pause_turn"`53685369 - `"compaction"`53705371 - `"refusal"`53725373 - `"model_context_window_exceeded"`53745375 - `stop_sequence: string or null`53765377 Which custom stop sequence was generated, if any.53785379 This value will be a non-null string if one of your custom stop sequences was generated.53805381 - `usage: BetaUsage`53825383 Billing and rate-limit usage.53845385 Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems.53865387 Under the hood, the API transforms requests into a format suitable for the model. The model's output then goes through a parsing stage before becoming an API response. As a result, the token counts in `usage` will not match one-to-one with the exact visible content of an API request or response.53885389 For example, `output_tokens` will be non-zero, even for an empty string response from Claude.53905391 Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`.53925393 - `cache_creation: BetaCacheCreation or null`53945395 Breakdown of cached tokens by TTL53965397 - `ephemeral_1h_input_tokens: number`53985399 The number of input tokens used to create the 1 hour cache entry.54005401 default: 0, minimum: 054025403 - `ephemeral_5m_input_tokens: number`54045405 The number of input tokens used to create the 5 minute cache entry.54065407 default: 0, minimum: 054085409 - `cache_creation_input_tokens: number or null`54105411 The number of input tokens used to create the cache entry.54125413 minimum: 054145415 - `cache_read_input_tokens: number or null`54165417 The number of input tokens read from the cache.54185419 minimum: 054205421 - `fallback_credit: BetaFallbackCreditUsage or null`54225423 Outcome of the `fallback_credit_token` presented on this request.54245425 - `status: BetaFallbackCreditRedeemed or BetaFallbackCreditNotApplied`54265427 Whether the fallback-credit reprice was applied to this response's billing.54285429 A union discriminated on `type`. `redeemed`: the retry is billed as if5430 the conversation had been on the retry model all along — including when the5431 resulting shift is zero because there was nothing to move. `not_applied`:5432 no reprice was applied; the arm's `reason` says why.54335434 - `BetaFallbackCreditRedeemed object`54355436 The reprice was applied: the retry is billed as if the conversation5437 had been on the retry model all along.54385439 - `type: "redeemed"`54405441 default: redeemed54425443 - `BetaFallbackCreditNotApplied object`54445445 No reprice was applied; `reason` says why.54465447 - `type: "not_applied"`54485449 default: not_applied54505451 - `reason: "body_mismatch" or "continuation_excluded" or "continuation_only" or 9 more`54525453 Why the reprice was not applied.54545455 A closed enum; additions to the redemption-check vocabulary arrive as5456 deliberate schema updates.54575458 - `"body_mismatch"`54595460 - `"continuation_excluded"`54615462 - `"continuation_only"`54635464 - `"expired"`54655466 - `"invalid_target_model"`54675468 - `"not_enabled"`54695470 - `"reprice_unavailable"`54715472 - `"temporarily_unavailable"`54735474 - `"variant_fields_present"`54755476 - `"wrong_organization"`54775478 - `"wrong_platform"`54795480 - `"wrong_workspace"`54815482 - `remove_to_redeem: optional array of string or null`54835484 Request fields to remove before retrying, so the retry can redeem this5485 token.54865487 Present exactly when `reason` is `variant_fields_present` — never null,5488 never an empty array; absent otherwise. Fields are named only from your own request, and only after5489 the sealed variant hash matched. A served best-effort retry has already5490 been billed at normal price; nothing redeems retroactively, but a corrected5491 re-send inside the token's five-minute window can still redeem.54925493 - `inference_geo: string or null`54945495 The geographic region where inference was performed for this request.54965497 - `input_tokens: number`54985499 The number of input tokens which were used.55005501 minimum: 055025503 - `iterations: BetaIterationsUsage or null`55045505 Per-iteration token usage breakdown.55065507 Each entry represents one sampling iteration, with its own input/output token counts and cache statistics, discriminated by `type`. For `message` entries (model sampling iterations, such as the turns of a server-side tool use loop), this allows you to:55085509 - Determine which iterations exceeded long context thresholds (>=200k tokens)5510 - Calculate the context window size from the last `message` entry5511 - Understand token accumulation across server-side tool use loops55125513 A `compaction` entry reports the token usage of the compaction operation itself — the server-side request that summarizes the context being closed — NOT the size of the context that was compacted away, and its token counts can be much smaller than that closed context (for example, a compaction that closes a ~200k-token context can report only a few thousand tokens). Do not derive the context window size from a `compaction` entry, even when it is the last entry. A `compaction` entry's tokens are not included in the top-level `usage` fields. When an input-token trigger is in effect (the default — 150,000 tokens unless configured otherwise), each `compaction` entry closes a context that had reached at least that threshold, though the context can exceed it by the final iteration's output and tool results.55145515 - `BetaMessageIterationUsage object`55165517 Token usage for a sampling iteration.55185519 - `type: "message"`55205521 Usage for a sampling iteration55225523 default: message55245525 - `cache_creation: BetaCacheCreation or null`55265527 Breakdown of cached tokens by TTL55285529 - `cache_creation_input_tokens: number`55305531 The number of input tokens used to create the cache entry.55325533 default: 0, minimum: 055345535 - `cache_read_input_tokens: number`55365537 The number of input tokens read from the cache.55385539 default: 0, minimum: 055405541 - `input_tokens: number`55425543 The number of input tokens which were used.55445545 minimum: 055465547 - `model: Model or null`55485549 The model that will complete your prompt.55505551 See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.55525553 - `output_tokens: number`55545555 The number of output tokens which were used.55565557 minimum: 055585559 - `BetaCompactionIterationUsage object`55605561 Token usage for a compaction iteration.55625563 - `type: "compaction"`55645565 Usage for a compaction iteration55665567 default: compaction55685569 - `cache_creation: BetaCacheCreation or null`55705571 Breakdown of cached tokens by TTL55725573 - `cache_creation_input_tokens: number`55745575 The number of input tokens used to create the cache entry.55765577 default: 0, minimum: 055785579 - `cache_read_input_tokens: number`55805581 The number of input tokens read from the cache.55825583 default: 0, minimum: 055845585 - `input_tokens: number`55865587 The number of input tokens which were used.55885589 minimum: 055905591 - `output_tokens: number`55925593 The number of output tokens which were used.55945595 minimum: 055965597 - `BetaAdvisorMessageIterationUsage object`55985599 Token usage for an advisor sub-inference iteration.56005601 - `type: "advisor_message"`56025603 Usage for an advisor sub-inference iteration56045605 default: advisor_message56065607 - `cache_creation: BetaCacheCreation or null`56085609 Breakdown of cached tokens by TTL56105611 - `cache_creation_input_tokens: number`56125613 The number of input tokens used to create the cache entry.56145615 default: 0, minimum: 056165617 - `cache_read_input_tokens: number`56185619 The number of input tokens read from the cache.56205621 default: 0, minimum: 056225623 - `input_tokens: number`56245625 The number of input tokens which were used.56265627 minimum: 056285629 - `model: Model`56305631 The model that will complete your prompt.56325633 See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.56345635 - `output_tokens: number`56365637 The number of output tokens which were used.56385639 minimum: 056405641 - `BetaFallbackMessageIterationUsage object`56425643 Token usage for the fallback-model attempt of a server-side fallback request.56445645 The terminal entry of a fallback-served turn: when a fallback hop's5646 output is the returned message, the entry for the iteration that5647 completed it carries this type in place of `message`. A declined hop5648 and the serving hop's earlier tool-loop iterations produce `message`5649 entries. Whether a fallback model served the response is signalled by5650 the presence of this entry in `usage.iterations`.56515652 - `type: "fallback_message"`56535654 Usage for the fallback-model attempt that served the response56555656 default: fallback_message56575658 - `cache_creation: BetaCacheCreation or null`56595660 Breakdown of cached tokens by TTL56615662 - `cache_creation_input_tokens: number`56635664 The number of input tokens used to create the cache entry.56655666 default: 0, minimum: 056675668 - `cache_read_input_tokens: number`56695670 The number of input tokens read from the cache.56715672 default: 0, minimum: 056735674 - `input_tokens: number`56755676 The number of input tokens which were used.56775678 minimum: 056795680 - `model: Model`56815682 The model that will complete your prompt.56835684 See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.56855686 - `output_tokens: number`56875688 The number of output tokens which were used.56895690 minimum: 056915692 - `output_tokens: number`56935694 The number of output tokens which were used.56955696 minimum: 056975698 - `output_tokens_details: BetaOutputTokensDetails or null`56995700 Breakdown of output tokens by category.57015702 `output_tokens` remains the inclusive, authoritative total used for billing.5703 This object provides a read-only decomposition for observability — for example,5704 how many of the billed output tokens were spent on internal reasoning that may5705 have been summarized before being returned to you.57065707 - `thinking_tokens: number`57085709 Number of output tokens the model generated as internal reasoning, including5710 the thinking-block delimiter tokens.57115712 Reflects the raw reasoning the model produced, not the (possibly shorter)5713 summarized thinking text returned in the response body. Computed by5714 re-tokenizing the raw reasoning text, so it may differ from the model's exact5715 generation count by a small number of tokens. Always ≤ `output_tokens`;5716 `output_tokens - thinking_tokens` approximates the non-reasoning output.57175718 default: 0, minimum: 057195720 - `server_tool_use: BetaServerToolUsage or null`57215722 The number of server tool requests.57235724 - `web_fetch_requests: number`57255726 The number of web fetch tool requests.57275728 default: 0, minimum: 057295730 - `web_search_requests: number`57315732 The number of web search tool requests.57335734 default: 0, minimum: 057355736 - `service_tier: "standard" or "priority" or "batch" or null`57375738 If the request used the priority, standard, or batch tier.57395740 - `"standard"`57415742 - `"priority"`57435744 - `"batch"`57455746 - `speed: "standard" or "fast" or null`57475748 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.57495750 - `"standard"`57515752 - `"fast"`57535754 - `input_transformations: optional array of BetaInputTransformation or null`57555756 Changes the API made to the request's input before showing it to the model,5757 and blocks that failed a binding check but were left unchanged: one entry per5758 block, in request order. Two entry types today. `thinking_dropped` — a5759 `thinking`, `redacted_thinking` or `connector_text` block from the request's5760 `messages` that was removed from the prompt instead of being shown to the5761 model because it failed a binding check. `thinking_mismatch_allowed` — a5762 `thinking` or `redacted_thinking` block that failed the conversation check5763 (the conversation before it differs from the one it was created in, or it5764 carries no record of one on a model that requires it) and was shown to the5765 model all the same, because that check is not enforced for this request.5766 More entry types may be added over time; ignore types you do not recognize.57675768 Requires `anthropic-beta: thinking-binding-controls-2026-08-01`. Present on5769 every such response from a model that supports extended thinking, as `[]`5770 when there is no entry to report; without the beta, blocks are removed or5771 left in place all the same but nothing is reported. Removed blocks contribute5772 nothing to `usage.input_tokens`; blocks left in place count as sent. When5773 streaming, the array is final in `message_start`; the final `message_delta`5774 event carries it only when a server-side model fallback happened mid-stream,5775 in which case it holds the serving model's entries and replaces the one in5776 `message_start`.57775778 - `BetaThinkingDroppedInputTransformation object`57795780 - `type: "thinking_dropped"`57815782 Always `thinking_dropped` for this entry type.57835784 default: thinking_dropped57855786 - `path: string`57875788 Where the removed block was in your request, as `messages.{i}.content.{j}`:5789 `i` indexes the `messages` array you sent and `j` that message's `content`5790 array — the same form error messages use.57915792 - `reason: "model_binding_mismatch" or "prefix_binding_mismatch" or "organization_binding_mismatch" or "end_user_binding_mismatch"`57935794 Which binding check removed the block: `model_binding_mismatch` — it was5795 created by a model whose reasoning the requested model may not read;5796 `prefix_binding_mismatch` — the conversation before it differs from the5797 conversation it was created in (the rest of that turn's consecutive thinking5798 blocks are removed with it, each with this reason);5799 `organization_binding_mismatch` — it was created under a different5800 organization (an Anthropic organization, AWS account or Google Cloud project)5801 and this organization is not one of its additional organizations;5802 `end_user_binding_mismatch` — it was created for a different end user, or5803 was removed by the consumer-organization binding. A block that would fail5804 several checks reports one reason, in this order of precedence:5805 `organization_binding_mismatch`, `end_user_binding_mismatch`,5806 `model_binding_mismatch`, `prefix_binding_mismatch`.58075808 - `"model_binding_mismatch"`58095810 - `"prefix_binding_mismatch"`58115812 - `"organization_binding_mismatch"`58135814 - `"end_user_binding_mismatch"`58155816 - `BetaThinkingMismatchAllowedInputTransformation object`58175818 - `type: "thinking_mismatch_allowed"`58195820 Always `thinking_mismatch_allowed` for this entry type.58215822 default: thinking_mismatch_allowed58235824 - `path: string`58255826 Where the block is in your request, as `messages.{i}.content.{j}`:5827 `i` indexes the `messages` array you sent and `j` that message's `content`5828 array — the same form error messages use.58295830 - `reason: "model_binding_mismatch" or "prefix_binding_mismatch" or "organization_binding_mismatch" or "end_user_binding_mismatch"`58315832 Which binding check the block failed; the block was shown to the model all5833 the same. Always `prefix_binding_mismatch` today — the conversation before5834 the block differs from the conversation it was created in, or the block5835 carries no record of one on a model that requires it. Were the check5836 enforced for this request, the block would have been removed or the request5837 rejected (`thinking.block_binding.prefix_mismatch_behavior`). A removal also5838 takes the rest of that turn's consecutive thinking blocks, whereas here each5839 block is checked on its own, so `thinking_mismatch_allowed` entries are a5840 lower bound on what enforcement would remove.58415842 - `"model_binding_mismatch"`58435844 - `"prefix_binding_mismatch"`58455846 - `"organization_binding_mismatch"`58475848 - `"end_user_binding_mismatch"`58495850- `BetaRawMessageStreamEvent = BetaRawMessageStartEvent or BetaRawMessageDeltaEvent or BetaRawMessageStopEvent or 3 more`58515852 - `BetaRawMessageStartEvent object`58535854 - `type: "message_start"`58555856 default: message_start58575858 - `message: BetaMessage`58595860 - `BetaRawMessageDeltaEvent object`58615862 - `type: "message_delta"`58635864 default: message_delta58655866 - `context_management: BetaContextManagementResponse or null`58675868 Information about context management strategies applied during the request58695870 - `delta: object`58715872 - `container: BetaContainer or null`58735874 Information about the container used in the request (for the code execution tool)58755876 - `stop_details: BetaRefusalStopDetails or null`58775878 Structured information about a refusal.58795880 - `stop_reason: BetaStopReason or null`58815882 - `stop_sequence: string or null`58835884 - `usage: BetaMessageDeltaUsage`58855886 Billing and rate-limit usage.58875888 Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems.58895890 Under the hood, the API transforms requests into a format suitable for the model. The model's output then goes through a parsing stage before becoming an API response. As a result, the token counts in `usage` will not match one-to-one with the exact visible content of an API request or response.58915892 For example, `output_tokens` will be non-zero, even for an empty string response from Claude.58935894 Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`.58955896 - `cache_creation_input_tokens: number or null`58975898 The cumulative number of input tokens used to create the cache entry.58995900 minimum: 059015902 - `cache_read_input_tokens: number or null`59035904 The cumulative number of input tokens read from the cache.59055906 minimum: 059075908 - `fallback_credit: BetaFallbackCreditUsage or null`59095910 Outcome of the `fallback_credit_token` presented on this request.59115912 - `input_tokens: number or null`59135914 The cumulative number of input tokens which were used.59155916 minimum: 059175918 - `iterations: BetaIterationsUsage or null`59195920 Per-iteration token usage breakdown.59215922 Each entry represents one sampling iteration, with its own input/output token counts and cache statistics, discriminated by `type`. For `message` entries (model sampling iterations, such as the turns of a server-side tool use loop), this allows you to:59235924 - Determine which iterations exceeded long context thresholds (>=200k tokens)5925 - Calculate the context window size from the last `message` entry5926 - Understand token accumulation across server-side tool use loops59275928 A `compaction` entry reports the token usage of the compaction operation itself — the server-side request that summarizes the context being closed — NOT the size of the context that was compacted away, and its token counts can be much smaller than that closed context (for example, a compaction that closes a ~200k-token context can report only a few thousand tokens). Do not derive the context window size from a `compaction` entry, even when it is the last entry. A `compaction` entry's tokens are not included in the top-level `usage` fields. When an input-token trigger is in effect (the default — 150,000 tokens unless configured otherwise), each `compaction` entry closes a context that had reached at least that threshold, though the context can exceed it by the final iteration's output and tool results.59295930 - `output_tokens: number`59315932 The cumulative number of output tokens which were used.59335934 - `output_tokens_details: BetaOutputTokensDetails or null`59355936 Breakdown of output tokens by category.59375938 `output_tokens` remains the inclusive, authoritative total used for billing.5939 This object provides a read-only decomposition for observability — for example,5940 how many of the billed output tokens were spent on internal reasoning that may5941 have been summarized before being returned to you.59425943 - `server_tool_use: BetaServerToolUsage or null`59445945 The number of server tool requests.59465947 - `input_transformations: optional array of BetaInputTransformation or null`59485949 Changes the API made to the request's input before showing it to the model,5950 and blocks that failed a binding check but were left unchanged: one entry per5951 block, in request order. Two entry types today. `thinking_dropped` — a5952 `thinking`, `redacted_thinking` or `connector_text` block from the request's5953 `messages` that was removed from the prompt instead of being shown to the5954 model because it failed a binding check. `thinking_mismatch_allowed` — a5955 `thinking` or `redacted_thinking` block that failed the conversation check5956 (the conversation before it differs from the one it was created in, or it5957 carries no record of one on a model that requires it) and was shown to the5958 model all the same, because that check is not enforced for this request.5959 More entry types may be added over time; ignore types you do not recognize.59605961 Requires `anthropic-beta: thinking-binding-controls-2026-08-01`. Present on5962 every such response from a model that supports extended thinking, as `[]`5963 when there is no entry to report; without the beta, blocks are removed or5964 left in place all the same but nothing is reported. Removed blocks contribute5965 nothing to `usage.input_tokens`; blocks left in place count as sent. When5966 streaming, the array is final in `message_start`; the final `message_delta`5967 event carries it only when a server-side model fallback happened mid-stream,5968 in which case it holds the serving model's entries and replaces the one in5969 `message_start`.59705971 - `BetaThinkingDroppedInputTransformation object`59725973 - `BetaThinkingMismatchAllowedInputTransformation object`59745975 - `BetaRawMessageStopEvent object`59765977 - `type: "message_stop"`59785979 default: message_stop59805981 - `BetaRawContentBlockStartEvent object`59825983 - `type: "content_block_start"`59845985 default: content_block_start59865987 - `content_block: BetaTextBlock or BetaThinkingBlock or BetaRedactedThinkingBlock or 14 more`59885989 - `BetaTextBlock object`59905991 - `BetaThinkingBlock object`59925993 - `BetaRedactedThinkingBlock object`59945995 - `BetaToolUseBlock object`59965997 - `BetaServerToolUseBlock object`59985999 - `BetaWebSearchToolResultBlock object`60006001 - `BetaWebFetchToolResultBlock object`60026003 - `BetaAdvisorToolResultBlock object`60046005 - `BetaCodeExecutionToolResultBlock object`60066007 - `BetaBashCodeExecutionToolResultBlock object`60086009 - `BetaTextEditorCodeExecutionToolResultBlock object`60106011 - `BetaToolSearchToolResultBlock object`60126013 - `BetaMCPToolUseBlock object`60146015 - `BetaMCPToolResultBlock object`60166017 - `BetaContainerUploadBlock object`60186019 Response model for a file uploaded to the container.60206021 - `BetaCompactionBlock object`60226023 A compaction block returned when autocompact is triggered.60246025 When content is None, it indicates the compaction failed to produce a valid6026 summary (e.g., malformed output from the model). Clients may round-trip6027 compaction blocks with null content; the server treats them as no-ops.60286029 - `BetaFallbackBlock object`60306031 Marks the point in `content` where one model's output gives way to the next.60326033 One block appears per hop where a preceding model actually ran this turn and6034 declined. A turn where no preceding model ran and declined has no such6035 boundary and carries no block — the signal for whether a fallback model6036 served the response is the presence of a `fallback_message` entry in6037 `usage.iterations`, not this block.60386039 The block is treated like a server-tool content block for streaming: it6040 arrives via the standard `content_block_start` / `content_block_stop`6041 pair and carries no deltas.60426043 - `index: number`60446045 - `BetaRawContentBlockDeltaEvent object`60466047 - `type: "content_block_delta"`60486049 default: content_block_delta60506051 - `delta: BetaRawContentBlockDelta`60526053 - `BetaTextDelta object`60546055 - `type: "text_delta"`60566057 default: text_delta60586059 - `text: string`60606061 - `BetaInputJSONDelta object`60626063 - `type: "input_json_delta"`60646065 default: input_json_delta60666067 - `partial_json: string`60686069 - `BetaCitationsDelta object`60706071 - `type: "citations_delta"`60726073 default: citations_delta60746075 - `citation: BetaCitationCharLocation or BetaCitationPageLocation or BetaCitationContentBlockLocation or 2 more`60766077 - `BetaCitationCharLocation object`60786079 - `BetaCitationPageLocation object`60806081 - `BetaCitationContentBlockLocation object`60826083 - `BetaCitationsWebSearchResultLocation object`60846085 - `BetaCitationSearchResultLocation object`60866087 - `BetaThinkingDelta object`60886089 - `type: "thinking_delta"`60906091 default: thinking_delta60926093 - `estimated_tokens: number or null`60946095 Per-frame increment of a coarse, running estimate of the tokens this thinking block has produced so far. Present whenever the `thinking-token-count-2026-05-13` beta is set; `null` unless `thinking.display` resolves to `"omitted"` and a count is due this frame. Sum the increments across `thinking_delta` frames on this block for a progress indicator. Each increment is a non-negative multiple of a fixed quantum and the cadence is rate-limited, so this is a deliberately lossy display hint, not a billable count; `usage.output_tokens` remains authoritative.60966097 - `thinking: string`60986099 The incremental `thinking` text for this content block. Concatenate the `thinking` values of successive `thinking_delta` events to assemble the block's full `thinking` value.61006101 - `BetaSignatureDelta object`61026103 - `type: "signature_delta"`61046105 default: signature_delta61066107 - `signature: string`61086109 The `signature` for this thinking block: an opaque value used to verify that the block was generated by Claude when it is passed back to the API. Delivered in a `signature_delta` event just before the block's `content_block_stop` event.61106111 - `BetaCompactionContentBlockDelta object`61126113 - `type: "compaction_delta"`61146115 default: compaction_delta61166117 - `content: string or null`61186119 - `encrypted_content: string or null`61206121 Opaque metadata from prior compaction, to be round-tripped verbatim61226123 - `index: number`61246125 - `BetaRawContentBlockStopEvent object`61266127 - `type: "content_block_stop"`61286129 default: content_block_stop61306131 - `index: number`61326133## Example61346135```bash6136curl https://api.anthropic.com/v1/messages \6137 -H 'Content-Type: application/json' \6138 -H 'anthropic-version: 2023-06-01' \6139 -H "X-Api-Key: $ANTHROPIC_API_KEY" \6140 --max-time 600 \6141 -d '{6142 "max_tokens": 1024,6143 "messages": [6144 {6145 "content": "Hello, world",6146 "role": "user"6147 }6148 ],6149 "model": "claude-opus-5",6150 "stream": false,6151 "system": [6152 {6153 "text": "Today'\''s date is 2024-06-01.",6154 "type": "text"6155 }6156 ],6157 "temperature": 1,6158 "thinking": {6159 "type": "adaptive"6160 },6161 "tools": [6162 {6163 "input_schema": {6164 "type": "object",6165 "properties": {6166 "location": "bar",6167 "unit": "bar"6168 },6169 "required": [6170 "location"6171 ]6172 },6173 "name": "name"6174 }6175 ],6176 "top_k": 5,6177 "top_p": 0.76178 }'6179```61806181### Response (200)61826183```json6184{6185 "id": "msg_013Zva2CMHLNnXjNJJKqJ2EF",6186 "container": {6187 "id": "container_011CpZohnwH4vuy7gazohgSP",6188 "expires_at": "2019-12-27T18:11:19.117Z",6189 "skills": [6190 {6191 "skill_id": "pdf",6192 "type": "anthropic",6193 "version": "latest"6194 }6195 ]6196 },6197 "content": [6198 {6199 "citations": [6200 {6201 "cited_text": "The grass is green. The sky is blue.",6202 "document_index": 0,6203 "document_title": "My Document",6204 "end_char_index": 0,6205 "file_id": "file_011CNha8iCJcU1wXNR6q4V8w",6206 "start_char_index": 0,6207 "type": "char_location"6208 }6209 ],6210 "text": "Hi! My name is Claude.",6211 "type": "text"6212 }6213 ],6214 "context_management": {6215 "applied_edits": [6216 {6217 "cleared_input_tokens": 0,6218 "cleared_tool_uses": 0,6219 "type": "clear_tool_uses_20250919"6220 }6221 ]6222 },6223 "diagnostics": {6224 "cache_miss_reason": {6225 "cache_missed_input_tokens": 0,6226 "type": "model_changed"6227 }6228 },6229 "model": "claude-opus-5",6230 "role": "assistant",6231 "stop_details": {6232 "category": "cyber",6233 "explanation": "This request was declined because it conflicts with Anthropic's Usage Policy.",6234 "fallback_credit_token": "QW50aHJvcGljL0NsYXVkZQ==",6235 "fallback_has_prefill_claim": true,6236 "recommended_model": "claude-opus-4-8",6237 "type": "refusal"6238 },6239 "stop_reason": "end_turn",6240 "stop_sequence": null,6241 "type": "message",6242 "usage": {6243 "cache_creation": {6244 "ephemeral_1h_input_tokens": 0,6245 "ephemeral_5m_input_tokens": 06246 },6247 "cache_creation_input_tokens": 2051,6248 "cache_read_input_tokens": 2051,6249 "fallback_credit": {6250 "status": {6251 "type": "redeemed"6252 }6253 },6254 "inference_geo": "global",6255 "input_tokens": 2095,6256 "iterations": [6257 {6258 "cache_creation": {6259 "ephemeral_1h_input_tokens": 0,6260 "ephemeral_5m_input_tokens": 06261 },6262 "cache_creation_input_tokens": 0,6263 "cache_read_input_tokens": 0,6264 "input_tokens": 0,6265 "model": "claude-fable-5-1",6266 "output_tokens": 0,6267 "type": "message"6268 }6269 ],6270 "output_tokens": 503,6271 "output_tokens_details": {6272 "thinking_tokens": 06273 },6274 "server_tool_use": {6275 "web_fetch_requests": 2,6276 "web_search_requests": 06277 },6278 "service_tier": "standard",6279 "speed": "standard"6280 },6281 "input_transformations": [6282 {6283 "path": "path",6284 "reason": "model_binding_mismatch",6285 "type": "thinking_dropped"6286 }6287 ]6288}6289```6290